-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
hook up stdlib to the standard test running system #24701
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
Conversation
rfourquet
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good thanks! Only the makefile I didn't review.
test/choosetests.jl
Outdated
| dir = readdir(stdlib_dir) | ||
| test_file = joinpath(stdlib_dir, stdlib, "test", "runtests") | ||
| if isfile(test_file * ".jl") | ||
| unshift!(tests, test_file) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a big problem, but it seems that this algorithms will reverse the order of the stdlib tests (this cries for a replace! standard algorithm a la #22324 ;-) )
test/choosetests.jl
Outdated
| end | ||
|
|
||
| if "stdlib" in skip_tests | ||
| filter!(x -> x != "stdlib", tests) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not skip also all test names in stdlibs, like other test groups do?
test/runtests.jl
Outdated
| end | ||
|
|
||
|
|
||
| test_names = copy(tests) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems it would be cleaner to maintain only one array tests instead of two in parallel, and when the name is needed, call a function test_name on it which implements the transormation below. Or would it make things more complicated somewhere? (or the other way around, maintaining only test_names and have a function test_path or something, cf. my next comment below).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or maybe an array of pairs name => path or a Dict of that.
test/choosetests.jl
Outdated
| if "stdlib" in skip_tests | ||
| filter!(x -> x != "stdlib", tests) | ||
| elseif "stdlib" in tests | ||
| filter!(x -> x != "stdlib", tests) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
similarly here, filter out individual stdlib tests?
| if contains(test, "stdlib") && endswith(test, "runtests") | ||
| test_names[i] = split(test, "/")[end-2] | ||
| end | ||
| end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a bit funny to transorm test names to "runtest.jl" files (in "choosetest.jl"), and then back here to a name. Maybe infering the test file name could be implemented only here in this file?
|
Thanks for your comments @rfourquet. I felt the same way when I implemented it that the two array style was pretty ugly. I think I have a better design coming up. |
|
New version up, @rfourquet |
b2e4780 to
8f197bd
Compare
test/runtests.jl
Outdated
| if exit_on_error | ||
| skipped = length(tests) | ||
| empty!(tests) | ||
| skipped = length(test_data) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forgot to change back test_data to tests?
| if test in STDLIBS | ||
| test_file = joinpath(STDLIB_DIR, test, "test", "runtests") | ||
| if !isfile(test_file * ".jl") | ||
| error("Standard library $test did not provide a `test/runtests.jl` file") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may be beyond the scope of this PR, but given #24628, there may or may not be a nicer way to report the error? (I didn't investigate more this question, and definitely non-blocking).
| using Test | ||
|
|
||
| function runtests(name, isolate=true; seed=nothing) | ||
| function runtests(name, path, isolate=true; seed=nothing) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As this file is include'd, doesn't this function know about test_path ? (to avoid passing the path argument here)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I prefer to keep it explicit like this to potentially ease the use of this file in other contexts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok no problem. But maybe then as in most of the cases the name is equal to the path, there could be a default, or even better a keyword path=name. But also I find it tricky that the path is still not the real path, as ".jl" has to be added. I guess this logic comes from the use of name before, but I see no reason now that path should not contain the .jl extension. Then the default value for path would be name * ".jl".
Anyone know why |
|
hmm I think it's the side effect from #24443 on my worker. Seems there are some leftovers not control by git... [venv] % pwd
/usr/home/julia/julia-fbsd-buildbot/worker/11rel-amd64/build/stdlib
[venv] % find Distributed/
Distributed/
Distributed/src
Distributed/src/remotecall.jl.86100.cov
Distributed/src/remotecall.jl.86101.cov
Distributed/src/remotecall.jl.memI can add some |
|
Might make sense to run |
|
I was so confused because #24443 wasn't merged yet. Your explanation makes a lot of sense. Some cleanup seems to be needed but I am not sure what the best way to do it is. |
well, I just found that |
|
I'm going to |
|
config changed... let's wait for the queue. |
|
The problem are not the Also, these files exist in |
You mean the Actually, I configured buildbot with |
|
Oh, I see (and yes I meant |
Okay, I should do |
|
I would think so yes, but I am not really knowledgeable how the files are copied when building... |
|
Oh, I saw that |
|
/me going to 💤 , 🙏 it works as expected :p the build queue is quite long now(https://julia.iblis.cnmc.tw/#/builders/1)... |
|
@iblis17 Looks like what you did worked great. This should be good to go from my pov. |
* hook up stdlib to the standard test running system * fixups from review
This makes it so the standard library tests run together with the other tests in the parallel test runner.
You can now also chose what stdlib test you want to run with e.g.
make test-Profile. All stdlib tests can still be run withmake test-stdlibbut they will now run in parallel and have the nice outputFixes #24191.