Skip to content

Commit 50c2238

Browse files
committed
[cargo-nextest] execute integration tests as subprocesses
Previously, we were executing cargo-nextest in-process due to the fact that we can't replace binaries on Windows while they're running. To solve that issue, create a separate crate with a separate "cargo-nextest-dup" binary that's only used for integration tests, and is otherwise identical to the cargo-nextest binary. We're going to need this for upcoming double-spawn work.
1 parent 3c39018 commit 50c2238

File tree

11 files changed

+565
-474
lines changed

11 files changed

+565
-474
lines changed

Cargo.lock

Lines changed: 19 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
resolver = "2"
33
members = [
44
"cargo-nextest",
5+
"integration-tests",
56
"nextest-metadata",
67
"nextest-runner",
78
"nextest-filtering",

cargo-nextest/Cargo.toml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,6 @@ serde_json = "1.0.87"
4040
thiserror = "1.0.37"
4141
nextest-workspace-hack = { version = "0.1", path = "../workspace-hack" }
4242

43-
[dev-dependencies]
44-
cfg-if = "1.0.0"
45-
tempfile = "3.3.0"
46-
regex = "1.6.0"
47-
4843
[features]
4944
default = ["default-no-update", "self-update"]
5045
# Perform self-updates (enabled by default)

cargo-nextest/src/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ mod reuse_build;
2121
#[cfg(feature = "self-update")]
2222
mod update;
2323

24-
#[cfg(test)]
25-
mod tests_integration;
26-
2724
#[doc(hidden)]
2825
pub use dispatch::*;
2926
#[doc(hidden)]

cargo-nextest/src/output.rs

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -209,14 +209,6 @@ impl Default for OutputWriter {
209209
}
210210

211211
impl OutputWriter {
212-
#[cfg(test)]
213-
pub(crate) fn new_test() -> Self {
214-
Self::Test {
215-
stdout: Vec::new(),
216-
stderr: Vec::new(),
217-
}
218-
}
219-
220212
pub(crate) fn stdout_writer(&mut self) -> StdoutWriter<'_> {
221213
match self {
222214
Self::Normal => StdoutWriter::Normal {
@@ -250,24 +242,6 @@ impl OutputWriter {
250242
},
251243
}
252244
}
253-
254-
#[cfg(test)]
255-
pub(crate) fn stdout(&self) -> Option<&'_ [u8]> {
256-
match self {
257-
Self::Test { ref stdout, .. } => Some(&stdout[..]),
258-
#[cfg(test)]
259-
_ => None,
260-
}
261-
}
262-
263-
#[cfg(test)]
264-
pub(crate) fn stderr(&self) -> Option<&'_ [u8]> {
265-
match self {
266-
Self::Test { ref stderr, .. } => Some(&stderr[..]),
267-
#[cfg(test)]
268-
_ => None,
269-
}
270-
}
271245
}
272246

273247
pub(crate) enum StdoutWriter<'a> {

0 commit comments

Comments
 (0)