PR and running Julia test

Hi,
I am able to build Julia locally on my computer and I would eventually like to submit a PR to Julia.
But before doing so I would like to add tests and make sure that these tests work.
Can someone let me know how do I locally:
-run tests once I have built Julia ?
-run a specific julia test file which is in the folder test/ of the source code ? As i don’t want to run all tests.
Thank you

3 Likes

That’s great! Just as building Julia is done with make, running all tests can be accomplished with make test. That’s quite the slog, however, and you can indeed run only a subset. If you’re only interested in running one test file (e.g., test/file.jl), you can use make -C test file.

Or you can just run using Test; include("test/file.jl"). That won’t work for all the test files, but it will for most of them.

Or you can just copy-paste the relevant test sets into your REPL.

All tests will run for all platforms upon submitting the PR.

4 Likes

Thank you, I’ll test that and I will also make a PR with your permission to also document your information as I just found the make test part.

3 Likes

Absolutely, great idea!

1 Like

I’d recommend using Base.runtest("file"), which optionally allows you to fix the seed (which is quite useful for reproducing stochastic errors). And that’s already documented.

5 Likes