Skip to content

Commit ec869e7

Browse files
authored
Fix a few more tests on master (#866)
* Fix a few more tests on master * Also fix CI test
1 parent a1de593 commit ec869e7

File tree

5 files changed

+19
-4
lines changed

5 files changed

+19
-4
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ jobs:
8888
# Check #697
8989
echo "Test #697"
9090
dn=$(mktemp -d)
91+
ver=$(julia -e '(!isempty(VERSION.prerelease) && VERSION.prerelease[1] == "DEV") ? println(Base.GIT_VERSION_INFO.commit) : println(VERSION)')
9192
path=$(julia -e '(!isempty(VERSION.prerelease) && VERSION.prerelease[1] == "DEV") ? println(Base.GIT_VERSION_INFO.commit) : println("refs/tags/v",VERSION)')
9293
curl -s -L https://github.com/JuliaLang/julia/archive/$path.tar.gz --output - | tar -xz -C $dn
9394
julia --project test/juliadir.jl "$dn/julia-$ver"

src/recipes.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ function _track(id, modname; modified_files=revision_queue)
8888
# Save the result (unnecessary if already in pkgdatas, but doesn't hurt either)
8989
pkgdatas[id] = pkgdata
9090
elseif modname === :Compiler
91-
compilerdir = normpath(joinpath(juliadir, "Compiler"))
91+
compilerdir = normpath(joinpath(juliadir, "Compiler", "src"))
9292
compilerdir_pre_112 = normpath(joinpath(juliadir, "base", "compiler"))
9393
isdir(compilerdir) || (compilerdir = compilerdir_pre_112)
9494
pkgdata = get(pkgdatas, id, nothing)

test/backedges.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ do_test("Backedges") && @testset "Backedges" begin
1717
src2 = src.code[idtype].args[1]
1818
methodinfo = Revise.MethodInfo()
1919
isrequired = Revise.minimal_evaluation!(methodinfo, frame, :sigs)[1]
20-
@test sum(isrequired) == length(src.code)-1 # skips the `return` at the end
20+
@test sum(isrequired) == length(src.code)-count(e->isexpr(e, :latestworld), src.code)-1 # skips the `return` at the end
2121

2222
src = """
2323
# issue #249

test/non_jl_test.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ end
4343
sleep(mtimedelay)
4444
m=MyFile(path)
4545
includet(m)
46-
yry() # comes from test/common.jl
46+
@yry() # comes from test/common.jl
4747
@test fake_lang.y() == "2"
4848
@test fake_lang.x() == "1"
4949
sleep(mtimedelay)
5050
cp(joinpath(@__DIR__, "fake_lang", "new_test.program"), path, force=true)
51-
yry()
51+
@yry()
5252
@test fake_lang.x() == "2"
5353
@test_throws MethodError fake_lang.y()
5454
finally

test/switch_version.jl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
11
using Revise, Pkg, Test
2+
3+
if isdefined(Core, :var"@latestworld")
4+
import Core: @latestworld
5+
else
6+
# In older Julia versions, there were more implicit
7+
# world age increments, so the macro is generally not
8+
# required.
9+
macro latestworld()
10+
nothing
11+
end
12+
end
13+
214
mktempdir() do thisdir
315
Pkg.activate(thisdir)
416

@@ -17,13 +29,15 @@ mktempdir() do thisdir
1729
isdefined(Base, :errormonitor) && Base.errormonitor(t)
1830
wait(Revise.revision_event)
1931
revise()
32+
@latestworld
2033
@test somemethod() === 1 # present in v2
2134
# ...and then switch back (check that it's bidirectional and also to reset state)
2235
v1_cmd = """using Pkg; Pkg.activate("."); Pkg.develop(path = joinpath("$(escape_string(dirname(@__FILE__)))", "pkgs", "PkgChange_v1"))"""
2336
t = @async run(pipeline(Cmd(`$(Base.julia_cmd()) -e $v1_cmd`; dir=$thisdir); stderr, stdout))
2437
isdefined(Base, :errormonitor) && Base.errormonitor(t)
2538
wait(Revise.revision_event)
2639
revise()
40+
@latestworld
2741
@test_throws MethodError somemethod() # not present in v1
2842
end
2943
end

0 commit comments

Comments
 (0)