-
Notifications
You must be signed in to change notification settings - Fork 96
Expand file tree
/
Copy pathruntests.jl
More file actions
94 lines (76 loc) · 2.96 KB
/
runtests.jl
File metadata and controls
94 lines (76 loc) · 2.96 KB
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
using Test, ChainRulesCore, ChainRulesTestUtils
@nospecialize
using Adapt
using Base.Broadcast: broadcastable
using ChainRules
using ChainRules: stack
using ChainRulesCore
using ChainRulesTestUtils
using ChainRulesTestUtils: rand_tangent, _fdm
using FiniteDifferences
using GPUArraysCore
using JLArrays
using LinearAlgebra
using LinearAlgebra.BLAS
using LinearAlgebra: dot
using Random
using SparseArrays
using StaticArrays
using Statistics
using Test
using JuliaInterpreter
union!(JuliaInterpreter.compiled_modules, Any[Base, Base.Broadcast, LinearAlgebra, Random, StaticArrays, Statistics])
Random.seed!(1) # Set seed that all testsets should reset to.
function include_test(path)
if isempty(ARGS) || any(occursin(a, path) for a in ARGS)
println("Testing $path:") # print so TravisCI doesn't timeout due to no output
@time Base.include(@__MODULE__(), path) do ex
Meta.isexpr(ex, :macrocall) && ex.args[1] == Symbol("@testset") || return ex
return :(@interpret (() -> $ex)()) # interpret testsets using JuliaInterpreter
end
else
# If you provide ARGS like so, then it runs only matching testsets:
# Pkg.test("ChainRules", test_args = ["index", "LinearAlgebra"])
println("(Not testing $path)")
end
end
if isempty(ARGS)
println("Testing ChainRules.jl")
else
println("Testing ChainRules.jl with test_args = ", ARGS)
end
@testset "ChainRules" begin # One overall @testset ensures it keeps going after failures
include("test_helpers.jl") # This can't be skipped
println()
test_method_tables() # Check the global method tables are consistent
# Each file puts all tests inside one or more @testset blocks
include_test("rulesets/Base/CoreLogging.jl")
include_test("rulesets/Base/base.jl")
include_test("rulesets/Base/fastmath_able.jl")
include_test("rulesets/Base/evalpoly.jl")
include_test("rulesets/Base/array.jl")
include_test("rulesets/Base/arraymath.jl")
include_test("rulesets/Base/indexing.jl")
include_test("rulesets/Base/mapreduce.jl")
include_test("rulesets/Base/sort.jl")
include_test("rulesets/Base/broadcast.jl")
include_test("rulesets/Base/iterators.jl")
include_test("unzipped.jl") # used primarily for broadcast
println()
include_test("rulesets/Statistics/statistics.jl")
println()
include_test("rulesets/LinearAlgebra/dense.jl")
include_test("rulesets/LinearAlgebra/norm.jl")
include_test("rulesets/LinearAlgebra/matfun.jl")
include_test("rulesets/LinearAlgebra/structured.jl")
include_test("rulesets/LinearAlgebra/symmetric.jl")
include_test("rulesets/LinearAlgebra/factorization.jl")
include_test("rulesets/LinearAlgebra/blas.jl")
include_test("rulesets/LinearAlgebra/lapack.jl")
include_test("rulesets/LinearAlgebra/uniformscaling.jl")
println()
include_test("rulesets/SparseArrays/sparsematrix.jl")
println()
include_test("rulesets/Random/random.jl")
println()
end