Skip to content

Run test in serial by default to not take all memory #159

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 29, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,15 @@ fn run_bindgen_tests() {
}
});

// First spawn all child processes and collect them, then wait on each
// one. This runs the tests in parallel rather than serially.
// Spawn one child at a time and wait on it as number of process
// is the number of test files.

let children: Vec<_> = tests.map(|entry| {
let child = spawn_run_bindgen(run_bindgen.clone(), bindgen.clone(), entry.path());
(entry.path(), child)
})
.collect();
let children = tests.map(|entry| {
let child = spawn_run_bindgen(run_bindgen.clone(), bindgen.clone(), entry.path());
(entry.path(), child)
});

let failures: Vec<_> = children.into_iter()
let failures: Vec<_> = children
.filter_map(|(path, mut child)| {
let passed = child.wait()
.expect("Should wait on child process")
Expand Down