diff options
author | Catena cyber <35799796+catenacyber@users.noreply.github.com> | 2021-03-21 07:34:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-20 23:34:36 -0700 |
commit | 2e64b7a1cf12527d8e1d6d661ecf4d28225c887f (patch) | |
tree | e9faba74fcf417ac77f90d7ab1a6b0e89c54cf21 /projects | |
parent | 06cfe8c8cff8e4c0f0bf984fa610da470c66ceec (diff) | |
download | oss-fuzz-2e64b7a1cf12527d8e1d6d661ecf4d28225c887f.tar.gz |
Wasmtime: remaps for coverage (#5392)
* Wasmtime: remaps for coverage
* right loop fixup
* Adding a comment
Diffstat (limited to 'projects')
-rwxr-xr-x | projects/wasmtime/build.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/projects/wasmtime/build.sh b/projects/wasmtime/build.sh index d302851aa..38a9e6291 100755 --- a/projects/wasmtime/build.sh +++ b/projects/wasmtime/build.sh @@ -26,6 +26,13 @@ build() { shift PROJECT_DIR=$SRC/$project + # ensure we get absolute paths for the coverage report + cd $PROJECT_DIR + crate_src_abspath=`cargo metadata --no-deps --format-version 1 | jq -r '.workspace_root'` + while read i; do + export RUSTFLAGS="$RUSTFLAGS --remap-path-prefix $i=$crate_src_abspath/$i" + done <<< "$(find . -name "*.rs" | cut -d/ -f2 | uniq)" + cd $PROJECT_DIR/fuzz && cargo fuzz build -O --debug-assertions "$@" FUZZ_TARGET_OUTPUT_DIR=$PROJECT_DIR/target/x86_64-unknown-linux-gnu/release |