Skip to content

Run previously failed tests first - #138

Merged
christiangnrd merged 10 commits into
JuliaTesting:mainfrom
christiangnrd:failfirst
Aug 3, 2026
Merged

Run previously failed tests first#138
christiangnrd merged 10 commits into
JuliaTesting:mainfrom
christiangnrd:failfirst

Conversation

@christiangnrd

@christiangnrd christiangnrd commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

This will prevent lots of wasted CI time when paired with --quickfail. Or with runs that are usually expected to fail (GPU backends on julia nightly for example)

Open to implementation feedback

Comment thread test/runtests.jl Outdated
@christiangnrd

Copy link
Copy Markdown
Collaborator Author

@giordano I haven't looked into how this'll interact with #125 but we may want to wait for that one to get merged and fix this rather than the other way around.

It's also possible that it would just work

@christiangnrd

Copy link
Copy Markdown
Collaborator Author

Marking this as draft since it seems to merge cleanly with #125 but doesn't run the failed tests first anymore. I'll fix it up after #125 is merged

@christiangnrd
christiangnrd marked this pull request as draft July 21, 2026 15:56
@christiangnrd christiangnrd added the enhancement New feature or request label Jul 28, 2026
@christiangnrd
christiangnrd force-pushed the failfirst branch 6 times, most recently from a280b01 to 6ec1f1e Compare August 2, 2026 14:09
@christiangnrd

Copy link
Copy Markdown
Collaborator Author

This feels too invasive to me... I think maybe just a new file with the test failures could work and then old versions can just ignore it

@giordano

giordano commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

This feels too invasive to me...

I do like the idea though. I also recently started using --quickfail in CI to get quicker feedback, and running previously failing tests early after pushing a possible fix would fit into the scheme of getting quick feedback. Having to rename a test file looks more like a hack to me.

@christiangnrd

Copy link
Copy Markdown
Collaborator Author

Having to rename a test file looks more like a hack to me.

I meant create a new file that just contains the test failure that way the durations data structure stays a Dict{String, Float64}.

I've pushed my proposed new implementation. Now TestHistoryEntry is only ever used for sorting and stays a Float64 for everything else, which mean I don't have to define a whole bunch of interface functions (convert, ...) when all I really want the struct for is comparison.

@christiangnrd
christiangnrd marked this pull request as ready for review August 3, 2026 20:11
@christiangnrd
christiangnrd requested a review from giordano August 3, 2026 20:22
@christiangnrd

christiangnrd commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator Author

I'm done touching this PR until review so you can safely review without worry that I'll push

Comment thread test/runtests.jl Outdated
Comment thread src/ParallelTestRunner.jl Outdated
christiangnrd and others added 3 commits August 3, 2026 18:10
Co-authored-by: Mosè Giordano <765740+giordano@users.noreply.github.com>
Comment thread src/ParallelTestRunner.jl Outdated
Comment thread src/ParallelTestRunner.jl Outdated
Comment thread test/runtests.jl

@giordano giordano left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good besides the last comment!

@christiangnrd
christiangnrd merged commit 513b0bf into JuliaTesting:main Aug 3, 2026
22 checks passed
@christiangnrd
christiangnrd deleted the failfirst branch August 3, 2026 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants