From 20c4296094cc403ccbf30f693ddd0f9c949d8a4c Mon Sep 17 00:00:00 2001 From: Alexander Schmidt Date: Mon, 4 Nov 2024 14:36:54 +0100 Subject: [PATCH] hopefully fixed --- .github/workflows/cargo_llvm_cov.yml | 10 ++++------ scripts/simtest/simtest-cov.sh | 6 +++--- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/cargo_llvm_cov.yml b/.github/workflows/cargo_llvm_cov.yml index 9b89406912f..4d7f3b1f8f8 100644 --- a/.github/workflows/cargo_llvm_cov.yml +++ b/.github/workflows/cargo_llvm_cov.yml @@ -56,9 +56,8 @@ jobs: - name: Generate code coverage report (nextest.info) run: | - cargo llvm-cov clean - # LLVM_PROFDATA="$HOME/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin/llvm-profdata" - LLVM_PROFDATA=$(find "$HOME" -iname "llvm-profdata" -print -quit) + rustup component add llvm-tools --toolchain stable + LLVM_PROFDATA="$HOME/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin/llvm-profdata" if [[ -x "$LLVM_PROFDATA" ]]; then $LLVM_PROFDATA --version else @@ -66,9 +65,9 @@ jobs: exit 1 fi set +e - IOTA_SKIP_SIMTESTS=1 cargo +nightly llvm-cov --ignore-run-fail --no-report nextest -vv + IOTA_SKIP_SIMTESTS=1 cargo llvm-cov --ignore-run-fail --no-report nextest -vv find target/llvm-cov-target -name '*.profraw' | while read file; do - if ! $LLVM_PROFDATA show "$file" > /dev/null 2>&1; then + if ! "$LLVM_PROFDATA" show "$file" > /dev/null 2>&1; then echo "Removing corrupted file: $file" rm "$file" fi @@ -85,7 +84,6 @@ jobs: - name: Generate code coverage report (simtest.info) run: | git clean -fd - cargo llvm-cov clean set +e ./scripts/simtest/simtest-cov.sh if [ -f "target/llvm-cov/simtest.info" ]; then diff --git a/scripts/simtest/simtest-cov.sh b/scripts/simtest/simtest-cov.sh index 9f2f86788a5..c002ce757cb 100755 --- a/scripts/simtest/simtest-cov.sh +++ b/scripts/simtest/simtest-cov.sh @@ -16,10 +16,10 @@ git apply ./scripts/simtest/config-patch root_dir=$(git rev-parse --show-toplevel) export SIMTEST_STATIC_INIT_MOVE=$root_dir"/examples/move/basics" -# MSIM_WATCHDOG_TIMEOUT_MS=60000 MSIM_TEST_SEED=1 cargo +nightly llvm-cov --ignore-run-fail --branch --lcov --output-path simtest.info \ +# MSIM_WATCHDOG_TIMEOUT_MS=60000 MSIM_TEST_SEED=1 cargo llvm-cov --ignore-run-fail --branch --lcov --output-path simtest.info \ # nextest -vv --cargo-profile simulator -MSIM_WATCHDOG_TIMEOUT_MS=60000 MSIM_TEST_SEED=1 cargo +nightly llvm-cov --ignore-run-fail --no-report nextest -vv --cargo-profile simulator +MSIM_WATCHDOG_TIMEOUT_MS=60000 MSIM_TEST_SEED=1 cargo llvm-cov --ignore-run-fail --no-report nextest -vv --cargo-profile simulator find target/llvm-cov-target -name '*.profraw' | while read file; do if ! "$HOME/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin/llvm-profdata" show "$file" > /dev/null 2>&1; then @@ -28,7 +28,7 @@ find target/llvm-cov-target -name '*.profraw' | while read file; do fi done -cargo +nightly llvm-cov report --lcov --output-path target/llvm-cov/simtest.info +cargo llvm-cov report --lcov --output-path target/llvm-cov/simtest.info # remove the patch git checkout .cargo/config Cargo.toml Cargo.lock