Skip to content

Commit 6b7cfe3

Browse files
committed
improve README
1 parent 21a2b25 commit 6b7cfe3

File tree

2 files changed

+50
-3
lines changed

2 files changed

+50
-3
lines changed

README.md

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,53 @@
11
# ParallelTestRunner.jl
22

3+
Simple parallel test runner for Julia tests with autodiscovery.
4+
5+
## Usage
6+
7+
```julia
8+
julia> import Pkg
9+
10+
julia> Pkg.test("ParallelTestRunner"; test_args=["--help"])
11+
12+
Usage: runtests.jl [--help] [--list] [--jobs=N] [TESTS...]
13+
14+
--help Show this text.
15+
--list List all available tests.
16+
--verbose Print more information during testing.
17+
--quickfail Fail the entire run as soon as a single test errored.
18+
--jobs=N Launch `N` processes to perform tests (default: Sys.CPU_THREADS).
19+
20+
Remaining arguments filter the tests that will be executed.
21+
```
22+
23+
## Setup
24+
25+
`ParallelTestRunner` runs each file inside your `test/` concurrently and isolated.
26+
First you should remove all `include` statements that you added.
27+
28+
Then in your `test/runtests.jl` add:
29+
30+
```julia
31+
using ParallelTestRunner
32+
33+
runtests(ARGS)
34+
```
35+
36+
### Filtering
37+
38+
`runtests` takes a second argument that acts as a filter function
39+
40+
```julia
41+
function testfilter(test)
42+
if Sys.iswindows() && test == "ext/specialfunctions"
43+
return false
44+
end
45+
return true
46+
end
47+
48+
runtests(ARGS, testfilter)
49+
```
50+
351

452
## Inspiration
5-
Based on @maleadt test infrastructure for CUDA.jl and Julia Base.
53+
Based on [@maleadt](https://github.com/maleadt) test infrastructure for [CUDA.jl](https://github.com/JuliaGPU/CUDA.jl).

test/runtests.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
using Test
21
using ParallelTestRunner
32

4-
runtests(ARGS)
3+
runtests(ARGS)

0 commit comments

Comments
 (0)