Skip to content

Commit d081aca

Browse files
committed
[site] some edits
1 parent 4ca3c19 commit d081aca

File tree

3 files changed

+50
-22
lines changed

3 files changed

+50
-22
lines changed

site/src/docs/configuration/index.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,7 @@ icon: material/tune
66

77
cargo-nextest supports repository-specific configuration at the location `.config/nextest.toml` from the Cargo workspace root. The location of the configuration file can be overridden with the `--config-file` option.
88

9-
For a comprehensive list of all configuration parameters, see the [Configuration reference](reference.md).
10-
11-
The default configuration shipped with cargo-nextest is:
12-
13-
```bash exec="true" result="toml"
14-
cat ../nextest-runner/default-config.toml
15-
```
9+
For a comprehensive list of all configuration parameters, including default values, see [_Configuration reference_](reference.md).
1610

1711
## Profiles
1812

@@ -70,9 +64,9 @@ Configuration is resolved in the following order:
7064
```
7165
then failing tests are retried up to 5 times.
7266
7. Tool-specific configuration for the `default` profile.
73-
8. The default configuration listed above, which is that tests are never retried.
67+
8. The [default configuration](reference.md#default-configuration), which is that tests are never retried.
7468

7569
## See also
7670

7771
- [Configuration reference](reference.md) - comprehensive list of all configuration parameters
78-
- [Per-test overrides](per-test-overrides.md) - customize settings for specific tests
72+
- [Per-test settings](per-test-overrides.md) - customize settings for specific tests

site/src/docs/configuration/reference.md

Lines changed: 46 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,18 @@ This page provides a comprehensive reference of all configuration parameters ava
99

1010
For more information about how configuration works, see the [main configuration page](index.md).
1111

12+
## Configuration file locations
13+
14+
Configuration is loaded in the following order (higher priority overrides lower):
15+
16+
1. Repository config (`.config/nextest.toml`)
17+
2. Tool-specific configs (specified via `--tool-config-file`)
18+
3. Default embedded config
19+
20+
Tool-specific configs allow tools to provide their own nextest configuration that integrates with repository settings.
21+
22+
For more information about configuration hierarchy, see thhe [_Hierarchical configuration_](index.md#hierarchical-configuration).
23+
1224
## Top-level configuration
1325

1426
These parameters are specified at the root level of the configuration file.
@@ -84,7 +96,7 @@ Profiles are configured under `[profile.<name>]`. The default profile is called
8496
- **Type**: Array of strings
8597
- **Description**: Extra arguments to pass to test binaries
8698
- **Documentation**: [_Extra arguments_](extra-args.md)
87-
- **Default*: `[]`: no extra arguments
99+
- **Default**: `[]`: no extra arguments
88100
- **Example**: `run-extra-args = ["--nocapture"]`
89101

90102
### Retry configuration
@@ -306,8 +318,6 @@ All profile-level settings can be overridden:
306318
- `junit.store-success-output`
307319
- `junit.store-failure-output`
308320

309-
For detailed information, see [_Per-test overrides_](per-test-overrides.md).
310-
311321
## Test group configuration
312322

313323
Custom test groups are defined under `[test-groups.<name>]` sections.
@@ -346,6 +356,12 @@ For detailed information, see [_Setup scripts_](setup-scripts.md).
346356
- **Type**: String (duration) or object
347357
- **Description**: Timeout configuration for the setup script
348358
- **Default**: No timeout
359+
- **Examples**:
360+
```toml
361+
slow-timeout = "30s"
362+
# or
363+
slow-timeout = { period = "60s", terminate-after = 1, grace-period = "5s" }
364+
```
349365

350366
#### `scripts.setup.<name>.leak-timeout`
351367

@@ -421,38 +437,56 @@ At least one of these filters must be specified.
421437
- **Type**: String or object
422438
- **Description**: Platform specification for when scripts apply
423439
- **Documentation**: [_Specifying platforms_](specifying-platforms.md)
440+
- **Default**: Scripts apply to all platforms
441+
- **Examples**:
442+
```toml
443+
platform = "x86_64-unknown-linux-gnu"
444+
# or
445+
platform = { host = "cfg(unix)", target = "aarch64-apple-darwin" }
446+
```
424447

425448
#### `filter`
426449

427450
- **Type**: String (filterset expression)
428451
- **Description**: Test filter for when scripts apply
429452
- **Documentation**: [_Filterset DSL_](../filtersets/index.md)
453+
- **Default**: Scripts apply to all tests
454+
- **Example**: `filter = 'test(integration_test)'`
430455

431456
### Profile script instructions
432457

458+
At least one instruction must be specified.
459+
433460
#### `setup`
434461

435462
- **Type**: String or array of strings
436463
- **Description**: Setup script(s) to run
464+
- **Documentation**: [_Setup scripts_](setup-scripts.md)
465+
- **Examples**:
466+
```toml
467+
setup = "my-setup"
468+
# or
469+
setup = ["setup1", "setup2"]
470+
```
437471

438472
#### `list-wrapper`
439473

440474
- **Type**: String
441475
- **Description**: Wrapper script to use during test listing
476+
- **Documentation**: [_Wrapper scripts_](wrapper-scripts.md)
477+
- **Example**: `list-wrapper = "my-list-wrapper"`
442478

443479
#### `run-wrapper`
444480

445481
- **Type**: String
446482
- **Description**: Wrapper script to use during test execution
483+
- **Documentation**: [_Wrapper scripts_](wrapper-scripts.md)
484+
- **Example**: `run-wrapper = "my-run-wrapper"`
447485

448-
## Configuration file precedence
449-
450-
Configuration is loaded in the following order (higher priority overrides lower):
451-
452-
1. Repository config (`.config/nextest.toml`)
453-
2. Tool-specific configs (specified via `--tool-config-file`)
454-
3. Default embedded config
486+
## Default configuration
455487

456-
Tool-specific configs allow tools to provide their own nextest configuration that integrates with repository settings.
488+
The default configuration shipped with cargo-nextest is:
457489

458-
For more information about configuration hierarchy, see the [_Hierarchical configuration_](index.md#hierarchical-configuration).
490+
```bash exec="true" result="toml"
491+
cat ../nextest-runner/default-config.toml
492+
```

site/src/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Welcome to the home page for **cargo-nextest**, a next-generation test runner fo
8484

8585
Install cargo-nextest for your platform using the [pre-built binaries](docs/installation/pre-built-binaries.md).
8686

87-
Run all tests in a workspace:
87+
For most Rust projects, nextest works out of the box. To run all tests in a workspace:
8888

8989
```
9090
cargo nextest run

0 commit comments

Comments
 (0)