Skip to content

Commit 3db5ee4

Browse files
committed
[bazel] Use @python3//:python3 target in sh_tests
For some reason the method of finding Python using `current_toolchain` stopped working with Bazel 8. Signed-off-by: James Wainwright <[email protected]>
1 parent f38fcd9 commit 3db5ee4

File tree

1 file changed

+8
-12
lines changed
  • sw/host/provisioning/orchestrator/tests

1 file changed

+8
-12
lines changed

sw/host/provisioning/orchestrator/tests/BUILD

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,10 @@ sh_test(
7676
data = [
7777
":orchestrator_hyper310_zip",
7878
"@//sw/host/provisioning/orchestrator/configs/skus:emulation.hjson",
79-
"@rules_python//python:current_py_toolchain",
79+
"@python3",
8080
],
8181
env = {
82-
"PYTHON": "$(PYTHON3)",
82+
"PYTHON": "$(location @python3//:python3)",
8383
"PACKAGE": "npcr12",
8484
},
8585
tags = [
@@ -88,26 +88,24 @@ sh_test(
8888
"hyper310",
8989
"manuf",
9090
],
91-
toolchains = ["@rules_python//python:current_py_toolchain"],
9291
)
9392

9493
sh_test(
9594
name = "e2e_multistage_test",
9695
srcs = ["e2e_multistage.sh"],
9796
data = [
9897
":orchestrator_hyper310_zip",
99-
"@rules_python//python:current_py_toolchain",
98+
"@python3",
10099
],
101100
env = {
102-
"PYTHON": "$(PYTHON3)",
101+
"PYTHON": "$(location @python3//:python3)",
103102
},
104103
tags = [
105104
"changes_otp",
106105
"exclusive",
107106
"hyper310",
108107
"manuf",
109108
],
110-
toolchains = ["@rules_python//python:current_py_toolchain"],
111109
)
112110

113111
sh_test(
@@ -117,10 +115,10 @@ sh_test(
117115
data = [
118116
":orchestrator_hyper310_zip",
119117
"@//sw/host/provisioning/orchestrator/configs/skus:emulation.hjson",
120-
"@rules_python//python:current_py_toolchain",
118+
"@python3",
121119
],
122120
env = {
123-
"PYTHON": "$(PYTHON3)",
121+
"PYTHON": "$(location @python3//:python3)",
124122
"PACKAGE": "npcr12",
125123
},
126124
tags = [
@@ -129,7 +127,6 @@ sh_test(
129127
"hyper310",
130128
"manuf",
131129
],
132-
toolchains = ["@rules_python//python:current_py_toolchain"],
133130
)
134131

135132
[
@@ -139,11 +136,11 @@ sh_test(
139136
srcs = ["e2e.sh"],
140137
data = [
141138
":orchestrator_{}_zip".format(fpga),
142-
"@rules_python//python:current_py_toolchain",
139+
"@python3",
143140
cfg["orchestrator_cfg"],
144141
],
145142
env = {
146-
"PYTHON": "$(PYTHON3)",
143+
"PYTHON": "$(location @python3//:python3)",
147144
"SKU_CONFIG_PATH": "$(location {})".format(cfg["orchestrator_cfg"]),
148145
"FPGA": "{}".format(fpga),
149146
},
@@ -154,7 +151,6 @@ sh_test(
154151
] + [fpga] + ([
155152
"manual",
156153
] if cfg.get("offline", False) else []),
157-
toolchains = ["@rules_python//python:current_py_toolchain"],
158154
)
159155
for sku, cfg in EARLGREY_SKUS.items()
160156
for fpga in [

0 commit comments

Comments
 (0)