From dab6d48984dbc4838cde1aa52901460181389fb9 Mon Sep 17 00:00:00 2001 From: Tim Besard Date: Mon, 19 Apr 2021 12:09:06 +0200 Subject: [PATCH] Add a test-specific Project.toml to work around Pkg issue. --- Project.toml | 1 - test/Project.toml | 14 ++++++++++++++ test/Sandbox.jl | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 test/Project.toml diff --git a/Project.toml b/Project.toml index 9c2f2cc..db065a5 100644 --- a/Project.toml +++ b/Project.toml @@ -11,7 +11,6 @@ Preferences = "21216c6a-2e73-6563-6e65-726566657250" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" Scratch = "6c6a2e73-6563-6170-7368-637461726353" TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76" -Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" UserNSSandbox_jll = "b88861f7-1d72-59dd-91e7-a8cc876a4984" [compat] diff --git a/test/Project.toml b/test/Project.toml new file mode 100644 index 0000000..2445967 --- /dev/null +++ b/test/Project.toml @@ -0,0 +1,14 @@ +# A bug in Julia 1.6.0's Pkg causes Preferences to be dropped during `Pkg.test()`, so we work around +# it by explicitly creating a `test/Project.toml` which will correctly communicate any preferences +# through to the child Julia process. X-ref: https://github.com/JuliaLang/Pkg.jl/issues/2500 + +[deps] +Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" +JLLWrappers = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" +Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" +Preferences = "21216c6a-2e73-6563-6e65-726566657250" +Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" +Scratch = "6c6a2e73-6563-6170-7368-637461726353" +TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" +UserNSSandbox_jll = "b88861f7-1d72-59dd-91e7-a8cc876a4984" diff --git a/test/Sandbox.jl b/test/Sandbox.jl index 2661af4..4a1800c 100644 --- a/test/Sandbox.jl +++ b/test/Sandbox.jl @@ -7,7 +7,7 @@ if !success(`sudo -k -n true`) all_executors = filter(exe -> exe != PrivilegedUserNamespacesExecutor, all_executors) end -rootfs_dir = artifact"AlpineRootfs" +rootfs_dir = Sandbox.alpine_rootfs() for executor in all_executors if !executor_available(executor) @error("Skipping $(executor) tests, as it does not seem to be available")