@@ -8,6 +8,7 @@ load("@rules_shell//shell:sh_test.bzl", "sh_test")
88load ("@tflm_pip_deps//:requirements.bzl" , "requirement" )
99load (
1010 "//tensorflow/lite/micro:build_def.bzl" ,
11+ "INCOMPATIBLE_WITH_WINDOWS" ,
1112 "tflm_cc_library" ,
1213 "tflm_cc_test" ,
1314)
@@ -75,10 +76,7 @@ sh_test(
7576 "metadata_saved.h" ,
7677 ":metadata_cc_srcs" ,
7778 ],
78- target_compatible_with = select ({
79- "@bazel_tools//src/conditions:windows" : ["@platforms//:incompatible" ],
80- "//conditions:default" : [],
81- }),
79+ target_compatible_with = INCOMPATIBLE_WITH_WINDOWS ,
8280)
8381
8482tflm_cc_test (
@@ -105,10 +103,7 @@ py_test(
105103 size = "small" ,
106104 srcs = ["metadata_test.py" ],
107105 main = "metadata_test.py" ,
108- target_compatible_with = select ({
109- "@bazel_tools//src/conditions:windows" : ["@platforms//:incompatible" ],
110- "//conditions:default" : [],
111- }),
106+ target_compatible_with = INCOMPATIBLE_WITH_WINDOWS ,
112107 deps = [
113108 "metadata_py" ,
114109 "@flatbuffers//:runtime_py" ,
@@ -154,10 +149,7 @@ py_test(
154149 "nomsan" , # Sanitizer symbols don't work with Python extension libs
155150 "noubsan" ,
156151 ],
157- target_compatible_with = select ({
158- "@bazel_tools//src/conditions:windows" : ["@platforms//:incompatible" ],
159- "//conditions:default" : [],
160- }),
152+ target_compatible_with = INCOMPATIBLE_WITH_WINDOWS ,
161153 deps = [
162154 ":compress" ,
163155 ":metadata_py" ,
@@ -184,10 +176,7 @@ py_test(
184176 name = "model_facade_test" ,
185177 size = "small" ,
186178 srcs = ["model_facade_test.py" ],
187- target_compatible_with = select ({
188- "@bazel_tools//src/conditions:windows" : ["@platforms//:incompatible" ],
189- "//conditions:default" : [],
190- }),
179+ target_compatible_with = INCOMPATIBLE_WITH_WINDOWS ,
191180 deps = [
192181 ":model_facade" ,
193182 ":test_models" ,
@@ -207,10 +196,7 @@ py_test(
207196 name = "spec_test" ,
208197 size = "small" ,
209198 srcs = ["spec_test.py" ],
210- target_compatible_with = select ({
211- "@bazel_tools//src/conditions:windows" : ["@platforms//:incompatible" ],
212- "//conditions:default" : [],
213- }),
199+ target_compatible_with = INCOMPATIBLE_WITH_WINDOWS ,
214200 deps = [
215201 ":spec" ,
216202 requirement ("tensorflow" ),
@@ -229,10 +215,7 @@ py_test(
229215 name = "spec_builder_test" ,
230216 size = "small" ,
231217 srcs = ["spec_builder_test.py" ],
232- target_compatible_with = select ({
233- "@bazel_tools//src/conditions:windows" : ["@platforms//:incompatible" ],
234- "//conditions:default" : [],
235- }),
218+ target_compatible_with = INCOMPATIBLE_WITH_WINDOWS ,
236219 deps = [
237220 ":spec" ,
238221 ":spec_builder" ,
@@ -254,10 +237,7 @@ py_test(
254237 name = "test_models_test" ,
255238 size = "small" ,
256239 srcs = ["test_models_test.py" ],
257- target_compatible_with = select ({
258- "@bazel_tools//src/conditions:windows" : ["@platforms//:incompatible" ],
259- "//conditions:default" : [],
260- }),
240+ target_compatible_with = INCOMPATIBLE_WITH_WINDOWS ,
261241 deps = [
262242 ":test_models" ,
263243 "//tensorflow/lite/python:schema_py" ,
@@ -270,10 +250,7 @@ py_binary(
270250 srcs = [
271251 "view.py" ,
272252 ],
273- target_compatible_with = select ({
274- "@bazel_tools//src/conditions:windows" : ["@platforms//:incompatible" ],
275- "//conditions:default" : [],
276- }),
253+ target_compatible_with = INCOMPATIBLE_WITH_WINDOWS ,
277254 deps = [
278255 ":metadata_py" ,
279256 "//tensorflow/lite/python:schema_py" ,
0 commit comments