rename test fn
This commit is contained in:
parent
602d8c4898
commit
99c5acc94f
|
|
@ -86,7 +86,7 @@ impl CommandExt for Command {
|
||||||
dir,
|
dir,
|
||||||
deadline: None,
|
deadline: None,
|
||||||
stdout: None,
|
stdout: None,
|
||||||
bypass_test_stdout: false,
|
bypass_test_capture: false,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -153,7 +153,7 @@ pub struct TestChild<T> {
|
||||||
pub child: Child,
|
pub child: Child,
|
||||||
pub stdout: Option<Lines<BufReader<ChildStdout>>>,
|
pub stdout: Option<Lines<BufReader<ChildStdout>>>,
|
||||||
pub deadline: Option<Instant>,
|
pub deadline: Option<Instant>,
|
||||||
bypass_test_stdout: bool,
|
bypass_test_capture: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T> TestChild<T> {
|
impl<T> TestChild<T> {
|
||||||
|
|
@ -194,8 +194,8 @@ impl<T> TestChild<T> {
|
||||||
|
|
||||||
/// Configures testrunner to forward stdout to the true stdout rather than
|
/// Configures testrunner to forward stdout to the true stdout rather than
|
||||||
/// fakestdout used by cargo tests.
|
/// fakestdout used by cargo tests.
|
||||||
pub fn bypass_test_stdout(mut self, cond: bool) -> Self {
|
pub fn bypass_test_capture(mut self, cond: bool) -> Self {
|
||||||
self.bypass_test_stdout = cond;
|
self.bypass_test_capture = cond;
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -230,7 +230,7 @@ impl<T> TestChild<T> {
|
||||||
// since we're about to discard this line write it to stdout so our
|
// since we're about to discard this line write it to stdout so our
|
||||||
// test runner can capture it and display if the test fails, may
|
// test runner can capture it and display if the test fails, may
|
||||||
// cause weird reordering for stdout / stderr
|
// cause weird reordering for stdout / stderr
|
||||||
if !self.bypass_test_stdout {
|
if !self.bypass_test_capture {
|
||||||
println!("{}", line);
|
println!("{}", line);
|
||||||
} else {
|
} else {
|
||||||
use std::io::Write;
|
use std::io::Write;
|
||||||
|
|
|
||||||
|
|
@ -672,7 +672,7 @@ fn create_cached_database_height(network: Network, height: Height) -> Result<()>
|
||||||
let mut child = dir
|
let mut child = dir
|
||||||
.spawn_child(&["start"])?
|
.spawn_child(&["start"])?
|
||||||
.with_timeout(timeout)
|
.with_timeout(timeout)
|
||||||
.bypass_test_stdout(true);
|
.bypass_test_capture(true);
|
||||||
|
|
||||||
let network = format!("network: {},", network);
|
let network = format!("network: {},", network);
|
||||||
child.expect_stdout(&network)?;
|
child.expect_stdout(&network)?;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue