Skip to content

Commit 027fb6b

Browse files
Test suite: on Julia 1.6, remove LLVMExtra_jll from the MyApp/Project.toml file (#771)
* Skip broken tests on 1.6 CI * Update runtests.jl * Remove some CI jobs while debugging this PR * Update Project.toml * Update runtests.jl * Update test.yml * Apply suggestions from code review Co-authored-by: Ian Butterworth <[email protected]> --------- Co-authored-by: Ian Butterworth <[email protected]>
1 parent 4ffa03a commit 027fb6b

File tree

2 files changed

+26
-5
lines changed

2 files changed

+26
-5
lines changed

Project.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ julia = "1.6"
1919
[extras]
2020
Example = "7876af07-990d-54b4-ab0e-23690620f79a"
2121
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
22+
TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76"
2223

2324
[targets]
24-
test = ["Test", "Example"]
25+
test = ["Test", "Example", "TOML"]

test/runtests.jl

+24-4
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,36 @@ using Test
33
using Libdl
44
using Pkg
55

6+
import TOML
7+
68
ENV["JULIA_DEBUG"] = "PackageCompiler"
79

810
# Make a new depot
9-
new_depot = mktempdir()
11+
const new_depot = mktempdir()
1012
mkpath(joinpath(new_depot, "registries"))
1113
ENV["JULIA_DEPOT_PATH"] = new_depot
1214
Base.init_depot_path()
1315

14-
is_slow_ci = haskey(ENV, "CI") && Sys.ARCH == :aarch64
16+
const is_ci = tryparse(Bool, get(ENV, "CI", "")) === true
17+
const is_slow_ci = is_ci && Sys.ARCH == :aarch64
18+
const is_julia_1_6 = VERSION.major == 1 && VERSION.minor == 6
19+
20+
if is_julia_1_6
21+
@warn "This is Julia 1.6. Some tests will be skipped or modified." VERSION
22+
end
1523

16-
if haskey(ENV, "CI")
24+
if is_ci
1725
@show Sys.ARCH
1826
end
1927

28+
function remove_llvmextras(project_file)
29+
proj = TOML.parsefile(project_file)
30+
delete!(proj["deps"], "LLVMExtra_jll")
31+
open(project_file, "w") do io
32+
TOML.print(io, proj)
33+
end
34+
end
35+
2036
@testset "PackageCompiler.jl" begin
2137
@testset "create_sysimage" begin
2238
new_project = mktempdir()
@@ -65,6 +81,10 @@ end
6581
@info "starting: create_app testset" incremental filter
6682
tmp_app_source_dir = joinpath(tmp, "MyApp")
6783
cp(app_source_dir, tmp_app_source_dir)
84+
if is_julia_1_6
85+
# Issue #706 "Cannot locate artifact 'LLVMExtra'" on 1.6 so remove
86+
remove_llvmextras(joinpath(tmp_app_source_dir, "Project.toml"))
87+
end
6888
try
6989
create_app(tmp_app_source_dir, app_compiled_dir; incremental=incremental, force=true, filter_stdlibs=filter, include_lazy_artifacts=true,
7090
precompile_execution_file=joinpath(app_source_dir, "precompile_app.jl"),
@@ -118,7 +138,7 @@ end
118138
@test occursin("From worker 4:\t8", app_output)
119139
@test occursin("From worker 5:\t8", app_output)
120140

121-
if VERSION >= v"1.7.0"
141+
if VERSION >= v"1.7-"
122142
@test occursin("LLVMExtra path: ok!", app_output)
123143
end
124144
@test occursin("MKL_jll path: ok!", app_output)

0 commit comments

Comments
 (0)