Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-enable solidity-coverage #575

Closed
eternauta1337 opened this issue Nov 22, 2017 · 3 comments
Closed

Re-enable solidity-coverage #575

eternauta1337 opened this issue Nov 22, 2017 · 3 comments
Assignees

Comments

@eternauta1337
Copy link
Contributor

See PR #573 (Update to truffle 4.0.0 and solc 0.4.18)

solidity-coverage is not compatible with the latest solc versions without forcing tests to use .call(), so we had to disable it on travis.

We should re-enable coverage tests after the issue is resolved in solidity-coverage. Will post commit that should be reverted to re-enable coverage.

@eternauta1337
Copy link
Contributor Author

Undo this commit when solidity-coverage is compatible with solc 0.4.18
0eaa5f5

@cgewecke
Copy link
Contributor

cgewecke commented Dec 8, 2017

@ajsantander Hi. Latest solidity-coverage (0.4.3) is now compatible with the newer solc versions thanks to thoughtful suggestions from the Zeppelin team. Example of a successful CI run on our zeppelin fork here.

Unfortunately there are some caveats if you decide to re-enable: .sol mock contracts will need to be moved from the test folder to the contracts folder, probably added to an .npmignore, and lots of paths rewritten.

Additionally, the .solcover.js should be revised as below:

module.exports = {
    norpc: true,
    testCommand: 'node --max-old-space-size=4096 ../node_modules/.bin/truffle test --network coverage',
    compileCommand: 'node --max-old-space-size=4096 ../node_modules/.bin/truffle compile --network coverage',
    skipFiles: [
      'lifecycle/Migrations.sol',
      'helpers' // <-- This is a folder containing the mocks (any name is fine).
    ]
}

Very sorry that these changes are necessary. If you or anyone else would like to discuss this further - we have a gitter channel now. Happy to make improvements if possible.

Thanks again for your help @spalladino @frangio :)

@spalladino
Copy link
Contributor

Working on this on https://github.com/spalladino/zeppelin-solidity/tree/feature/reenable-coverage. I fixed the paths issue by symlinking the mocks folder. However, there are a handful of tests failing. I'll look into it and send a PR as soon as I've fixed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants