Skip to content

Commit 36686d4

Browse files
authored
Test suite improvements. (#471)
1 parent f769005 commit 36686d4

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

test/runtests.jl

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ using Distributed
22
using Dates
33
import REPL
44
using Printf: @sprintf
5+
using Base.Filesystem: path_separator
56

67
# parse some command-line arguments
78
function extract_flag!(args, flag, default=nothing)
@@ -73,18 +74,23 @@ for (rootpath, dirs, files) in walkdir(@__DIR__)
7374
end
7475
end
7576

77+
# unify path separators
78+
files = map(files) do file
79+
replace(file, path_separator => '/')
80+
end
81+
7682
append!(tests, files)
7783
for file in files
7884
test_runners[file] = ()->include("$(@__DIR__)/$file.jl")
7985
end
8086
end
87+
sort!(tests; by=(file)->stat("$(@__DIR__)/$file.jl").size, rev=true)
8188
## GPUArrays testsuite
82-
if !validation_layer # oneapi-src/oneMKL#473
83-
for name in keys(TestSuite.tests)
84-
push!(tests, "gpuarrays$(Base.Filesystem.path_separator)$name")
85-
test_runners["gpuarrays$(Base.Filesystem.path_separator)$name"] = ()->TestSuite.tests[name](oneArray)
86-
end
89+
for name in keys(TestSuite.tests)
90+
pushfirst!(tests, "gpuarrays/$name")
91+
test_runners["gpuarrays/$name"] = ()->TestSuite.tests[name](oneArray)
8792
end
93+
## finalize
8894
unique!(tests)
8995

9096
# parse some more command-line arguments

0 commit comments

Comments
 (0)