Skip to content

Commit

Permalink
Wasmtime: remaps for coverage (#5392)
Browse files Browse the repository at this point in the history
* Wasmtime: remaps for coverage

* right loop fixup

* Adding a comment
  • Loading branch information
catenacyber committed Mar 21, 2021
1 parent 06cfe8c commit 2e64b7a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions projects/wasmtime/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2e64b7a

Please sign in to comment.