Skip to content

Commit

Permalink
Try getting more coverage from truffle-test (#1694)
Browse files Browse the repository at this point in the history
* Try getting more coverage from truffle-test

* Update codecov.yml

Co-authored-by: Eric Hennenfent <[email protected]>

* Try getting more coverage from truffle-test

* Update ci.yml

* Fix truffle tst state count

* Generate coverage file

Co-authored-by: Eric Hennenfent <[email protected]>
  • Loading branch information
feliam and Eric Hennenfent authored May 5, 2020
1 parent 4746e5d commit f3dcd63
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,20 +157,17 @@ jobs:
mkdir truffle_tests
cd truffle_tests
truffle unbox metacoin
manticore . --contract MetaCoin --workspace output
### The original comment says we should get 41 states, but after implementing the shift
### insructions, we get 31. Was the original comment a typo?
# The correct answer should be 41
# but Manticore fails to explore the paths due to the lack of the 0x1f opcode support
# see https://github.com/trailofbits/manticore/issues/1166
# if [ "$(ls output/*tx -l | wc -l)" != "41" ]; then
coverage run -m manticore . --contract MetaCoin --workspace output
# Truffle smoke test. We test if manticore is able to generate states
# from a truffle project.
if [ "$(ls output/*tx -l | wc -l)" != "34" ]; then
echo "Truffle test failed" `ls output/*tx -l | wc -l` "!= 34"
return 1
fi
echo "Truffle test succeded"
coverage xml
cd ..
cp truffle_tests/coverage.xml .
return 0
}
Expand Down
4 changes: 2 additions & 2 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ comment: false

codecov:
notify:
# We have 8 test steps that produce coverage data.
# We have 9 test steps that produce coverage data.
# If we add or remove any, we need to change this number.
after_n_builds: 8
after_n_builds: 9
wait_for_ci: yes

0 comments on commit f3dcd63

Please sign in to comment.