From ceda58f01c096fd76de87e85d414ecec83dd535f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20G=C3=B6ttgens?= Date: Tue, 2 Jul 2024 15:38:29 +0200 Subject: [PATCH] Run JuliaInterface tests from runtests.jl via shell script (#1014) --- src/setup.jl | 2 +- test/Project.toml | 2 ++ test/runtests.jl | 9 +++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/setup.jl b/src/setup.jl index b3ab1446e..1b52a5ce7 100644 --- a/src/setup.jl +++ b/src/setup.jl @@ -269,7 +269,7 @@ function create_gap_sh(dstdir::String) ## Create Project.toml & Manifest.toml for use by gap.sh ## @info "Generating custom Julia project ..." - run(pipeline(`$(Base.julia_cmd()) --startup-file=no --project=$(dstdir) -e "using Pkg; Pkg.develop(PackageSpec(path=\"$(gaproot_gapjl)\"))"`)) + run(`$(Base.julia_cmd()) --startup-file=no --project=$(dstdir) -e "using Pkg; Pkg.develop(PackageSpec(path=\"$(gaproot_gapjl)\"))"`) ## ## Create custom gap.sh diff --git a/test/Project.toml b/test/Project.toml index 595b176bd..7b151e193 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -1,11 +1,13 @@ [deps] Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" +Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [compat] Aqua = "0.8.2" Documenter = "^0.27.0" +Pkg = "1.6" Random = "1.6" Test = "1.6" diff --git a/test/runtests.jl b/test/runtests.jl index becb54d79..4ee3a3708 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -24,3 +24,12 @@ end @testset "manual examples" begin include("doctest.jl") end + +@testset "JuliaInterface tests" begin + mktempdir() do tmpdir + GAP.create_gap_sh(tmpdir) + cmd = Cmd(`$(joinpath("etc", "ci_test.sh"))`; dir=dirname(dirname(pathof(GAP)))) + cmd = addenv(cmd, "GAP" => "$(joinpath(tmpdir, "gap.sh")) -A --quitonbreak --norepl") + @test success(pipeline(cmd; stdout, stderr)) + end +end