Skip to content

Commit 1d1b3ff

Browse files
authored
Test suite: activate a temp project if we need to install Aqua.jl during the test suite
1 parent 18b7fce commit 1d1b3ff

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/ambiguous.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
original_depot_path = copy(Base.DEPOT_PATH)
66
original_load_path = copy(Base.LOAD_PATH)
77
original_env = copy(ENV)
8+
original_project = Base.active_project()
89
###
910

1011
import Pkg
@@ -13,6 +14,7 @@ import Pkg
1314
if Base.find_package("Aqua") === nothing
1415
@debug "Installing Aqua.jl for SparseArrays.jl tests"
1516
iob = IOBuffer()
17+
Pkg.activate(; temp = true)
1618
try
1719
Pkg.add("Aqua", io=iob) # Needed for custom julia version resolve tests
1820
catch
@@ -86,4 +88,6 @@ end
8688
for (k, v) in pairs(original_env)
8789
ENV[k] = v
8890
end
91+
92+
Base.set_active_project(original_project)
8993
###

0 commit comments

Comments
 (0)