Skip to content

Conversation

@luraess
Copy link
Member

@luraess luraess commented Jan 12, 2026

Following up on switching to ParallelTestRunner.jl as testing infra in #876 , there are several points that were not fully resolved such as:

  • conflicts in argument parsing between the custom mechanism implemented for ReTestItems and ParallelTestRunners, making it impossible to e.g. select the number of workers else than from setting the CPU threads;
  • command line options https://juliatesting.github.io/ParallelTestRunner.jl/dev/#Command-Line-Options would have no effect;
  • GPUArrays test were hardcoded while we actually want to dynamically discover them to avoid missing new additions/deletions/renaming

We now only miss the actual way of selecting tests based on some pre-defined categories as it "used to be":

"core", "device", "hip", "external", "gpuarrays", "kernelabstractions", "wmma", "enzyme"

For this reason, I partly renamed the tests as one could now pass either or combination of those terms in order to trigger similar behaviour as it used to be prior to #876 , e.g.,

import Pkg
Pkg.test("AMDGPU"; test_args=`--jobs=4 core device`)

without clashing with ParallelTestRunner setup. If there is a better way to address this last bit without too much of a machinery, then we could give it a shot.

In any case, feedback welcome!

@luraess luraess requested a review from gbaraldi January 12, 2026 21:52
test/runtests.jl Outdated
return true, val
# Force 4 workers if running on buildkite
if parse(Bool, get(ENV, "BUILDKITE", "false"))
jobs_pos = findfirst(arg -> startswith(arg, "--jobs"), ARGS)
Copy link
Contributor

Choose a reason for hiding this comment

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

Very minor change:

Suggested change
jobs_pos = findfirst(arg -> startswith(arg, "--jobs"), ARGS)
jobs_pos = findfirst(startswith("--jobs"), ARGS)

Also, you aren't really interested in the position, so you can also do something like

if !any(startswith("--jobs"), ARGS)
   push!(ARGS, "--jobs=4")
end

(similarly below)

test/runtests.jl Outdated
Comment on lines 57 to 59
# Hostcall tests must run on main thread (not in parallel workers)
delete!(testsuite, "device/hostcall")
delete!(testsuite, "device/output")
Copy link
Contributor

Choose a reason for hiding this comment

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

Just for reference, there's interest in having a way to specify serial tests: JuliaTesting/ParallelTestRunner.jl#77. I discussed with Valentin a way to implement it, but haven't found the time to do it (my need for this feature shifted, at least in the short term, but I think it'd still be nice to have, and I may still need it later)

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for the heads-up. I will leave things for now, and happy to move to the new implementation when available for use. I'll leave a comment in the file with link to the issue.

@gbaraldi
Copy link
Member

Thanks for the improvements. LGTM

@luraess
Copy link
Member Author

luraess commented Jan 13, 2026

Thanks. I will wait until CI runs and then merge.

@luraess luraess merged commit f3957da into master Jan 13, 2026
3 checks passed
@luraess luraess deleted the lr/improve-test branch January 13, 2026 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants