Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disable #22425 codegen tests when running with coverage flags #22497

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions test/codegen.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# tests for codegen and optimizations

const opt_level = Base.JLOptions().opt_level
const coverage = Base.JLOptions().code_coverage != 0 || Base.JLOptions().malloc_log != 0
const Iptr = sizeof(Int) == 8 ? "i64" : "i32"

# `_dump_function` might be more efficient but it doesn't really matter here...
Expand All @@ -28,7 +29,7 @@ function test_loads_no_call(ir, load_types)
end
@test !contains(line, " call ")
load_split = split(line, " load ", limit=2)
if length(load_split) >= 2
if !coverage && length(load_split) >= 2
@test load_idx <= length(load_types)
if load_idx <= length(load_types)
@test startswith(load_split[2], "$(load_types[load_idx]),")
Expand All @@ -39,7 +40,9 @@ function test_loads_no_call(ir, load_types)
break
end
end
@test load_idx == length(load_types) + 1
if !coverage
@test load_idx == length(load_types) + 1
end
end
if opt_level > 0
# Make sure `jl_string_ptr` is inlined
Expand Down