Skip to content

Commit bc22445

Browse files
hvadehracopybara-github
authored andcommitted
Run integration tests with rules_java distribution instead of repo source
Also build `@rules_java//java/...` as part of integration tests. Would have caught the v7.7.1 breakage (fixed by https://github.com/rules_java/bazel/commit/f7337ec36eb1fa78a3b4f641ccae7e5a2fe4a2b8) on presubmit. PiperOrigin-RevId: 652899892 Change-Id: I1a225922c15803263d25d0b905debb75d3f814a2
1 parent 15c90a6 commit bc22445

3 files changed

Lines changed: 10 additions & 2 deletions

File tree

.bazelci/presubmit.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,12 @@ tasks:
2828
name: "Integration Tests"
2929
platform: ubuntu2004
3030
working_directory: "test/repo"
31+
shell_commands:
32+
- sh setup.sh
3133
build_targets:
3234
- "//..."
3335
- "//:bin_deploy.jar"
36+
- "@rules_java//java/..."
3437
macos:
3538
build_targets: *build_targets
3639
windows:

test/repo/MODULE.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module(name = "fake_repo_for_testing")
22

33
bazel_dep(name = "rules_java", version = "7.5.0")
4-
local_path_override(
4+
archive_override(
55
module_name = "rules_java",
6-
path = "../../",
6+
urls = ["file:///tmp/rules_java-HEAD.tar.gz"],
77
)

test/repo/setup.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
3+
cd ../../
4+
bazel build //distro:all
5+
cp -f bazel-bin/distro/rules_java-*.tar.gz /tmp/rules_java-HEAD.tar.gz

0 commit comments

Comments
 (0)