Skip to content

Commit fd97208

Browse files
redsun82Copilot
andcommitted
Just: use bazel test with -as-test targets for dist building
This avoids reinstalling dists when nothing changed, by leveraging bazel test's caching behavior with the existing -as-test target variants. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 994e551 commit fd97208

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

misc/just/build.just

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ _build_dist LANGUAGE: _require_semmle_code (_maybe_build_dist LANGUAGE)
88
# Build the language-specific distribution if we are in an internal repository checkout
99
# Otherwise, do nothing
1010
[no-exit-message]
11-
_maybe_build_dist LANGUAGE: (_if_in_semmle_code ('cd "$SEMMLE_CODE"; tools/bazel run //language-packs:intree-' + LANGUAGE) '# using codeql from PATH, if any')
11+
_maybe_build_dist LANGUAGE: (_if_in_semmle_code ('cd "$SEMMLE_CODE"; tools/bazel test //language-packs:intree-' + LANGUAGE + '-as-test --test_output=all') '# using codeql from PATH, if any')
1212

1313
# Call bazel. Uses our official bazel wrapper if we are in an internal repository checkout
1414
[no-cd, no-exit-message]

misc/just/lib.just

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import "format.just"
1616

1717
# Run integration tests. Requires an internal repository checkout
1818
[no-cd, no-exit-message]
19-
_integration_test *ARGS: _require_semmle_code (_run "$SEMMLE_CODE/tools/pytest" ARGS)
19+
_integration_test *ARGS: _require_semmle_code (_run "$SEMMLE_CODE/tools/pytest" "--codeql=build-as-test" ARGS)
2020

2121
# Generic run command recipe that can be used by other recipes, with nice rendering
2222
[no-cd]

0 commit comments

Comments
 (0)