Skip to content

Commit 0737032

Browse files
committed
disable #22425 codegen tests when running with coverage flags
1 parent 5176ded commit 0737032

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

test/codegen.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# tests for codegen and optimizations
44

55
const opt_level = Base.JLOptions().opt_level
6+
const coverage = Base.JLOptions().code_coverage || Base.JLOptions().malloc_log
67
const Iptr = sizeof(Int) == 8 ? "i64" : "i32"
78

89
# `_dump_function` might be more efficient but it doesn't really matter here...
@@ -28,7 +29,7 @@ function test_loads_no_call(ir, load_types)
2829
end
2930
@test !contains(line, " call ")
3031
load_split = split(line, " load ", limit=2)
31-
if length(load_split) >= 2
32+
if !coverage && length(load_split) >= 2
3233
@test load_idx <= length(load_types)
3334
if load_idx <= length(load_types)
3435
@test startswith(load_split[2], "$(load_types[load_idx]),")
@@ -39,7 +40,9 @@ function test_loads_no_call(ir, load_types)
3940
break
4041
end
4142
end
42-
@test load_idx == length(load_types) + 1
43+
if !coverage
44+
@test load_idx == length(load_types) + 1
45+
end
4346
end
4447
if opt_level > 0
4548
# Make sure `jl_string_ptr` is inlined

0 commit comments

Comments
 (0)