Skip to content

Commit 7641367

Browse files
Merge pull request #265 from comius:rules-shell-in-cc
PiperOrigin-RevId: 693699461 Change-Id: Icd113a5668da50f186836ca79036f6620ad0bfce
2 parents a5827bf + 2b8d08c commit 7641367

File tree

4 files changed

+16
-5
lines changed

4 files changed

+16
-5
lines changed

.bazelci/presubmit.yml

-5
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,12 @@ build_targets: &build_targets
55
- "//examples/..."
66
- "//tests/..."
77
- "-//examples/custom_toolchain:legacy_selector" # Example only works on Linux
8-
- "-//tests/rule_based_toolchain/tool_map:_duplicate_tool_test_subject" # Intentionally broken rule.
98
test_targets: &test_targets
109
- "//:all"
1110
- "//cc/..."
1211
- "//examples/..."
1312
- "//tests/..."
1413
- "-//examples/custom_toolchain:legacy_selector" # Example only works on Linux
15-
- "-//tests/rule_based_toolchain/tool_map:_duplicate_tool_test_subject" # Intentionally broken rule.
1614

1715
build_targets_bazel_6: &build_targets_bazel_6
1816
- "//:all"
@@ -22,7 +20,6 @@ build_targets_bazel_6: &build_targets_bazel_6
2220
- "-//examples/custom_toolchain:legacy_selector" # Example only works on Linux
2321
- "-//tests/rule_based_toolchain/..." # proto.encode_text doesn't support None
2422
- "-//cc:optional_current_cc_toolchain" # Not supported in Bazel 6
25-
- "-//tests/rule_based_toolchain/tool_map:_duplicate_tool_test_subject" # Intentionally broken rule.
2623
test_targets_bazel_6: &test_targets_bazel_6
2724
- "//:all"
2825
- "//cc:all"
@@ -31,7 +28,6 @@ test_targets_bazel_6: &test_targets_bazel_6
3128
- "-//examples/custom_toolchain:legacy_selector" # Example only works on Linux
3229
- "-//tests/rule_based_toolchain/..." # proto.encode_text doesn't support None
3330
- "-//cc:optional_current_cc_toolchain" # Not supported in Bazel 6
34-
- "-//tests/rule_based_toolchain/tool_map:_duplicate_tool_test_subject" # Intentionally broken rule.
3531

3632
buildifier:
3733
version: latest
@@ -79,7 +75,6 @@ tasks:
7975
- "//tests/..."
8076
- "-//examples/custom_toolchain:legacy_selector" # Example only works on Linux
8177
- "-//tests/system_library:system_library_test" # Fails because of repo setup
82-
- "-//tests/rule_based_toolchain/tool_map:_duplicate_tool_test_subject" # Intentionally broken rule.
8378
macos_head:
8479
name: MacOS (Bazel HEAD)
8580
bazel: last_green

MODULE.bazel

+1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@ use_repo(cc_configure, "local_config_cc", "local_config_cc_toolchains")
1313

1414
register_toolchains("@local_config_cc_toolchains//:all")
1515

16+
bazel_dep(name = "rules_shell", version = "0.2.0", dev_dependency = True)
1617
bazel_dep(name = "rules_testing", version = "0.6.0", dev_dependency = True)
1718
bazel_dep(name = "stardoc", version = "0.7.0", dev_dependency = True)

WORKSPACE

+13
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,19 @@ load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
2424

2525
bazel_skylib_workspace()
2626

27+
http_archive(
28+
name = "rules_shell",
29+
sha256 = "410e8ff32e018b9efd2743507e7595c26e2628567c42224411ff533b57d27c28",
30+
strip_prefix = "rules_shell-0.2.0",
31+
url = "https://github.com/bazelbuild/rules_shell/releases/download/v0.2.0/rules_shell-v0.2.0.tar.gz",
32+
)
33+
34+
load("@rules_shell//shell:repositories.bzl", "rules_shell_dependencies", "rules_shell_toolchains")
35+
36+
rules_shell_dependencies()
37+
38+
rules_shell_toolchains()
39+
2740
http_archive(
2841
name = "rules_testing",
2942
sha256 = "02c62574631876a4e3b02a1820cb51167bb9cdcdea2381b2fa9d9b8b11c407c4",

tests/system_library/BUILD

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
load("//third_party/rules_shell/shell:sh_test.bzl", "sh_test")
16+
1517
sh_test(
1618
name = "system_library_test",
1719
size = "small",

0 commit comments

Comments
 (0)