Skip to content

Commit 95b17d9

Browse files
committed
add fast testing
1 parent 4231f04 commit 95b17d9

17 files changed

Lines changed: 42 additions & 59 deletions

‎test/cuda/factorizations.jl‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ const curandn = getglobal(CUDAExt, :curandn)
1111
const curand! = getglobal(CUDAExt, :curand!)
1212
using CUDA: rand as curand, rand! as curand!, randn as curandn, randn! as curandn!
1313

14-
include("../setup.jl")
15-
using .TestSetup
1614

1715
spacelist = if get(ENV, "CI", "false") == "true"
1816
println("Detected running on CI")

‎test/cuda/tensors.jl‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ const curandn = getglobal(CUDAExt, :curandn)
1010
const curand! = getglobal(CUDAExt, :curand!)
1111
using CUDA: rand as curand, rand! as curand!, randn as curandn, randn! as curandn!
1212

13-
include("../setup.jl")
14-
using .TestSetup
1513

1614
for V in (Vtr, Vℤ₂, Vfℤ₂, Vℤ₃, VU₁, VfU₁, VCU₁, VSU₂, VfSU₂) #, VSU₃)
1715
V1, V2, V3, V4, V5 = V

‎test/mooncake/factorizations.jl‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ using MatrixAlgebraKit
66
using Mooncake
77
using Random
88

9-
include("../setup.jl")
10-
using .TestSetup
119

1210
mode = Mooncake.ReverseMode
1311
rng = Random.default_rng()

‎test/mooncake/indexmanipulations.jl‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ using VectorInterface: Zero, One
55
using Mooncake
66
using Random
77

8-
include("../setup.jl")
9-
using .TestSetup
108

119
mode = Mooncake.ReverseMode
1210
rng = Random.default_rng()

‎test/mooncake/linalg.jl‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ using TensorKit
33
using Mooncake
44
using Random
55

6-
include("../setup.jl")
7-
using .TestSetup
86

97
mode = Mooncake.ReverseMode
108
rng = Random.default_rng()

‎test/mooncake/planaroperations.jl‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ using VectorInterface: Zero, One
55
using Mooncake
66
using Random
77

8-
include("../setup.jl")
9-
using .TestSetup
108
using .TestSetup: _repartition
119

1210
mode = Mooncake.ReverseMode

‎test/mooncake/tangent.jl‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ using Mooncake
44
using Random
55
using JET, AllocCheck
66

7-
include("../setup.jl")
8-
using .TestSetup
97
using .TestSetup: _repartition
108

119
mode = Mooncake.ReverseMode

‎test/mooncake/tensoroperations.jl‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ using VectorInterface: One, Zero
55
using Mooncake
66
using Random
77

8-
include("../setup.jl")
9-
using .TestSetup
108

119
mode = Mooncake.ReverseMode
1210
rng = Random.default_rng()

‎test/mooncake/vectorinterface.jl‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ using TensorOperations
44
using Mooncake
55
using Random
66

7-
include("../setup.jl")
8-
using .TestSetup
97

108
mode = Mooncake.ReverseMode
119
rng = Random.default_rng()

‎test/runtests.jl‎

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,17 @@ if (Sys.isapple() && get(ENV, "CI", "false") == "true") || !isempty(VERSION.prer
1919
filter!(k -> !startswith(k, "chainrules") && !startswith(k, "mooncake"), testsuite)
2020
end
2121

22-
ParallelTestRunner.runtests(TensorKit, ARGS; testsuite)
22+
# --fast: skip AD tests and inject fast_tests=true into each worker sandbox
23+
fast = "--fast" in ARGS
24+
filtered_args = filter(!=("--fast"), ARGS)
25+
if fast
26+
filter!(k -> !startswith(k, "chainrules") && !startswith(k, "mooncake"), testsuite)
27+
end
28+
setup_path = joinpath(@__DIR__, "setup.jl")
29+
init_code = quote
30+
const fast_tests = $fast
31+
include($setup_path)
32+
using .TestSetup
33+
end
34+
35+
ParallelTestRunner.runtests(TensorKit, filtered_args; testsuite, init_code)

0 commit comments

Comments
 (0)