From d39dff93dd887228614c9b67d04d3ed9a91fee86 Mon Sep 17 00:00:00 2001 From: Boris Kaus Date: Tue, 29 Oct 2024 10:13:03 +0100 Subject: [PATCH 1/5] instantiate before starting to test --- Project.toml | 1 + test/runtests.jl | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 07e3bb1a..bbfb7b54 100644 --- a/Project.toml +++ b/Project.toml @@ -9,6 +9,7 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195" MPIPreferences = "3da0fdf6-3ccc-4f1b-acd9-58baa6c99267" PETSc_jll = "8fa3689e-f0b9-5420-9873-adf6ccf46f2d" +Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" [compat] diff --git a/test/runtests.jl b/test/runtests.jl index 06baaa08..28b8a23e 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,7 +1,9 @@ using Test using MPI: MPI, mpiexec -using PETSc, PETSc_jll +using PETSc, PETSc_jll, Pkg +# Make sure that all dependencies are installed also on a clean system +Pkg.instantiate() import MPIPreferences @info "Testing PETSc.jl with" MPIPreferences.binary MPIPreferences.abi PETSc_jll.host_platform From 238ee63ea0df860dc1ade4a17ba9cf7fde3f4d25 Mon Sep 17 00:00:00 2001 From: Boris Kaus Date: Tue, 29 Oct 2024 10:29:09 +0100 Subject: [PATCH 2/5] instamtiate Pkg --- test/options.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/options.jl b/test/options.jl index 8c0d6724..0b40d197 100644 --- a/test/options.jl +++ b/test/options.jl @@ -90,6 +90,8 @@ end julia = joinpath(Sys.BINDIR, Base.julia_exename()) run(`$(julia) --startup-file=no --project -e "using PETSc using Test + using MPI, Pkg + Pkg.instantiate() opts = PETSc.parse_options(ARGS) @test length(opts) == 4 @test opts.ksp_monitor === nothing From 435e70fabfd007b24ced2ac35f527a3e50748ab3 Mon Sep 17 00:00:00 2001 From: Boris Kaus Date: Tue, 29 Oct 2024 10:30:49 +0100 Subject: [PATCH 3/5] bump version --- Project.toml | 2 +- test/options.jl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index bbfb7b54..39c3e57f 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "PETSc" uuid = "ace2c81b-2b5f-4b1e-a30d-d662738edfe0" authors = ["Simon Byrne "] -version = "0.3.0" +version = "0.3.1" [deps] Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" diff --git a/test/options.jl b/test/options.jl index 0b40d197..37c2911c 100644 --- a/test/options.jl +++ b/test/options.jl @@ -90,7 +90,7 @@ end julia = joinpath(Sys.BINDIR, Base.julia_exename()) run(`$(julia) --startup-file=no --project -e "using PETSc using Test - using MPI, Pkg + using Pkg Pkg.instantiate() opts = PETSc.parse_options(ARGS) @test length(opts) == 4 From 64ec414bc0413ed28769a4bc010c24b850ae8091 Mon Sep 17 00:00:00 2001 From: Boris Kaus Date: Tue, 29 Oct 2024 10:41:12 +0100 Subject: [PATCH 4/5] next attempt --- test/options.jl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/options.jl b/test/options.jl index 37c2911c..a86f5662 100644 --- a/test/options.jl +++ b/test/options.jl @@ -87,7 +87,10 @@ end @testset "parse_options tests" begin @test begin + julia = joinpath(Sys.BINDIR, Base.julia_exename()) + run(`$(julia) --startup-file=no --project -e "using Pkg; Pkg.instantiate()" `) + run(`$(julia) --startup-file=no --project -e "using PETSc using Test using Pkg From 7a238aa407b56e237c893876089ae49d5125e796 Mon Sep 17 00:00:00 2001 From: Boris Kaus Date: Tue, 29 Oct 2024 10:45:38 +0100 Subject: [PATCH 5/5] add comment --- test/options.jl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/options.jl b/test/options.jl index a86f5662..d35f6bc4 100644 --- a/test/options.jl +++ b/test/options.jl @@ -89,12 +89,11 @@ end @test begin julia = joinpath(Sys.BINDIR, Base.julia_exename()) + # Force packages to be installed run(`$(julia) --startup-file=no --project -e "using Pkg; Pkg.instantiate()" `) run(`$(julia) --startup-file=no --project -e "using PETSc using Test - using Pkg - Pkg.instantiate() opts = PETSc.parse_options(ARGS) @test length(opts) == 4 @test opts.ksp_monitor === nothing