diff --git a/.gitignore b/.gitignore index 8c960ec..3f02ca7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ *.jl.cov *.jl.*.cov *.jl.mem +Manifest.toml diff --git a/Project.toml b/Project.toml index d2db4bc..e78a74a 100644 --- a/Project.toml +++ b/Project.toml @@ -18,7 +18,9 @@ julia = "1.2" [extras] BandedMatrices = "aae01518-5342-5314-be14-df237901396f" BlockBandedMatrices = "ffab5731-97b5-5995-9138-79e8c1846df0" +Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" +SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" [targets] -test = ["Test", "BlockBandedMatrices", "BandedMatrices"] +test = ["Test", "BlockBandedMatrices", "BandedMatrices", "Pkg", "SafeTestsets"] diff --git a/test/coloring_tests.jl b/test/coloring_tests.jl index 932cb17..76120c4 100644 --- a/test/coloring_tests.jl +++ b/test/coloring_tests.jl @@ -1,4 +1,5 @@ -using FiniteDiff, LinearAlgebra, SparseArrays, Test, LinearAlgebra, BlockBandedMatrices, ArrayInterface, BandedMatrices +using FiniteDiff, LinearAlgebra, SparseArrays, Test, LinearAlgebra, + BlockBandedMatrices, ArrayInterface, BandedMatrices fcalls = 0 function f(dx,x) diff --git a/test/downstream/Project.toml b/test/downstream/Project.toml new file mode 100644 index 0000000..b28c55b --- /dev/null +++ b/test/downstream/Project.toml @@ -0,0 +1,2 @@ +[deps] +OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" diff --git a/test/runtests.jl b/test/runtests.jl index 3346207..d06abbb 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,7 +1,30 @@ -using FiniteDiff -using Test, LinearAlgebra +using Pkg +using SafeTestsets +const LONGER_TESTS = false + +const GROUP = get(ENV, "GROUP", "All") +const is_APPVEYOR = Sys.iswindows() && haskey(ENV,"APPVEYOR") + +function activate_downstream_env() + Pkg.activate("downstream") + Pkg.develop(PackageSpec(path=dirname(@__DIR__))) + Pkg.instantiate() +end @time begin - include("finitedifftests.jl") - include("coloring_tests.jl") + +if GROUP == "All" || GROUP == "Core" + @time @safetestset "FiniteDiff Standard Tests" begin include("finitedifftests.jl") end + @time @safetestset "Color Differentiation Tests" begin include("coloring_tests.jl") end + @time @safetestset "Out of Place Tests" begin include("out_of_place_tests.jl") end +end + +if GROUP == "All" || GROUP == "Downstream" + activate_downstream_env() + @time @safetestset "ODEs" begin + import OrdinaryDiffEq + include(joinpath(dirname(pathof(OrdinaryDiffEq)), "..", "test/interface/sparsediff_tests.jl")) + end +end + end