Skip to content

Commit

Permalink
tweak test for calling unknown libraries in --output-o mode (#34096)
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofferC authored Dec 15, 2019
1 parent ad6752b commit e467661
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions test/ccall.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1538,7 +1538,11 @@ end

# issue #34061
o_file = tempname()
run(`$(Base.julia_cmd()) --output-o=$o_file -e 'Base.reinit_stdio();
output = read(Cmd(`$(Base.julia_cmd()) --output-o=$o_file -e 'Base.reinit_stdio();
f() = ccall((:dne, :does_not_exist), Cvoid, ());
precompile(f, ())'`)
@test isfile(o_file)
f()'`; ignorestatus=true), String)
@test occursin(output, """
ERROR: could not load library "does_not_exist"
does_not_exist.so: cannot open shared object file: No such file or directory
""")
@test !isfile(o_file)

0 comments on commit e467661

Please sign in to comment.