Skip to content

Commit 2f721db

Browse files
committed
difftest: use nextest to properly filter tests, adjust ci
1 parent 8ef67fd commit 2f721db

3 files changed

Lines changed: 18 additions & 5 deletions

File tree

.cargo/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
xtask = "run --package xtask --"
33
build-test-shader = "xtask test-build"
44
compiletest = "run --release -p compiletests --"
5-
difftest = "run --release -p difftests --"
5+
difftest = "nextest run --release -P difftests -p difftests"
66
run-wasm = ["run", "--release", "-p", "run-wasm", "--"]
77

88
[target.'cfg(target_arch = "wasm32")']

.config/nextest.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[profile.default]
2+
default-filter = '!package(difftest*) & !package(compiletest*) & !package(example-runner-*)'
3+
fail-fast = false
4+
5+
[profile.difftests]
6+
default-filter = 'package(difftests)'
7+
8+
[profile.difftest-runner]
9+
default-filter = 'package(difftest-runner) | package(difftest)'

.github/workflows/ci.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ jobs:
4141
# figure out native target triple while we're at it
4242
- name: install rust-toolchain
4343
run: echo "TARGET=$(rustc --print host-tuple)" >> "$GITHUB_ENV"
44+
- name: install nextest
45+
uses: taiki-e/install-action@nextest
4446
# Fetch dependencies in a separate step to clearly show how long each part
4547
# of the testing takes
4648
- name: cargo fetch --locked
@@ -49,13 +51,13 @@ jobs:
4951
# Core crates
5052
# Compiled in --release because cargo compiletest would otherwise compile in release again.
5153
- name: rustc_codegen_spirv build
52-
run: cargo test -p rustc_codegen_spirv --release --no-default-features --features "use-installed-tools" --no-run
54+
run: cargo nextest run -p rustc_codegen_spirv --release --no-default-features --features "use-installed-tools" --no-run
5355

5456
- name: rustc_codegen_spirv test
55-
run: cargo test -p rustc_codegen_spirv --release --no-default-features --features "use-installed-tools"
57+
run: cargo nextest run -p rustc_codegen_spirv --release --no-default-features --features "use-installed-tools"
5658

5759
- name: workspace test (excluding examples)
58-
run: cargo test --release --workspace --exclude "example-runner-*" --exclude "cargo-gpu*" --no-default-features --features "use-installed-tools,clap"
60+
run: cargo nextest run --release --workspace --exclude "example-runner-*" --exclude "cargo-gpu*" --no-default-features --features "use-installed-tools,clap"
5961

6062
# Examples
6163
- name: cargo check examples
@@ -173,12 +175,14 @@ jobs:
173175
sudo apt install -y xvfb libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers
174176
- name: install rust-toolchain
175177
run: echo "TARGET=$(rustc --print host-tuple)" >> "$GITHUB_ENV"
178+
- name: install nextest
179+
uses: taiki-e/install-action@nextest
176180
- name: cargo fetch --locked
177181
run: cargo fetch --locked --target $TARGET
178182
- name: cargo fetch --locked difftests
179183
run: cargo fetch --locked --manifest-path=tests/difftests/tests/Cargo.toml --target $TARGET
180184
- name: difftests
181-
run: cargo run -p difftests --release --no-default-features --features "use-installed-tools"
185+
run: cargo nextest run -P difftests -p difftests --release --no-default-features --features "use-installed-tools"
182186

183187
cargo-gpu-os:
184188
strategy:

0 commit comments

Comments
 (0)