Skip to content

Commit

Permalink
Mark problematic tests as broken on Alpine Linux
Browse files Browse the repository at this point in the history
Fixes #26761.
  • Loading branch information
ararslan committed Jul 8, 2018
1 parent 30b21e7 commit cbc2918
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
6 changes: 5 additions & 1 deletion test/cmdlineargs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,11 @@ for precomp in ("yes", "no")
succ, out, bt = readchomperrors(`$(Base.julia_cmd()) --startup-file=no --sysimage-native-code=$precomp -E 'include("____nonexistent_file")'`)
@test !succ
@test out == ""
@test occursin("include_relative(::Module, ::String) at $(joinpath(".", "loading.jl"))", bt)
if Sys.islinux() && !Sys.isglibc() && precomp == "yes"
@test_broken occursin("include_relative(::Module, ::String) at $(joinpath(".", "loading.jl"))", bt)
else
@test occursin("include_relative(::Module, ::String) at $(joinpath(".", "loading.jl"))", bt)
end
lno = match(r"at \.[\/\\]loading\.jl:(\d+)", bt)
@test length(lno.captures) == 1
@test parse(Int, lno.captures[1]) > 0
Expand Down
15 changes: 9 additions & 6 deletions test/precompile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -276,12 +276,15 @@ try
end
""")

@test_warn "ERROR: LoadError: Declaring __precompile__(false) is not allowed in files that are being precompiled.\nStacktrace:\n [1] __precompile__" try
Base.compilecache(Base.PkgId("Baz")) # from __precompile__(false)
error("__precompile__ disabled test failed")
catch exc
isa(exc, ErrorException) || rethrow(exc)
occursin("__precompile__(false)", exc.msg) && rethrow(exc)
# This test is broken on Alpine Linux
if !Sys.islinux() || (Sys.islinux() && Sys.isglibc())
@test_warn "ERROR: LoadError: Declaring __precompile__(false) is not allowed in files that are being precompiled.\nStacktrace:\n [1] __precompile__" try
Base.compilecache(Base.PkgId("Baz")) # from __precompile__(false)
error("__precompile__ disabled test failed")
catch exc
isa(exc, ErrorException) || rethrow(exc)
occursin("__precompile__(false)", exc.msg) && rethrow(exc)
end
end

# Issue #12720
Expand Down

0 comments on commit cbc2918

Please sign in to comment.