@@ -22,24 +22,29 @@ union!(JuliaInterpreter.compiled_modules, Any[Base, Base.Broadcast, Compat, Line
22
22
23
23
Random. seed! (1 ) # Set seed that all testsets should reset to.
24
24
25
- function include_test (path:: String )
26
- println (" Testing $path :" ) # print so TravisCI doesn't timeout due to no output
27
- @time Base. include (@__MODULE__ (), path) do ex
28
- Meta. isexpr (ex, :macrocall ) && ex. args[1 ] == Symbol (" @testset" ) || return ex
29
- return :(@interpret (() -> $ ex)()) # interpret testsets using JuliaInterpreter
25
+ function include_test (path)
26
+ if isempty (ARGS ) || any (occursin (a, w) for w in split (path, ' /' ), a in ARGS )
27
+ println (" Testing $path :" ) # print so TravisCI doesn't timeout due to no output
28
+ @time include (path) # show basic timing, (this will print a newline at end)
29
+ else
30
+ # If you provide ARGS like so, then it runs only matching testsets:
31
+ # Pkg.test("ChainRules", test_args = ["index", "LinearAlgebra"])
32
+ println (" (Not testing $path )" )
30
33
end
31
34
end
32
35
33
- println (" Testing ChainRules.jl" )
34
- @testset " ChainRules" begin
35
- include_test (" test_helpers.jl" )
36
- println ()
37
- @testset " rulesets" begin
38
- @testset " Core" begin
39
- include_test (" rulesets/Core/core.jl" )
40
- end
36
+ if isempty (ARGS )
37
+ println (" Testing ChainRules.jl" )
38
+ else
39
+ println (" Testing ChainRules.jl with test_args = " , ARGS )
40
+ end
41
41
42
- @testset " Base" begin
42
+ @testset " ChainRules" begin # one overall @testset ensures it keeps going after failures
43
+ include (" test_helpers.jl" )
44
+ println ()
45
+ # @testset "rulesets" begin
46
+ # @testset "Base" begin
47
+ # Each file puts all tests inside one or more @testset blocks
43
48
include_test (" rulesets/Base/base.jl" )
44
49
include_test (" rulesets/Base/fastmath_able.jl" )
45
50
include_test (" rulesets/Base/evalpoly.jl" )
@@ -48,15 +53,15 @@ println("Testing ChainRules.jl")
48
53
include_test (" rulesets/Base/indexing.jl" )
49
54
include_test (" rulesets/Base/mapreduce.jl" )
50
55
include_test (" rulesets/Base/sort.jl" )
51
- end
56
+ # end
52
57
println ()
53
58
54
- @testset " Statistics" begin
59
+ # @testset "Statistics" begin
55
60
include_test (" rulesets/Statistics/statistics.jl" )
56
- end
61
+ # end
57
62
println ()
58
63
59
- @testset " LinearAlgebra" begin
64
+ # @testset "LinearAlgebra" begin
60
65
include_test (" rulesets/LinearAlgebra/dense.jl" )
61
66
include_test (" rulesets/LinearAlgebra/norm.jl" )
62
67
include_test (" rulesets/LinearAlgebra/matfun.jl" )
@@ -65,12 +70,12 @@ println("Testing ChainRules.jl")
65
70
include_test (" rulesets/LinearAlgebra/factorization.jl" )
66
71
include_test (" rulesets/LinearAlgebra/blas.jl" )
67
72
include_test (" rulesets/LinearAlgebra/lapack.jl" )
68
- end
73
+ # end
69
74
println ()
70
75
71
- @testset " Random" begin
76
+ # @testset "Random" begin
72
77
include_test (" rulesets/Random/random.jl" )
73
- end
78
+ # end
74
79
println ()
75
- end
80
+ # end
76
81
end
0 commit comments