Skip to content

Commit 88d7b8f

Browse files
committed
Add -Zbuild-std test
1 parent b36dd19 commit 88d7b8f

3 files changed

Lines changed: 37 additions & 2 deletions

File tree

.github/workflows/rust.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,26 @@ jobs:
6060
run: cargo test --verbose
6161
- name: Test no-rustc mode
6262
run: cargo check --no-default-features
63+
64+
nightly-integration:
65+
strategy:
66+
matrix:
67+
include:
68+
- os: ubuntu-latest
69+
host_target: x86_64-unknown-linux-gnu
70+
- os: macos-latest
71+
host_target: x86_64-apple-darwin
72+
- os: windows-latest
73+
host_target: i686-pc-windows-msvc
74+
runs-on: ${{ matrix.os }}
75+
# Run tests under a directory with a space in it to double check the windows path heuristic
76+
defaults:
77+
run:
78+
working-directory: "dir with spaces/ui test"
79+
steps:
80+
- uses: actions/checkout@v4
81+
with:
82+
path: "dir with spaces/ui test"
83+
- uses: dtolnay/rust-toolchain@nightly
84+
- name: Run ui tests
85+
run: cargo test --verbose --test integration -- --check

tests/integrations/basic-bin/Cargo.stdout

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ running 0 tests
33

44
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished
55

6+
Building dependencies ... ok
7+
tests/actual_tests/foomp.rs ... ok
68
Building dependencies ... ok
79
tests/actual_tests/foomp.rs ... ok
810

9-
test result: ok. 1 passed;
11+
test result: ok. 2 passed;
1012

tests/integrations/basic-bin/tests/ui_tests.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,18 @@ fn main() -> ui_test::color_eyre::Result<()> {
2828
config.out_dir = tmp_dir.into();
2929
config.path_stderr_filter(tmp_dir, "$$TMP");
3030

31+
// try with build-std
32+
let config_build_std = config.clone();
33+
config.comment_defaults.base().set_custom(
34+
"dependencies",
35+
DependencyBuilder {
36+
build_std: Some(String::new()),
37+
..DependencyBuilder::default()
38+
},
39+
);
40+
3141
run_tests_generic(
32-
vec![config],
42+
vec![config, config_build_std],
3343
default_file_filter,
3444
default_per_file_config,
3545
// Avoid github actions, as these would end up showing up in `Cargo.stderr`

0 commit comments

Comments
 (0)