Skip to content

Commit

Permalink
fix Pkg tests to not rely on Compat
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofferC committed Jun 17, 2018
1 parent ac48089 commit 8c8e789
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 105 deletions.
12 changes: 8 additions & 4 deletions stdlib/Pkg/test/repl.jl
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,10 @@ temp_pkg_dir() do project_path; cd(project_path) do
cd(joinpath(tmp, "BigProject")) do
try
pushfirst!(LOAD_PATH, Base.parse_load_path("@"))
pkg"dev Submodule"
pkg"dev Submodule2"
pkg"add Random"
pkg"add Example"
pkg"build"
@eval using BigProject
pkg"build BigProject"
Expand All @@ -285,21 +289,21 @@ temp_pkg_dir() do project_path; cd(project_path) do
pkg"test SubModule2"
pkg"test BigProject"
pkg"test"
current_json = Pkg.API.installed()["JSON"]
current_example = Pkg.API.installed()["Example"]
old_project = read("Project.toml", String)
open("Project.toml"; append=true) do io
print(io, """
[compat]
JSON = "0.16.0"
Example = "0.4.0"
"""
)
end
pkg"up"
@test Pkg.API.installed()["JSON"].minor == 16
@test Pkg.API.installed()["Example"].minor == 4
write("Project.toml", old_project)
pkg"up"
@test Pkg.API.installed()["JSON"] == current_json
@test Pkg.API.installed()["Example"] == current_example
finally
popfirst!(LOAD_PATH)
end
Expand Down
1 change: 1 addition & 0 deletions stdlib/Pkg/test/test_packages/BigProject/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
deps/buildartifact
Manifest.toml
96 changes: 0 additions & 96 deletions stdlib/Pkg/test/test_packages/BigProject/Manifest.toml

This file was deleted.

5 changes: 0 additions & 5 deletions stdlib/Pkg/test/test_packages/BigProject/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ uuid = "da7e1942-2519-11e8-2822-f5508ce758f0"
version = "0.1.0"

[deps]
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
SubModule = "0d404dc8-25d6-11e8-300e-11c8e584fb95"
SubModule2 = "2d3cad7e-26b9-11e8-3e8d-a543003d541d"

[targets.test.deps]
Example = "7876af07-990d-54b4-ab0e-23690620f79a"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

0 comments on commit 8c8e789

Please sign in to comment.