Skip to content

Commit

Permalink
add a qemu_coverage test in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
rmalmain committed Jan 22, 2025
1 parent d9e8b59 commit 3daac65
Showing 1 changed file with 33 additions and 1 deletion.
34 changes: 33 additions & 1 deletion fuzzers/binary_only/qemu_coverage/Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -288,10 +288,38 @@ rm -rf ${CARGO_MAKE_CRATE_TARGET_DIRECTORY}
cargo clean
'''

[tasks.test_inner]
script_runner = "@shell"
script = '''
cargo make ${FEATURE} || exit 1
cargo run --manifest-path ../../../utils/drcov_utils/Cargo.toml --bin drcov_merge -- \
-i ${TARGET_DIR}/drcov-000.log ${TARGET_DIR}/drcov-001.log ${TARGET_DIR}/drcov-002.log ${TARGET_DIR}/drcov-003.log \
--output ${TARGET_DIR}/drcov-merged.log || exit 1
TMP=$(cargo run --manifest-path ../../../utils/drcov_utils/Cargo.toml --bin drcov_dump_addrs -- \
-i ${TARGET_DIR}/drcov-merged.log | wc -l || exit 1)
NB_BLOCKS=$((TMP - 1))
echo "Nb blocks found: $NB_BLOCKS"
if [ $NB_BLOCKS -ge 1700 ]; then
echo "Test succeeded"
else
echo "Did not find more than 1700 blocks."
exit 1
fi
'''

[tasks.arm]
command = "cargo"
args = ["make", "-p", "arm", "run"]

[tasks.test_arm]
command = "cargo"
args = ["make", "-p", "arm", "test_inner"]

[tasks.aarch64]
command = "cargo"
args = ["make", "-p", "aarch64", "run"]
Expand All @@ -300,6 +328,10 @@ args = ["make", "-p", "aarch64", "run"]
command = "cargo"
args = ["make", "-p", "x86_64", "run"]

[tasks.test_x86_64]
command = "cargo"
args = ["make", "-p", "x86_64", "test_inner"]

[tasks.i386]
command = "cargo"
args = ["make", "-p", "i386", "run"]
Expand All @@ -316,4 +348,4 @@ args = ["make", "-p", "ppc", "run"]
dependencies = ["arm", "aarch64", "x86_64", "i386", "mips", "ppc"]

[tasks.lightweight]
dependencies = ["arm", "x86_64"]
dependencies = ["test_x86_64", "test_arm"]

0 comments on commit 3daac65

Please sign in to comment.