-
Notifications
You must be signed in to change notification settings - Fork 443
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test for query and cquery in the repo
This will ensure we don't regress #2359 We can discuss adding this to different configurations (e.g. bazel versions, bzlmod enabled vs disabled, ...), but I think "latest bazel in its default config" is a reasonable place to start.
- Loading branch information
1 parent
0a4523e
commit eb6f3f2
Showing
3 changed files
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
sh_binary( | ||
name = "query_test_binary", | ||
srcs = ["query_test_binary.sh"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
cd "${BUILD_WORKSPACE_DIRECTORY}" | ||
|
||
# We always expect to be able to query ... in this repo with no flags. | ||
# In the past this has regressed, e.g. in https://github.com/bazelbuild/rules_rust/issues/2359, so we have this test to ensure we don't regress again. | ||
bazel query //... >/dev/null | ||
bazel cquery //... >/dev/null |