From 07a15465bb45d99833e1e7381a8b4835378f939f Mon Sep 17 00:00:00 2001 From: Brentley Jones Date: Wed, 18 Oct 2023 10:54:23 -0500 Subject: [PATCH] Allow Bzlmod with shell tests (#2304) Signed-off-by: Brentley Jones --- test/apple_shell_testutils.sh | 2 -- test/bazel_testrunner.sh | 37 ++++++++++++++++++++++++++++++++--- test/ios_coverage_test.sh | 9 ++++++++- 3 files changed, 42 insertions(+), 6 deletions(-) diff --git a/test/apple_shell_testutils.sh b/test/apple_shell_testutils.sh index 104ab58637..9c8ef71697 100755 --- a/test/apple_shell_testutils.sh +++ b/test/apple_shell_testutils.sh @@ -464,8 +464,6 @@ function do_action() { local -a bazel_options=( "--announce_rc" - # TODO: Remove once our tests work with Bzlmod - "--noenable_bzlmod" "--symlink_prefix=test-" "--verbose_failures" # Used so that if there's a single configuration transition, its output diff --git a/test/bazel_testrunner.sh b/test/bazel_testrunner.sh index 13150fbe0f..9841d1d797 100755 --- a/test/bazel_testrunner.sh +++ b/test/bazel_testrunner.sh @@ -75,6 +75,37 @@ function create_new_workspace() { # copy and we should reference it from the original location. cp -rf "$EXTERNAL_DIR" ../external + apple_support_path=$(resolve_external_repository build_bazel_apple_support) + rules_apple_path=$(resolve_external_repository build_bazel_rules_apple) + rules_swift_path=$(resolve_external_repository build_bazel_rules_swift) + + touch MODULE.bazel + cat > MODULE.bazel < WORKSPACE <