Skip to content

Commit

Permalink
Update src/persistent_tasks.jl
Browse files Browse the repository at this point in the history
Co-authored-by: Max Horn <max@quendi.de>
  • Loading branch information
timholy and fingolfin authored Sep 21, 2023
1 parent ea3cd14 commit 61998f2
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/persistent_tasks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,18 @@ to launch the tasks and cleanly shut them down.
- `tmax::Real`: the maximum time (in seconds) to wait after loading the
package before forcibly shutting down the precompilation process (triggering
a test failure).
- `broken::Bool = false`: If true, it uses `@test_broken` instead of
`@test`.
"""
function test_persistent_tasks(package::PkgId; tmax = 10, fails::Bool = false)
function test_persistent_tasks(package::PkgId; tmax = 10, broken::Bool = false)
@testset "$package persistent_tasks" begin
result = root_project_or_failed_lazytest(package)
result isa LazyTestResult && return result
@test fails precompile_wrapper(result, tmax)
if broken
@test_broken precompile_wrapper(result, tmax)

Check warning on line 79 in src/persistent_tasks.jl

View check run for this annotation

Codecov / codecov/patch

src/persistent_tasks.jl#L79

Added line #L79 was not covered by tests
else
@test precompile_wrapper(result, tmax)
end
end
end

Expand Down

0 comments on commit 61998f2

Please sign in to comment.