Skip to content

Commit 4c04ad0

Browse files
committed
Switch to test_transform
1 parent 6c349ea commit 4c04ad0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/runtests.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ import Test
99
do_platform, platform_filter = ParallelTestRunner.extract_flag!(ARGS, "--platform", nothing)
1010

1111
test_transform = function(test, expr)
12+
# some tests require native execution capabilities
13+
requires_il = test in ["atomics", "execution", "intrinsics", "kernelabstractions", "statistics"] ||
14+
startswith(test, "gpuarrays/")
15+
1216
# targets is a global variable that is defined in init_code
1317
return quote
1418
if isempty(targets)
@@ -32,15 +36,11 @@ test_transform = function(test, expr)
3236
end
3337
end
3438

35-
# some tests require native execution capabilities
36-
requires_il = $(test) in ["atomics", "execution", "intrinsics", "kernelabstractions"] ||
37-
startswith($(test), "gpuarrays/")
38-
3939
@testset "\$(device.name)" for (; platform, device) in targets
4040
cl.platform!(platform)
4141
cl.device!(device)
4242

43-
if !requires_il || "cl_khr_il_program" in device.extensions
43+
if !$(requires_il) || "cl_khr_il_program" in device.extensions
4444
$(expr)
4545
end
4646
end

0 commit comments

Comments
 (0)