File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change 3
3
set " RUST_BACKTRACE = full"
4
4
set " QLTEST_LOG = %CODEQL_EXTRACTOR_RUST_LOG_DIR% /qltest.log"
5
5
6
- type NUL && " %CODEQL_EXTRACTOR_RUST_ROOT% /tools/%CODEQL_PLATFORM% /extractor" --qltest > " %QLTEST_LOG% " 2 >& 1
6
+ type NUL && " %CODEQL_EXTRACTOR_RUST_ROOT% /tools/%CODEQL_PLATFORM% /extractor" --qltest --logging-verbosity=progress+ > " %QLTEST_LOG% " 2 >& 1
7
7
8
8
if %ERRORLEVEL% neq 0 (
9
9
type " %QLTEST_LOG% "
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
3
set -eu
4
+ set -o pipefail
4
5
5
6
export RUST_BACKTRACE=full
6
7
QLTEST_LOG=" $CODEQL_EXTRACTOR_RUST_LOG_DIR " /qltest.log
7
- if ! " $CODEQL_EXTRACTOR_RUST_ROOT /tools/$CODEQL_PLATFORM /extractor" --qltest >> " $QLTEST_LOG " 2>&1 ; then
8
- cat " $QLTEST_LOG "
8
+ mkdir -p " $CODEQL_EXTRACTOR_RUST_SCRATCH_DIR "
9
+ TMP_OUT=" $( mktemp --tmpdir=" $CODEQL_EXTRACTOR_RUST_SCRATCH_DIR " qltest-XXXXXX.log) )"
10
+ trap ' rm -f "$TMP_OUT"' EXIT
11
+ # put full-color output on the side, but remove the color codes from the log file
12
+ # also, print (colored) output only in case of failure
13
+ if ! " $CODEQL_EXTRACTOR_RUST_ROOT /tools/$CODEQL_PLATFORM /extractor" \
14
+ --qltest \
15
+ --logging-verbosity=progress+ \
16
+ 2>&1 \
17
+ | tee " $TMP_OUT " \
18
+ | sed ' s/\x1B\[[0-9;]\{1,\}[A-Za-z]//g' \
19
+ > " $QLTEST_LOG " ; then
20
+ cat " $TMP_OUT "
9
21
exit 1
10
22
fi
You can’t perform that action at this time.
0 commit comments