Skip to content

Commit c4a7602

Browse files
vchuravychristiangnrd
authored andcommitted
give JuliaTesting/ParallelTestRunner#59 a whirl
1 parent 806db27 commit c4a7602

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

test/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ pocl_jll = "7.0"
2828
ParallelTestRunner = "1.0.1"
2929

3030
[sources]
31-
ParallelTestRunner = {url="https://github.com/JuliaTesting/ParallelTestRunner.jl", rev="vc/test_transform"}
31+
ParallelTestRunner = {url="https://github.com/JuliaTesting/ParallelTestRunner.jl", rev="tb/testsuite"}

test/runtests.jl

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,18 @@ test_transform = function(test, expr)
4848
end
4949
end
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.
@@ -67,16 +76,7 @@ end
6776

6877
for 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)))
8080
end
8181

8282
const init_code = quote
@@ -141,4 +141,4 @@ const init_code = quote
141141
end
142142

143143

144-
runtests(OpenCL, ARGS; custom_tests, test_filter, init_code, test_transform)
144+
runtests(OpenCL, ARGS; testsuite, init_code)

0 commit comments

Comments
 (0)