Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "ReTestItems"
uuid = "817f1d60-ba6b-4fd5-9520-3cf149f6a823"
version = "1.34.1"
version = "1.35.0"

[deps]
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ If you want individual test-items to stop on their first test failure, but not s

#### Running previous failures first

You can set `runtests` to run first any test-items that failed the last time they were run by passing `failures_first=true`.
By default `runtests` uses `failures_first=true` to run first any test-items that failed the last time they were run.
This became the default in v1.35.0.

When `failures_first=true` is set, test-items are order so that previously failing test-items run first, followed by previously unseen test-items, followed by previously passing test-items.

This option can be combined with `failfast=true` to efficiently find the next failing test-item during development.
Expand Down
4 changes: 2 additions & 2 deletions src/ReTestItems.jl
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ will be run.
Defaults to the value passed to the `failfast` keyword.
If a `@testitem` sets its own `failfast` keyword, then that takes precedence.
Note that the `testitem_failfast` keyword only takes effect in Julia v1.9+ and is ignored in earlier Julia versions.
- `failures_first::Bool=false`: if `true`, first runs test items that failed the last time
- `failures_first::Bool=true`: if `true`, first runs test items that failed the last time
they ran, followed by new test items, followed by test items that passed the last time they ran.
Can also be set using the `RETESTITEMS_FAILURES_FIRST` environment variable.
"""
Expand Down Expand Up @@ -316,7 +316,7 @@ function runtests(
gc_between_testitems::Bool=parse(Bool, get(ENV, "RETESTITEMS_GC_BETWEEN_TESTITEMS", string(nworkers > 1))),
failfast::Bool=parse(Bool, get(ENV, "RETESTITEMS_FAILFAST", "false")),
testitem_failfast::Bool=parse(Bool, get(ENV, "RETESTITEMS_TESTITEM_FAILFAST", string(failfast))),
failures_first::Bool=parse(Bool, get(ENV, "RETESTITEMS_FAILURES_FIRST", "false")),
failures_first::Bool=parse(Bool, get(ENV, "RETESTITEMS_FAILURES_FIRST", "true")),
)
nworker_threads = _validated_nworker_threads(nworker_threads)
paths′ = _validated_paths(paths, validate_paths)
Expand Down
2 changes: 2 additions & 0 deletions test/integrationtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1238,6 +1238,7 @@ end
end

@testset "logs are aligned" begin
ReTestItems.reset_test_status!()
file = joinpath(TEST_FILES_DIR, "_skip_tests.jl")
c1 = IOCapture.capture() do
encased_testset(()->runtests(file))
Expand Down Expand Up @@ -1316,6 +1317,7 @@ end
@test_skip case
continue
end
ReTestItems.reset_test_status!()
c = IOCapture.capture() do
encased_testset(() -> runtests(fullpath; nworkers, testitem_timeout, retries=1, failfast=true))
end
Expand Down
Loading