mirror of
https://github.com/github/codeql.git
synced 2026-05-14 11:19:27 +02:00
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>
This commit is contained in:
@@ -8,7 +8,7 @@ _build_dist LANGUAGE: _require_semmle_code (_maybe_build_dist LANGUAGE)
|
||||
# Build the language-specific distribution if we are in an internal repository checkout
|
||||
# Otherwise, do nothing
|
||||
[no-exit-message]
|
||||
_maybe_build_dist LANGUAGE: (_if_in_semmle_code ('cd "$SEMMLE_CODE"; tools/bazel run //language-packs:intree-' + LANGUAGE) '# using codeql from PATH, if any')
|
||||
_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')
|
||||
|
||||
# Call bazel. Uses our official bazel wrapper if we are in an internal repository checkout
|
||||
[no-cd, no-exit-message]
|
||||
|
||||
@@ -16,7 +16,7 @@ import "format.just"
|
||||
|
||||
# Run integration tests. Requires an internal repository checkout
|
||||
[no-cd, no-exit-message]
|
||||
_integration_test *ARGS: _require_semmle_code (_run "$SEMMLE_CODE/tools/pytest" ARGS)
|
||||
_integration_test *ARGS: _require_semmle_code (_run "$SEMMLE_CODE/tools/pytest" "--codeql=build-as-test" ARGS)
|
||||
|
||||
# Generic run command recipe that can be used by other recipes, with nice rendering
|
||||
[no-cd]
|
||||
|
||||
Reference in New Issue
Block a user