Skip to content

Commit 625f980

Browse files
committed
Run tests in parallel
1 parent cb5f59c commit 625f980

File tree

4 files changed

+43
-27
lines changed

4 files changed

+43
-27
lines changed

Project.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ FillArrays = "1.3"
2525
GenericLinearAlgebra = "0.3"
2626
InfiniteArrays = "0.12, 0.13, 0.14"
2727
LinearAlgebra = "1"
28+
ParallelTestRunner = "2"
2829
PrecompileTools = "1"
2930
Quaternions = "0.7"
3031
Random = "1"
@@ -38,10 +39,11 @@ CliqueTrees = "60701a23-6482-424a-84db-faee86b9b1f8"
3839
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
3940
GenericLinearAlgebra = "14197337-ba66-59df-a3e3-ca00e7dcff7a"
4041
InfiniteArrays = "4858937d-0d70-526a-a4dd-2d5cb5dd786c"
42+
ParallelTestRunner = "d3525ed8-44d0-4b2c-a655-542cee43accc"
4143
Quaternions = "94ee1d12-ae83-5a48-8b1c-48b8ff168ae0"
4244
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
4345
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
4446
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
4547

4648
[targets]
47-
test = ["Aqua", "CliqueTrees", "Documenter", "GenericLinearAlgebra", "InfiniteArrays", "Random", "SparseArrays", "Test", "Quaternions"]
49+
test = ["Aqua", "CliqueTrees", "Documenter", "GenericLinearAlgebra", "InfiniteArrays", "ParallelTestRunner", "Random", "SparseArrays", "Test", "Quaternions"]

test/runtests.jl

Lines changed: 15 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,21 @@
11
using BandedMatrices
2-
using Test
2+
using ParallelTestRunner
33

4-
import Aqua
5-
downstream_test = "--downstream_integration_test" in ARGS
6-
@testset "Project quality" begin
7-
Aqua.test_all(BandedMatrices, ambiguities=false, piracies=false,
8-
stale_deps=!downstream_test)
4+
# Start with autodiscovered tests
5+
testsuite = find_tests(pwd())
6+
7+
if "--downstream_integration_test" in ARGS
8+
delete!(testsuite, "test_aqua")
99
end
1010

11-
using Documenter
12-
if v"1.10" <= VERSION < v"1.11.0-"
13-
DocMeta.setdocmeta!(BandedMatrices, :DocTestSetup, :(using BandedMatrices))
14-
@testset "doctests" begin
15-
doctest(BandedMatrices)
16-
end
11+
filtered_args = filter(!=("--downstream_integration_test"), ARGS)
12+
# Parse arguments
13+
args = parse_args(filtered_args)
14+
15+
if filter_tests!(testsuite, args)
16+
delete!(testsuite, "benchmark")
17+
delete!(testsuite, "evaluations")
18+
delete!(testsuite, "mymatrix")
1719
end
1820

19-
include("test_banded.jl")
20-
include("test_subarray.jl")
21-
include("test_linalg.jl")
22-
include("test_dot.jl")
23-
include("test_broadcasting.jl")
24-
include("test_indexing.jl")
25-
include("test_bandedlu.jl")
26-
include("test_bandedqr.jl")
27-
include("test_symbanded.jl")
28-
include("test_tribanded.jl")
29-
include("test_interface.jl")
30-
include("test_miscs.jl")
31-
include("test_sum.jl")
32-
include("test_cat.jl")
21+
runtests(BandedMatrices, args; testsuite)

test/test_aqua.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module AquaTest
2+
3+
import BandedMatrices
4+
import Aqua
5+
using Test
6+
7+
@testset "Project quality" begin
8+
Aqua.test_all(BandedMatrices, ambiguities=false, piracies=false)
9+
end
10+
11+
end

test/test_docstrings.jl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
module DocstringTests
2+
3+
import BandedMatrices
4+
using Documenter
5+
using Test
6+
7+
if v"1.10" <= VERSION < v"1.11.0-"
8+
DocMeta.setdocmeta!(BandedMatrices, :DocTestSetup, :(using BandedMatrices))
9+
@testset "doctests" begin
10+
doctest(BandedMatrices)
11+
end
12+
end
13+
14+
end

0 commit comments

Comments
 (0)