Skip to content

Commit 06e22fc

Browse files
authored
Add note on how to run tests in Contributing (#474)
1 parent 1f0dc37 commit 06e22fc

File tree

1 file changed

+15
-0
lines changed
  • tutorials/docs-01-contributing-guide

1 file changed

+15
-0
lines changed

tutorials/docs-01-contributing-guide/index.qmd

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,21 @@ Look at the [issues](https://github.com/TuringLang/Turing.jl/issues) page for an
1414

1515
For more information on how the Git workflow typically functions, please see the [GitHub's introduction](https://guides.github.com/introduction/flow/) or [Julia's contribution guide](https://github.com/JuliaLang/julia/blob/master/CONTRIBUTING.md).
1616

17+
### Tests
18+
19+
Turing, like most software libraries, has a test suite. You can run the whole suite the usual Julia way with
20+
21+
```julia
22+
Pkg.test("Turing")
23+
```
24+
25+
The test suite subdivides into files in the `test` folder, and you can run only some of them using commands like
26+
27+
```julia
28+
Pkg.test("Turing"; test_args=["optim", "hmc", "--skip", "ext"])
29+
```
30+
31+
This one would run all files with "optim" or "hmc" in their path, such as `test/optimisation/Optimisation.jl`, but not files with "ext" in their path. Alternatively you can set these arguments as command line arguments when you run Julia, or otherwise set the global `ARGS` variable, and call `include("test/runtests.jl")`.
1732

1833
### Style Guide
1934

0 commit comments

Comments
 (0)