From 9d55cf38e7454678b0d526f58add1b46f7a99287 Mon Sep 17 00:00:00 2001 From: Jishnu Bhattacharya Date: Sun, 30 Nov 2025 22:40:35 +0530 Subject: [PATCH 1/4] Run tests in parallel --- Project.toml | 4 +++- test/runtests.jl | 36 ++++++++++++++---------------------- test/test_aqua.jl | 4 ++++ test/test_docstrings.jl | 8 ++++++++ 4 files changed, 29 insertions(+), 23 deletions(-) create mode 100644 test/test_aqua.jl create mode 100644 test/test_docstrings.jl diff --git a/Project.toml b/Project.toml index fbc68ec..f3efdf3 100644 --- a/Project.toml +++ b/Project.toml @@ -25,6 +25,7 @@ Documenter = "1" FillArrays = "1" LinearAlgebra = "1" MatrixFactorizations = "1, 2, 3" +ParallelTestRunner = "2" Random = "1" SparseArrays = "1" Test = "1" @@ -33,9 +34,10 @@ julia = "1.10" [extras] Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" +ParallelTestRunner = "d3525ed8-44d0-4b2c-a655-542cee43accc" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["Aqua", "Random", "SparseArrays", "Test", "Documenter"] +test = ["Aqua", "ParallelTestRunner", "Random", "SparseArrays", "Test", "Documenter"] diff --git a/test/runtests.jl b/test/runtests.jl index d5d1645..993218c 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,28 +1,20 @@ using BlockBandedMatrices -using Test +using ParallelTestRunner -import Aqua -downstream_test = "--downstream_integration_test" in ARGS -@testset "Project quality" begin - Aqua.test_all(BlockBandedMatrices, ambiguities=false, piracies=false, - stale_deps=!downstream_test) +const init_code = quote + using Test + using BlockBandedMatrices end -using Documenter -@testset "docstrings" begin - # don't test docstrings on old versions to avoid failures due to changes in types - if VERSION >= v"1.9" - DocMeta.setdocmeta!(BlockBandedMatrices, :DocTestSetup, :(using BlockBandedMatrices); recursive=true) - doctest(BlockBandedMatrices) - end +# Start with autodiscovered tests +testsuite = find_tests(pwd()) + +if "--downstream_integration_test" in ARGS + delete!(testsuite, "test_aqua.jl") end -include("test_blockbanded.jl") -include("test_blockskyline.jl") -include("test_bandedblockbanded.jl") -include("test_broadcasting.jl") -include("test_linalg.jl") -include("test_misc.jl") -include("test_triblockbanded.jl") -include("test_adjtransblockbanded.jl") -include("test_blockskylineqr.jl") +filtered_args = filter(!=("--downstream_integration_test"), ARGS) +# Parse arguments +args = parse_args(filtered_args) + +runtests(BlockBandedMatrices, args; init_code, testsuite) \ No newline at end of file diff --git a/test/test_aqua.jl b/test/test_aqua.jl new file mode 100644 index 0000000..e319fcc --- /dev/null +++ b/test/test_aqua.jl @@ -0,0 +1,4 @@ +import Aqua +@testset "Project quality" begin + Aqua.test_all(BlockBandedMatrices, ambiguities=false, piracies=false) +end \ No newline at end of file diff --git a/test/test_docstrings.jl b/test/test_docstrings.jl new file mode 100644 index 0000000..4fbd700 --- /dev/null +++ b/test/test_docstrings.jl @@ -0,0 +1,8 @@ +using Documenter +@testset "docstrings" begin + # don't test docstrings on old versions to avoid failures due to changes in types + if VERSION >= v"1.9" + DocMeta.setdocmeta!(BlockBandedMatrices, :DocTestSetup, :(using BlockBandedMatrices); recursive=true) + doctest(BlockBandedMatrices) + end +end From 56a24efdb0f5503092d57c03d71250fe14235c70 Mon Sep 17 00:00:00 2001 From: Jishnu Bhattacharya Date: Sun, 30 Nov 2025 22:42:50 +0530 Subject: [PATCH 2/4] Newlines --- test/runtests.jl | 2 +- test/test_aqua.jl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index 993218c..c9b21f8 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -17,4 +17,4 @@ filtered_args = filter(!=("--downstream_integration_test"), ARGS) # Parse arguments args = parse_args(filtered_args) -runtests(BlockBandedMatrices, args; init_code, testsuite) \ No newline at end of file +runtests(BlockBandedMatrices, args; init_code, testsuite) diff --git a/test/test_aqua.jl b/test/test_aqua.jl index e319fcc..75b6589 100644 --- a/test/test_aqua.jl +++ b/test/test_aqua.jl @@ -1,4 +1,4 @@ import Aqua @testset "Project quality" begin Aqua.test_all(BlockBandedMatrices, ambiguities=false, piracies=false) -end \ No newline at end of file +end From a99511371e9c3941070903c9321236a626e186ef Mon Sep 17 00:00:00 2001 From: Jishnu Bhattacharya Date: Sun, 30 Nov 2025 23:02:29 +0530 Subject: [PATCH 3/4] Test on min version --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1d82cf5..22f0fa5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,6 +26,7 @@ jobs: fail-fast: false matrix: version: + - 'min' - 'lts' - '1' os: From b6b39192e910ba6ca996f77448689e92dd384f75 Mon Sep 17 00:00:00 2001 From: Jishnu Bhattacharya Date: Sun, 30 Nov 2025 23:12:18 +0530 Subject: [PATCH 4/4] Fix deletion in testsuite --- test/runtests.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/runtests.jl b/test/runtests.jl index c9b21f8..a017f93 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -10,7 +10,7 @@ end testsuite = find_tests(pwd()) if "--downstream_integration_test" in ARGS - delete!(testsuite, "test_aqua.jl") + delete!(testsuite, "test_aqua") end filtered_args = filter(!=("--downstream_integration_test"), ARGS)