Skip to content

Commit d892da5

Browse files
authored
shave another 7 mins off tests (#499)
1 parent 47df5cf commit d892da5

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

test/runtests.jl

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
using Test, ChainRulesCore, ChainRulesTestUtils
2+
3+
@nospecialize
4+
5+
# don't interpret this, since this breaks some inference tests
6+
@time include("test_helpers.jl")
7+
println()
8+
9+
module Tests
10+
11+
using ..Main: Multiplier, NoRules
112
using Base.Broadcast: broadcastable
213
using ChainRules
314
using ChainRulesCore
@@ -13,17 +24,21 @@ using StaticArrays
1324
using Statistics
1425
using Test
1526

27+
@nospecialize
28+
29+
if isdefined(Base, :Experimental) && isdefined(Base.Experimental, Symbol("@compiler_options"))
30+
@eval Base.Experimental.@compiler_options compile=min optimize=0 infer=no
31+
end
32+
1633
Random.seed!(1) # Set seed that all testsets should reset to.
1734

18-
function include_test(path)
35+
function include_test(path::String)
1936
println("Testing $path:") # print so TravisCI doesn't timeout due to no output
2037
@time include(path) # show basic timing, (this will print a newline at end)
2138
end
2239

2340
println("Testing ChainRules.jl")
2441
@testset "ChainRules" begin
25-
include_test("test_helpers.jl")
26-
println()
2742
@testset "rulesets" begin
2843
@testset "Core" begin
2944
include_test("rulesets/Core/core.jl")
@@ -64,3 +79,5 @@ println("Testing ChainRules.jl")
6479
println()
6580
end
6681
end
82+
83+
end

0 commit comments

Comments
 (0)