Skip to content

Commit 13e022d

Browse files
committed
Extract dependencies for QL tests
1 parent 5c5aac6 commit 13e022d

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

Diff for: rust/tools/qltest.sh

+13-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,16 @@ set -eu
44

55
export RUST_BACKTRACE=full
66
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"
9-
exit 1
10-
fi
7+
8+
if [ -f "Cargo.lock" ]; then
9+
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
10+
if ! /usr/bin/env python "${SCRIPT_DIR}/autobuild.py" >> "$QLTEST_LOG" 2>&1; then
11+
cat "$QLTEST_LOG"
12+
exit 1
13+
fi
14+
else
15+
if ! "$CODEQL_EXTRACTOR_RUST_ROOT/tools/$CODEQL_PLATFORM/extractor" --qltest >> "$QLTEST_LOG" 2>&1; then
16+
cat "$QLTEST_LOG"
17+
exit 1
18+
fi
19+
fi

0 commit comments

Comments
 (0)