From b1dc2851bbfb6750971490c969f7410584510553 Mon Sep 17 00:00:00 2001 From: /alex/ Date: Thu, 28 Nov 2024 21:21:30 +0100 Subject: [PATCH] debug commands; use subshell --- .github/workflows/cargo_llvm_cov.yml | 12 +++++++----- scripts/simtest/simtest-cov.sh | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cargo_llvm_cov.yml b/.github/workflows/cargo_llvm_cov.yml index eb5aac10d05..1b56055244a 100644 --- a/.github/workflows/cargo_llvm_cov.yml +++ b/.github/workflows/cargo_llvm_cov.yml @@ -67,14 +67,15 @@ jobs: - name: Run code coverage (nextest) run: | + set +x set +e IOTA_SKIP_SIMTESTS=1 cargo llvm-cov --ignore-run-fail --no-report nextest -vv - if ! find target/llvm-cov-target -name '*.profraw' -print0 | xargs -0 $LLVM_PROFDATA merge \ + if ! (find target/llvm-cov-target -name '*.profraw' -print0 | xargs -0 "$LLVM_PROFDATA" merge \ --failure-mode=warn \ --sparse \ - --output target/nextest.profdata; then + --output target/nextest.profdata); then echo "Scanning for corrupted .profraw files. This might take a while." find target/llvm-cov-target -name '*.profraw' | while read file; do @@ -96,16 +97,17 @@ jobs: - name: Run code coverage (simtest) run: | + set +x + git clean -fd set +e - ./scripts/simtest/simtest-cov.sh - if ! find target/llvm-cov-target -name '*.profraw' -print0 | xargs -0 $LLVM_PROFDATA merge \ + if ! (find target/llvm-cov-target -name '*.profraw' -print0 | xargs -0 "$LLVM_PROFDATA" merge \ --failure-mode=warn \ --sparse \ - --output target/simtest.profdata; then + --output target/simtest.profdata); then echo "Scanning for corrupted .profraw files. This might take a while." find target/llvm-cov-target -name '*.profraw' | while read file; do diff --git a/scripts/simtest/simtest-cov.sh b/scripts/simtest/simtest-cov.sh index a899702a7ee..fdfc6abb063 100755 --- a/scripts/simtest/simtest-cov.sh +++ b/scripts/simtest/simtest-cov.sh @@ -20,7 +20,7 @@ TOOLCHAIN=$(rustup show active-toolchain | cut -d ' ' -f 1) LLVM_PROFDATA="$HOME/.rustup/toolchains/$TOOLCHAIN/lib/rustlib/x86_64-unknown-linux-gnu/bin/llvm-profdata" MSIM_WATCHDOG_TIMEOUT_MS=60000 MSIM_TEST_SEED=1 cargo llvm-cov --ignore-run-fail --no-report \ - nextest -vv --cargo-profile simulator + nextest -vv # remove the patch git checkout .cargo/config Cargo.toml Cargo.lock