You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add info to docs about using the TEST_GROUP env variable (#5058)
* Put some info in the docs about running tests
* add info in docs/contributing about running all tests within a group
* format bash code snippets
---------
Co-authored-by: Navid C. Constantinou <navidcy@users.noreply.github.com>
Copy file name to clipboardExpand all lines: docs/src/contributing.md
+9-2Lines changed: 9 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -126,13 +126,20 @@ Oceananigans or by requesting something you think is missing.
126
126
127
127
* You can test to make sure Oceananigans works by typing in `] test`. (This is equivalent to
128
128
`using Pkg; Pkg.test()`.) Doing so will run all the tests (and this can take a while).
129
-
Alternatively, you can run only one test script file by providing its name as an environment
129
+
Alternatively, we can run only one test script file by providing its name as an environment
130
130
variable. For example, to run the tests only from the `test_coriolis.jl` file we call:
131
131
132
-
```
132
+
```bash
133
133
$ TEST_FILE=test_coriolis.jl julia --project -e"using Pkg; Pkg.test()"
134
134
```
135
135
136
+
We can also run all the tests within a certain test group, as they are defined in [`test/runtest.jl`](https://github.com/CliMA/Oceananigans.jl/blob/main/test/runtests.jl).
137
+
For example, to run all unit tests we call:
138
+
139
+
```bash
140
+
$ TEST_GROUP=unit julia --project -e"using Pkg; Pkg.test()"
0 commit comments