Skip to content

Commit

Permalink
Test suite: activate a temp project if we need to install HistoricalS…
Browse files Browse the repository at this point in the history
…tdlibVersions during the test suite (#3602)
  • Loading branch information
DilumAluthge authored Aug 25, 2023
1 parent ff833e9 commit 047734e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ module PkgTestsOuter
original_depot_path = copy(Base.DEPOT_PATH)
original_load_path = copy(Base.LOAD_PATH)
original_env = copy(ENV)
original_project = Base.active_project()

module PkgTestsInner

Expand All @@ -14,6 +15,7 @@ import Pkg
if Base.find_package("HistoricalStdlibVersions") === nothing
@debug "Installing HistoricalStdlibVersions for Pkg tests"
iob = IOBuffer()
Pkg.activate(; temp = true)
try
Pkg.add("HistoricalStdlibVersions", io=iob) # Needed for custom julia version resolve tests
catch
Expand Down Expand Up @@ -109,4 +111,6 @@ for (k, v) in pairs(original_env)
ENV[k] = v
end

Base.set_active_project(original_project)

end # module

0 comments on commit 047734e

Please sign in to comment.