From 4d10c4110a93454ba3ab08683fd4be1044e9dbdf Mon Sep 17 00:00:00 2001 From: Paolo Tranquilli Date: Tue, 4 Mar 2025 13:04:12 +0100 Subject: [PATCH] Rust: address review --- rust/tools/qltest.cmd | 2 +- rust/tools/qltest.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/rust/tools/qltest.cmd b/rust/tools/qltest.cmd index 72c9911d7d4..1133c48627d 100644 --- a/rust/tools/qltest.cmd +++ b/rust/tools/qltest.cmd @@ -3,7 +3,7 @@ set "RUST_BACKTRACE=full" set "QLTEST_LOG=%CODEQL_EXTRACTOR_RUST_LOG_DIR%/qltest.log" -type NUL && "%CODEQL_EXTRACTOR_RUST_ROOT%/tools/%CODEQL_PLATFORM%/extractor" --qltest >"%QLTEST_LOG%" 2>&1 +type NUL && "%CODEQL_EXTRACTOR_RUST_ROOT%/tools/%CODEQL_PLATFORM%/extractor" --qltest --logging-verbosity=progress+ >"%QLTEST_LOG%" 2>&1 if %ERRORLEVEL% neq 0 ( type "%QLTEST_LOG%" diff --git a/rust/tools/qltest.sh b/rust/tools/qltest.sh index 6f7370df610..2c2e8fe6bf3 100755 --- a/rust/tools/qltest.sh +++ b/rust/tools/qltest.sh @@ -5,7 +5,8 @@ set -o pipefail export RUST_BACKTRACE=full QLTEST_LOG="$CODEQL_EXTRACTOR_RUST_LOG_DIR"/qltest.log -TMP_OUT="$(mktemp)" +mkdir -p "$CODEQL_EXTRACTOR_RUST_SCRATCH_DIR" +TMP_OUT="$(mktemp --tmpdir="$CODEQL_EXTRACTOR_RUST_SCRATCH_DIR" qltest-XXXXXX.log))" trap 'rm -f "$TMP_OUT"' EXIT # put full-color output on the side, but remove the color codes from the log file # also, print (colored) output only in case of failure