@@ -4,52 +4,26 @@ This file defines integration tests for the JuliaAstro package ecosystem.
44These are tests that confirm various packages can be installed and work together.
55=#
66
7- using Test, Pkg, InteractiveUtils
8-
7+ using ParallelTestRunner: runtests, find_tests, parse_args
98import JuliaAstroDocs
109
11- ecosystem_t = JuliaAstroDocs. ecosystem_t ()
12-
13- packages_juliaastro = filter (ecosystem_t) do package
14- occursin (" juliaastro" , lowercase (package. repo))
15- end
16- unique! (p -> p. name, packages_juliaastro)
17- sort! (packages_juliaastro)
18-
19- @testset " JuliaAstro Package Evalauation" begin
20- @testset " Compatible versions exist" begin
21- ENV [" JULIA_PKG_PRECOMPILE_AUTO" ] = 0
22- for package in packages_juliaastro
23- p_name = package. name
24- @testset " $(p_name) " begin
25- @test Pkg. add (chopsuffix (p_name, " .jl" )) == nothing
26- end
27- end
28- end
10+ const init_code = quote
11+ # Start by testing that we can install all packages
12+ # Worry if they compile successfully after
13+ ENV [" JULIA_PKG_PRECOMPILE_AUTO" ] = 0
2914
30- @testset " Development versions compatible" begin
31- # Start by testing that we can install all packages
32- # Worry if they compile successfully after
33- ENV [" JULIA_PKG_PRECOMPILE_AUTO" ] = 0
15+ import Pkg
16+ using JuliaAstroDocs: ecosystem_t
17+ using InteractiveUtils: @time_imports
3418
35- for package in packages_juliaastro
36- @testset " $(package. name) " begin
37- @test Pkg. add (url= package. repo) == nothing
38- end
39- end
19+ packages_juliaastro = filter (ecosystem_t ()) do package
20+ occursin (" juliaastro" , lowercase (package. repo))
4021 end
22+ unique! (p -> p. name, packages_juliaastro)
23+ sort! (packages_juliaastro)
24+ end
4125
42- @testset " Precompilation" begin
43- @test Pkg. precompile (; strict= true ) == nothing
44- end
26+ args = parse_args (Base. ARGS )
27+ testsuite = find_tests (@__DIR__ )
4528
46- @testset " Package loading" begin
47- for package in packages_juliaastro
48- @testset " $(package. name) " begin
49- @test eval (quote
50- @time_imports using $ (Symbol (chopsuffix (package. name, " .jl" )))
51- end ) == nothing
52- end
53- end
54- end
55- end
29+ runtests (JuliaAstroDocs, args; testsuite, init_code)
0 commit comments