Skip to content

Commit a008226

Browse files
committed
Document skip-on-os metadata in tests README
Adds documentation for the new skip-on-os metadata field that allows skipping smoke-all tests on specific operating systems.
1 parent 85fec84 commit a008226

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

tests/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,30 @@ $env:QUARTO_TESTS_NO_CONFIG=$true
120120

121121
`docs/smoke-all/` is a specific folder to run some tests written directly within `.qmd`, `.md` or `.ipynb` files (but files starting with `_` will be ignored). They are run through the `smoke/smoke-all.tests.ts` script. To ease running smoke-all tests, `run-tests.sh` has a special behavior where it will run `./smoke/smoke-all.tests.ts` when passed a `.qmd`, `.md` or `.ipynb` file, not starting with `_`.
122122

123+
##### Controlling test execution with metadata
124+
125+
Smoke-all tests support metadata in the `_quarto` key to control when tests are run:
126+
127+
**Skip tests on CI:**
128+
129+
```yaml
130+
_quarto:
131+
tests-on-ci: false
132+
```
133+
134+
**Skip tests on specific operating systems:**
135+
136+
```yaml
137+
_quarto:
138+
skip-on-os: linux # Skip only on Linux
139+
skip-on-os: [linux, darwin] # Skip on Linux and macOS
140+
skip-on-os: windows # Skip only on Windows
141+
```
142+
143+
Valid OS values are: `linux`, `darwin` (macOS), `windows`
144+
145+
This is useful when tests require platform-specific dependencies or have known platform-specific issues that need separate investigation.
146+
123147
```bash
124148
# run tests for all documents in docs/smoke-all/
125149
./run-tests.sh smoke/smoke-all.tests.ts

0 commit comments

Comments
 (0)