@@ -7,15 +7,28 @@ export RUST_BACKTRACE=full
77QLTEST_LOG=" $CODEQL_EXTRACTOR_RUST_LOG_DIR /qltest.log"
88QLTEST_COLORED_LOG=" $CODEQL_EXTRACTOR_RUST_SCRATCH_DIR /qltest.log"
99dirname " $QLTEST_LOG " " $QLTEST_COLORED_LOG " | xargs mkdir -p
10- # put full-color output on the side, but remove the color codes from the log file
11- # also, print (colored) output only in case of failure
12- if ! " $CODEQL_EXTRACTOR_RUST_ROOT /tools/$CODEQL_PLATFORM /extractor" \
13- --qltest \
14- --logging-verbosity=progress+ \
15- 2>&1 \
16- | tee " $QLTEST_COLORED_LOG " \
17- | sed ' s/\x1B\[[0-9;]\{1,\}[A-Za-z]//g' \
18- > " $QLTEST_LOG " ; then
19- cat " $QLTEST_COLORED_LOG "
20- exit 1
10+
11+ if [ -f " Cargo.lock" ]; then
12+ SCRIPT_DIR=$( cd -- " $( dirname -- " ${BASH_SOURCE[0]} " ) " & > /dev/null && pwd )
13+ if ! /usr/bin/env python3 " ${SCRIPT_DIR} /autobuild.py" \
14+ 2>&1 \
15+ | tee " $QLTEST_COLORED_LOG " \
16+ | sed ' s/\x1B\[[0-9;]\{1,\}[A-Za-z]//g' \
17+ > " $QLTEST_LOG " ; then
18+ cat " $QLTEST_COLORED_LOG "
19+ exit 1
20+ fi
21+ else
22+ # put full-color output on the side, but remove the color codes from the log file
23+ # also, print (colored) output only in case of failure
24+ if ! " $CODEQL_EXTRACTOR_RUST_ROOT /tools/$CODEQL_PLATFORM /extractor" \
25+ --qltest \
26+ --logging-verbosity=progress+ \
27+ 2>&1 \
28+ | tee " $QLTEST_COLORED_LOG " \
29+ | sed ' s/\x1B\[[0-9;]\{1,\}[A-Za-z]//g' \
30+ > " $QLTEST_LOG " ; then
31+ cat " $QLTEST_COLORED_LOG "
32+ exit 1
33+ fi
2134fi
0 commit comments