From fd97208960fd3350d19a2df3cbeddc391c095154 Mon Sep 17 00:00:00 2001 From: Paolo Tranquilli Date: Thu, 2 Apr 2026 11:30:33 +0200 Subject: [PATCH] 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> --- misc/just/build.just | 2 +- misc/just/lib.just | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/just/build.just b/misc/just/build.just index 9fc6f87eacb..872159ee682 100644 --- a/misc/just/build.just +++ b/misc/just/build.just @@ -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] diff --git a/misc/just/lib.just b/misc/just/lib.just index 59c2d795178..2c57281e89a 100644 --- a/misc/just/lib.just +++ b/misc/just/lib.just @@ -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]