Skip to content

Commit

Permalink
Add -Zbuild-std test
Browse files Browse the repository at this point in the history
  • Loading branch information
daxpedda committed Jun 4, 2024
1 parent b36dd19 commit 88d7b8f
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 2 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,26 @@ jobs:
run: cargo test --verbose
- name: Test no-rustc mode
run: cargo check --no-default-features

nightly-integration:
strategy:
matrix:
include:
- os: ubuntu-latest
host_target: x86_64-unknown-linux-gnu
- os: macos-latest
host_target: x86_64-apple-darwin
- os: windows-latest
host_target: i686-pc-windows-msvc
runs-on: ${{ matrix.os }}
# Run tests under a directory with a space in it to double check the windows path heuristic
defaults:
run:
working-directory: "dir with spaces/ui test"
steps:
- uses: actions/checkout@v4
with:
path: "dir with spaces/ui test"
- uses: dtolnay/rust-toolchain@nightly
- name: Run ui tests
run: cargo test --verbose --test integration -- --check
4 changes: 3 additions & 1 deletion tests/integrations/basic-bin/Cargo.stdout
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ running 0 tests

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

Building dependencies ... ok
tests/actual_tests/foomp.rs ... ok

Check failure on line 7 in tests/integrations/basic-bin/Cargo.stdout

View workflow job for this annotation

GitHub Actions / tests (ubuntu-latest, x86_64-unknown-linux-gnu)

missing line in output

bless the test to create a line containing `Building dependencies ... FAILED`

Check failure on line 7 in tests/integrations/basic-bin/Cargo.stdout

View workflow job for this annotation

GitHub Actions / nightly-integration (ubuntu-latest, x86_64-unknown-linux-gnu)

missing line in output

bless the test to create a line containing `Building dependencies ... FAILED`

Check failure on line 7 in tests/integrations/basic-bin/Cargo.stdout

View workflow job for this annotation

GitHub Actions / tests (macos-latest, x86_64-apple-darwin)

missing line in output

bless the test to create a line containing `Building dependencies ... FAILED`

Check failure on line 7 in tests/integrations/basic-bin/Cargo.stdout

View workflow job for this annotation

GitHub Actions / nightly-integration (macos-latest, x86_64-apple-darwin)

missing line in output

bless the test to create a line containing `Building dependencies ... FAILED`
Building dependencies ... ok
tests/actual_tests/foomp.rs ... ok

Check failure on line 9 in tests/integrations/basic-bin/Cargo.stdout

View workflow job for this annotation

GitHub Actions / tests (ubuntu-latest, x86_64-unknown-linux-gnu)

extraneous lines in output

remove this line and possibly later ones by blessing the test

Check failure on line 9 in tests/integrations/basic-bin/Cargo.stdout

View workflow job for this annotation

GitHub Actions / nightly-integration (ubuntu-latest, x86_64-unknown-linux-gnu)

extraneous lines in output

remove this line and possibly later ones by blessing the test

Check failure on line 9 in tests/integrations/basic-bin/Cargo.stdout

View workflow job for this annotation

GitHub Actions / tests (macos-latest, x86_64-apple-darwin)

extraneous lines in output

remove this line and possibly later ones by blessing the test

Check failure on line 9 in tests/integrations/basic-bin/Cargo.stdout

View workflow job for this annotation

GitHub Actions / nightly-integration (macos-latest, x86_64-apple-darwin)

extraneous lines in output

remove this line and possibly later ones by blessing the test

test result: ok. 1 passed;
test result: ok. 2 passed;

Check failure on line 12 in tests/integrations/basic-bin/Cargo.stdout

View workflow job for this annotation

GitHub Actions / tests (ubuntu-latest, x86_64-unknown-linux-gnu)

actual output differs from expected

this line was expected to be `FAILED TEST: tests/actual_tests/foomp.rs`

Check failure on line 12 in tests/integrations/basic-bin/Cargo.stdout

View workflow job for this annotation

GitHub Actions / nightly-integration (ubuntu-latest, x86_64-unknown-linux-gnu)

actual output differs from expected

this line was expected to be `FAILED TEST: tests/actual_tests/foomp.rs`

Check failure on line 12 in tests/integrations/basic-bin/Cargo.stdout

View workflow job for this annotation

GitHub Actions / tests (macos-latest, x86_64-apple-darwin)

actual output differs from expected

this line was expected to be `FAILED TEST: tests/actual_tests/foomp.rs`

Check failure on line 12 in tests/integrations/basic-bin/Cargo.stdout

View workflow job for this annotation

GitHub Actions / nightly-integration (macos-latest, x86_64-apple-darwin)

actual output differs from expected

this line was expected to be `FAILED TEST: tests/actual_tests/foomp.rs`
12 changes: 11 additions & 1 deletion tests/integrations/basic-bin/tests/ui_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,18 @@ fn main() -> ui_test::color_eyre::Result<()> {
config.out_dir = tmp_dir.into();
config.path_stderr_filter(tmp_dir, "$$TMP");

// try with build-std
let config_build_std = config.clone();
config.comment_defaults.base().set_custom(
"dependencies",
DependencyBuilder {
build_std: Some(String::new()),
..DependencyBuilder::default()
},
);

run_tests_generic(
vec![config],
vec![config, config_build_std],
default_file_filter,
default_per_file_config,
// Avoid github actions, as these would end up showing up in `Cargo.stderr`
Expand Down

0 comments on commit 88d7b8f

Please sign in to comment.