Skip to content

Commit 0fecacd

Browse files
ted-xiecopybara-github
authored andcommitted
Merge #355 by ted-xie: Add real jacoco_runner to Android toolchain
Part of #347 Closes #355 COPYBARA_INTEGRATE_REVIEW=#355 from ted-xie:jacoco 85f0c69 PiperOrigin-RevId: 775346517 Change-Id: Ic9e3d2ec1e89b200563ceb15636b5e7786135922
1 parent 5238060 commit 0fecacd

2 files changed

Lines changed: 24 additions & 1 deletion

File tree

.bazelci/presubmit.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,13 @@ rules: &rules
5757
<<: *rules_flags
5858
test_flags:
5959
<<: *rules_flags
60+
rules_coverage: &rules_coverage
61+
coverage_targets:
62+
- "//test/rules/android_local_test/java/com/..."
63+
coverage_flags:
64+
<<: *rules_flags
65+
? "--enable_bzlmod"
66+
? "--enable_workspace=false"
6067
rules_bzlmod: &rules_bzlmod
6168
name: "Rules Bzlmod"
6269
build_flags:
@@ -118,6 +125,22 @@ tasks:
118125
platform: macos_arm64
119126
bazel: ${{ bazel }}
120127
<<: *rules_bzlmod
128+
ubuntu_a_l_t_coverage:
129+
name: "Ubuntu android_local_test coverage"
130+
platform: ubuntu2004
131+
bazel: ${{ bazel }}
132+
<<: *rules_coverage
133+
macos_a_l_t_coverage:
134+
name: "Macos android_local_test coverage"
135+
platform: macos
136+
bazel: ${{ bazel }}
137+
<<: *rules_coverage
138+
# TODO: Make windows ALT coverage work
139+
# windows_a_l_t_coverage:
140+
# name: "Windows android_local_test coverage"
141+
# platform: windows
142+
# bazel: ${{ bazel }}
143+
# <<: *rules_coverage
121144
ubuntu2004_basicapp:
122145
name: "Basic app ubuntu"
123146
platform: ubuntu2004

toolchains/android/toolchain.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ _ATTRS = dict(
179179
executable = True,
180180
),
181181
jacocorunner = attr.label(
182-
default = "@androidsdk//:fail",
182+
default = "@remote_java_tools//:jacoco_coverage_runner",
183183
),
184184
java_stub = attr.label(
185185
allow_files = True,

0 commit comments

Comments
 (0)