Add a qemu_coverage test in ci (#2883)
* add a qemu_coverage test in ci * update CI path for changes in qemu-related code
This commit is contained in:
parent
2cc2298e98
commit
e84429012b
2
.github/workflows/build_and_test.yml
vendored
2
.github/workflows/build_and_test.yml
vendored
@ -344,7 +344,7 @@ jobs:
|
||||
- 'libafl_bolts/**'
|
||||
- 'libafl_targets/**'
|
||||
- 'libafl_qemu/**'
|
||||
- 'fuzzers/*qemu*/**'
|
||||
- 'fuzzers/**/*qemu*/**'
|
||||
|
||||
fuzzers-qemu:
|
||||
needs:
|
||||
|
@ -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"]
|
||||
@ -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"]
|
||||
@ -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"]
|
||||
|
Loading…
x
Reference in New Issue
Block a user