Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 20 additions & 3 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
using Test, ChainRulesCore, ChainRulesTestUtils

@nospecialize

# don't interpret this, since this breaks some inference tests
@time include("test_helpers.jl")
println()

module Tests

using ..Main: Multiplier, NoRules
using Base.Broadcast: broadcastable
using ChainRules
using ChainRulesCore
Expand All @@ -13,17 +24,21 @@ using StaticArrays
using Statistics
using Test

@nospecialize

if isdefined(Base, :Experimental) && isdefined(Base.Experimental, Symbol("@compiler_options"))
@eval Base.Experimental.@compiler_options compile=min optimize=0 infer=no
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May I ask to this line how this works? I am trying to use this in my code and it seems to not work (compared to starting Julia with those settings as command line parameters). Is there a trick to make this work?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

end

Random.seed!(1) # Set seed that all testsets should reset to.

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

println("Testing ChainRules.jl")
@testset "ChainRules" begin
include_test("test_helpers.jl")
println()
@testset "rulesets" begin
@testset "Core" begin
include_test("rulesets/Core/core.jl")
Expand Down Expand Up @@ -64,3 +79,5 @@ println("Testing ChainRules.jl")
println()
end
end

end