-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rust: tweak qltest logs #18918
base: main
Are you sure you want to change the base?
Rust: tweak qltest logs #18918
Conversation
* verbosity is raised to DEBUG to have more information in the logs * color codes are now skipped in the `qltest.log` file * they are still printed out on the console when running with `--show-extractor-output`.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.
Tip: If you use Visual Studio Code, you can request a review from Copilot before you push from the "Source Control" tab. Learn more
rust/tools/qltest.sh
Outdated
|
||
export RUST_BACKTRACE=full | ||
QLTEST_LOG="$CODEQL_EXTRACTOR_RUST_LOG_DIR"/qltest.log | ||
if ! "$CODEQL_EXTRACTOR_RUST_ROOT/tools/$CODEQL_PLATFORM/extractor" --qltest >> "$QLTEST_LOG" 2>&1; then | ||
cat "$QLTEST_LOG" | ||
TMP_OUT="$(mktemp)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps use CODEQL_EXTRACTOR_RUST_SCRATCH_DIR ? That's easier to port to qltest.cmd
too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, right, I forgot about qltest.cmd
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this color removal is required on Windows, so I'd leave that alone until I try that. But I did apply the progress+
thing there as well now.
if ! "$CODEQL_EXTRACTOR_RUST_ROOT/tools/$CODEQL_PLATFORM/extractor" --qltest >> "$QLTEST_LOG" 2>&1; then | ||
cat "$QLTEST_LOG" | ||
mkdir -p "$CODEQL_EXTRACTOR_RUST_SCRATCH_DIR" | ||
TMP_OUT="$(mktemp --tmpdir="$CODEQL_EXTRACTOR_RUST_SCRATCH_DIR" qltest-XXXXXX.log))" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't bother with the mktemp
and trap
commands. The scratch dir is cleaned up already when a database is finalized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right!
qltest.log
file--show-extractor-output
.