-
Notifications
You must be signed in to change notification settings - Fork 70
/
Copy pathtestsuite.jl
106 lines (85 loc) · 2.49 KB
/
testsuite.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
module Testsuite
using ..KernelAbstractions
using ..Test
# We can't add test-dependencies withouth breaking backend packages
const Pkg = Base.require(
Base.PkgId(
Base.UUID("44cfe95a-1eb2-52ea-b672-e2afdf69b78f"), "Pkg",
),
)
macro conditional_testset(name, skip_tests, expr)
return esc(
quote
@testset $name begin
if $name ∉ $skip_tests
$expr
else
@test_skip false
end
end
end,
)
end
include("test.jl")
include("localmem.jl")
include("private.jl")
include("unroll.jl")
include("nditeration.jl")
include("copyto.jl")
include("devices.jl")
include("print_test.jl")
include("compiler.jl")
include("reflection.jl")
include("examples.jl")
include("convert.jl")
include("specialfunctions.jl")
include("groupreduce.jl")
function testsuite(backend, backend_str, backend_mod, AT, DAT; skip_tests = Set{String}())
@conditional_testset "Unittests" skip_tests begin
unittest_testsuite(backend, backend_str, backend_mod, DAT; skip_tests)
end
@conditional_testset "SpecialFunctions" skip_tests begin
specialfunctions_testsuite(backend)
end
@conditional_testset "Localmem" skip_tests begin
localmem_testsuite(backend, AT)
end
@conditional_testset "Private" skip_tests begin
private_testsuite(backend, AT)
end
@conditional_testset "Unroll" skip_tests begin
unroll_testsuite(backend, AT)
end
@testset "NDIteration" begin
nditeration_testsuite()
end
@conditional_testset "copyto!" skip_tests begin
copyto_testsuite(backend, AT)
end
@conditional_testset "Devices" skip_tests begin
devices_testsuite(backend)
end
@conditional_testset "Printing" skip_tests begin
printing_testsuite(backend)
end
@conditional_testset "Compiler" skip_tests begin
compiler_testsuite(backend, AT)
end
@conditional_testset "Reflection" skip_tests begin
reflection_testsuite(backend, backend_str, AT)
end
@conditional_testset "Convert" skip_tests begin
convert_testsuite(backend, AT)
end
@conditional_testset "Examples" skip_tests begin
examples_testsuite(backend_str)
end
# TODO @index(Local) only works as a top-level expression on CPU.
if backend != CPU
@conditional_testset "@groupreduce" skip_tests begin
groupreduce_testsuite(backend, AT)
end
end
return
end
end