@@ -48,9 +48,18 @@ test_transform = function(test, expr)
4848 end
4949end
5050
51+ const testsuite = find_tests (pwd ()) do path
52+ expr = quote
53+ include ($ path)
54+ end
55+ test_transform (path, expr)
56+ end
5157
52- # register custom tests that do not correspond to files in the test directory
53- custom_tests = Dict {String, Expr} ()
58+ if load_preference (OpenCL, " default_memory_backend" ) == " svm"
59+ # GPUArrays' scalar indexing tests assume that indexing is not supported
60+ delete! (testsuite, " gpuarrays/indexing scalar" )
61+ return false
62+ end
5463
5564# GPUArrays has a testsuite that isn't part of the main package.
5665# Include it directly.
6776
6877for name in keys (GPUArraysTestSuite. tests)
6978 test = " gpuarrays/$name "
70- custom_tests[test] = test_transform (test, :(GPUArraysTestSuite. tests[$ name](CLArray)))
71- end
72-
73- function test_filter (test)
74- if load_preference (OpenCL, " default_memory_backend" ) == " svm" &&
75- test == " gpuarrays/indexing scalar"
76- # GPUArrays' scalar indexing tests assume that indexing is not supported
77- return false
78- end
79- return true
79+ testsuite[test] = test_transform (test, :(GPUArraysTestSuite. tests[$ name](CLArray)))
8080end
8181
8282const init_code = quote
@@ -141,4 +141,4 @@ const init_code = quote
141141end
142142
143143
144- runtests (OpenCL, ARGS ; custom_tests, test_filter, init_code, test_transform )
144+ runtests (OpenCL, ARGS ; testsuite, init_code)
0 commit comments