Skip to content

Commit

Permalink
Coverage fixes in ci.yml.
Browse files Browse the repository at this point in the history
  • Loading branch information
smoelius committed Jun 12, 2020
1 parent cc97a38 commit a822b45
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,13 @@ jobs:
# concolic assumes presence of ../linux/simpleassert
echo "Running concolic.py..."
HW=../linux/helloworld
coverage run ./concolic.py
coverage run -p ./concolic.py
if [ $? -ne 0 ]; then
return 1
fi
echo "Running count_instructions.py..."
coverage run ./count_instructions.py $HW |grep -q Executed
coverage run -p ./count_instructions.py $HW |grep -q Executed
if [ $? -ne 0 ]; then
return 1
fi
Expand All @@ -87,21 +87,21 @@ jobs:
gcc -static -g src/state_explore.c -o state_explore
ADDRESS=0x$(objdump -S state_explore | grep -A 1 '((value & 0xff) != 0)' |
tail -n 1 | sed 's|^\s*||g' | cut -f1 -d:)
coverage run ./introduce_symbolic_bytes.py state_explore $ADDRESS
coverage run -p ./introduce_symbolic_bytes.py state_explore $ADDRESS
if [ $? -ne 0 ]; then
return 1
fi
echo "Running run_simple.py..."
gcc -x c -static -o hello test_run_simple.c
coverage run ./run_simple.py hello
coverage run -p ./run_simple.py hello
if [ $? -ne 0 ]; then
return 1
fi
echo "Running run_hook.py..."
MAIN_ADDR=$(nm $HW|grep 'T main' | awk '{print "0x"$1}')
coverage run ./run_hook.py $HW $MAIN_ADDR
coverage run -p ./run_hook.py $HW $MAIN_ADDR
if [ $? -ne 0 ]; then
return 1
fi
Expand All @@ -111,7 +111,7 @@ jobs:
gcc -static -g src/state_explore.c -o state_explore
SE_ADDR=0x$(objdump -S state_explore | grep -A 1 'value == 0x41' |
tail -n 1 | sed 's|^\s*||g' | cut -f1 -d:)
coverage run ./state_control.py state_explore $SE_ADDR
coverage run -p ./state_control.py state_explore $SE_ADDR
if [ $? -ne 0 ]; then
return 1
fi
Expand Down Expand Up @@ -162,11 +162,10 @@ jobs:
run_metacoin_tests(){
COVERAGE_RCFILE=$GITHUB_WORKSPACE/.coveragerc
ADDITIONAL_ARGS=.
EXPECTED_TX=34
EXPECTED_TX=26
if [ "$1" = "deploy" ]; then
ADDRESS="$(truffle deploy | grep '> contract address:.*' | tail -n 1 | grep -o '0x.*$')"
ADDITIONAL_ARGS="--rpc 127.0.0.1:7545 --txtarget $ADDRESS"
EXPECTED_TX=26
fi
coverage run -p -m manticore --contract MetaCoin --workspace output --exclude-all --evm.oog ignore --evm.txfail optimistic $ADDITIONAL_ARGS
# Truffle smoke test. We test if manticore is able to generate states
Expand Down Expand Up @@ -207,7 +206,7 @@ jobs:
echo Ran example scripts
coverage xml
popd
cp examples/script/coverage.xml .
cp examples/script/.coverage.* .
return $RESULT
}
Expand All @@ -223,10 +222,8 @@ jobs:
&& truffle unbox metacoin \
&& run_metacoin_tests \
&& run_metacoin_tests deploy \
&& coverage combine \
&& coverage xml \
&& cd .. \
&& cp metacoin_tests/coverage.xml .
&& cp metacoin_tests/.coverage.* .
;;
ethereum_vm)
make_vmtests
Expand All @@ -252,6 +249,9 @@ jobs:
exit 3;
;;
esac
coverage combine
coverage xml
- name: Coverage Upload
uses: codecov/codecov-action@v1
with:
Expand Down

0 comments on commit a822b45

Please sign in to comment.