-
-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[nextest-runner] use a setup script to seed build for integration tests
This is a really nice performance improvement on my local machine (goes from ~5s to ~3s) -- should see a similar or even better result in CI.
- Loading branch information
1 parent
c74c1bb
commit 7427008
Showing
23 changed files
with
549 additions
and
216 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,5 +8,4 @@ extern "C" { | |
#[test] | ||
fn test_multiply_two() { | ||
assert_eq!(unsafe { multiply_two(3, 3) }, 9); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright (c) The nextest Contributors | ||
// SPDX-License-Identifier: MIT OR Apache-2.0 | ||
|
||
#[track_caller] | ||
pub fn set_env_vars() { | ||
// The dynamic library tests require this flag. | ||
std::env::set_var("RUSTFLAGS", "-C prefer-dynamic"); | ||
// Set CARGO_TERM_COLOR to never to ensure that ANSI color codes don't interfere with the | ||
// output. | ||
// TODO: remove this once programmatic run statuses are supported. | ||
std::env::set_var("CARGO_TERM_COLOR", "never"); | ||
// This environment variable is required to test the #[bench] fixture. Note that THIS IS FOR | ||
// TEST CODE ONLY. NEVER USE THIS IN PRODUCTION. | ||
std::env::set_var("RUSTC_BOOTSTRAP", "1"); | ||
|
||
// Disable the tests which check for environment variables being set in `config.toml`, as they | ||
// won't be in the search path when running integration tests. | ||
std::env::set_var("__NEXTEST_NO_CHECK_CARGO_ENV_VARS", "1"); | ||
|
||
// Display empty STDOUT and STDERR lines in the output of failed tests. This | ||
// allows tests which make sure outputs are being displayed to work. | ||
std::env::set_var("__NEXTEST_DISPLAY_EMPTY_OUTPUTS", "1"); | ||
|
||
// Remove OUT_DIR from the environment, as it interferes with tests (some of them expect that | ||
// OUT_DIR isn't set.) | ||
std::env::remove_var("OUT_DIR"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// Copyright (c) The nextest Contributors | ||
// SPDX-License-Identifier: MIT OR Apache-2.0 | ||
|
||
pub mod env; | ||
pub mod nextest_cli; | ||
pub mod seed; |
Oops, something went wrong.