Skip to content

Commit

Permalink
Set examples to append coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Hennenfent committed Aug 10, 2020
1 parent 60620cb commit 1a44711
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions scripts/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ launch_examples() {
# concolic assumes presence of ../linux/simpleassert
echo "Running concolic.py..."
HW=../linux/helloworld
coverage run ./concolic.py
coverage run --append ./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 --append ./count_instructions.py $HW |grep -q Executed
if [ $? -ne 0 ]; then
return 1
fi
Expand All @@ -19,21 +19,21 @@ launch_examples() {
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 --append ./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 --append ./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 --append ./run_hook.py $HW $MAIN_ADDR
if [ $? -ne 0 ]; then
return 1
fi
Expand All @@ -43,7 +43,7 @@ launch_examples() {
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 --append ./state_control.py state_explore $SE_ADDR
if [ $? -ne 0 ]; then
return 1
fi
Expand Down

0 comments on commit 1a44711

Please sign in to comment.