Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,12 @@ resource_rules_bzlmod: &resource_rules_bzlmod
<<: *rules_flags
? "--enable_bzlmod"
? "--enable_workspace=false"
? "--//rules/flags:manifest_merge_order=legacy"
test_flags:
<<: *rules_flags
? "--enable_bzlmod"
? "--enable_workspace=false"
? "--//rules/flags:manifest_merge_order=legacy"
<<: *resource_rules

tasks:
Expand All @@ -115,20 +117,21 @@ tasks:
platform: ${{ platform }}
bazel: ${{ bazel }}
<<: *rules
# TODO(#397): Resource tests need some more debugging.
## resource_rules:
## platform: ${{ platform }}
# TODO(#397): Resource tests on WORKSPACE need some more debugging.
## resource_rules_ubuntu2004:
## name: "Resource rules on Linux with Bazel {bazel} and bzlmod disabled"
## platform: ubuntu2004
## bazel: ${{ bazel }}
## <<: *resource_rules
tools_bzlmod:
platform: ${{ platform }}
bazel: ${{ bazel }}
<<: *tools_bzlmod
# TODO(#397): Resource tests need some more debugging.
## resource_rules_bzlmod:
## platform: ${{ platform }}
## bazel: ${{ bazel }}
## <<: *resource_rules_bzlmod
resource_rules_ubuntu2004_bzlmod:
name: "Resource rules with Bazel {bazel} and bzlmod enabled"
platform: ubuntu2004
bazel: ${{ bazel }}
<<: *resource_rules_bzlmod
rules_bzlmod:
platform: ${{ platform }}
bazel: ${{ bazel }}
Expand Down
2 changes: 1 addition & 1 deletion test/rules/resources/test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ def _starlark_process_test_impl(ctx):
runfiles = r_java.runtime_output_jars + [ctx.executable._r_class_check]
java = ctx.attr._host_javabase[java_common.JavaRuntimeInfo]
args["java"] = java.java_executable_exec_path
java = ctx.attr._host_javabase[DefaultInfo]

elif ctx.attr.expected_r_class_fields:
fail("Expected a R.java file but none was generated")
Expand All @@ -191,7 +192,6 @@ set -eu

EXPECTED_R_CLASS_FIELDS="{expected_r_class_fields}"
if [ "{check_r_java}" == "True" ]; then

# Check the contents of the resources jar, as it is always produced.
# There are cases when it is produced empty (with only META-INF data).
# If there is no R.class generated and the expectation is no resource
Expand Down