diff --git a/test/apply_fixes/execution_logic.py b/test/apply_fixes/execution_logic.py index 72f9ade4..34a45869 100644 --- a/test/apply_fixes/execution_logic.py +++ b/test/apply_fixes/execution_logic.py @@ -24,6 +24,14 @@ load("@depend_on_what_you_use//:setup_step_2.bzl", "setup_step_2") setup_step_2() +maybe( + http_archive, + name = "rules_python", + sha256 = "9acc0944c94adb23fba1c9988b48768b1bacc6583b52a2586895c5b7491e2e31", + strip_prefix = "rules_python-0.27.0", + urls = ["https://github.com/bazelbuild/rules_python/releases/download/0.27.0/rules_python-0.27.0.tar.gz"], +) + load("@rules_python//python:repositories.bzl", "python_register_toolchains") python_register_toolchains( name = "python", @@ -44,6 +52,8 @@ def setup_test_workspace( ) with open(temporary_workspace / ".bazelversion", mode="w", encoding="utf-8") as ws_file: ws_file.write("7.0.0") + with open(temporary_workspace / ".bazelrc", mode="w", encoding="utf-8") as ws_file: + ws_file.write("common --nolegacy_external_runfiles\ncommon --noenable_bzlmod") def cleanup(test_workspace: Path) -> None: diff --git a/test/apply_fixes/test_case.py b/test/apply_fixes/test_case.py index 1a913ea0..d25b95c3 100644 --- a/test/apply_fixes/test_case.py +++ b/test/apply_fixes/test_case.py @@ -72,7 +72,6 @@ def _create_reports( "bazel", *cmd_startup_args, "build", - "--nolegacy_external_runfiles", f"--aspects=//:aspect.bzl%{aspect}", "--output_groups=dwyu", *cmd_extra_args, @@ -93,7 +92,6 @@ def _run_automatic_fix(self, extra_args: Optional[List[str]] = None) -> None: cmd=[ "bazel", "run", - "--nolegacy_external_runfiles", "@depend_on_what_you_use//:apply_fixes", "--", f"--workspace={self._workspace}",