-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathruntests.jl
More file actions
47 lines (43 loc) · 1.55 KB
/
runtests.jl
File metadata and controls
47 lines (43 loc) · 1.55 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
using DifferentiationInterface
using Pkg
using Test
@static if VERSION < v"1.11"
DIT_PATH = joinpath(@__DIR__, "..", "..", "DifferentiationInterfaceTest")
if isdir(DIT_PATH)
Pkg.develop(; path = DIT_PATH)
else
Pkg.add("DifferentiationInterfaceTest")
end
end
include("testutils.jl")
## Main tests
@time @testset verbose = true "DifferentiationInterface.jl" begin
if haskey(ENV, "JULIA_DI_TEST_GROUP")
category, folder = split(ENV["JULIA_DI_TEST_GROUP"], '/')
@testset verbose = true "$category" begin
@testset verbose = true "$folder" begin
@testset verbose = true "$file" for file in readdir(
joinpath(@__DIR__, category, folder)
)
endswith(file, ".jl") || continue
@info "Testing $category/$folder/$file"
include(joinpath(@__DIR__, category, folder, file))
yield()
end
end
end
else
category = "Core"
@testset verbose = true for folder in readdir(joinpath(@__DIR__, category))
isdir(joinpath(@__DIR__, category, folder)) || continue
@testset verbose = true "$file" for file in readdir(
joinpath(@__DIR__, category, folder)
)
endswith(file, ".jl") || continue
@info "Testing $category/$folder/$file"
include(joinpath(@__DIR__, category, folder, file))
yield()
end
end
end
end;