Skip to content
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

Miri subtree update #116234

Merged
merged 20 commits into from
Sep 29, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Allow limiting the number of threads running in parallel
  • Loading branch information
oli-obk committed Sep 22, 2023
commit e7063679414915d6eb70905b53723a3c21f3a141
6 changes: 5 additions & 1 deletion src/tools/miri/tests/compiletest.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use colored::*;
use regex::bytes::Regex;
use std::ffi::OsString;
use std::num::NonZeroUsize;
use std::path::{Path, PathBuf};
use std::{env, process::Command};
use ui_test::{color_eyre::Result, Config, Match, Mode, OutputConflictHandling};
Expand Down Expand Up @@ -128,7 +129,10 @@ fn run_tests(mode: Mode, path: &str, target: &str, with_dependencies: bool) -> R
eprintln!(" Compiler: {}", config.program.display());
ui_test::run_tests_generic(
vec![config],
std::thread::available_parallelism().unwrap(),
std::env::var("MIRI_TEST_THREADS").map_or_else(
|_| std::thread::available_parallelism().unwrap(),
|threads| NonZeroUsize::new(threads.parse().unwrap()).unwrap(),
),
args,
// The files we're actually interested in (all `.rs` files).
ui_test::default_file_filter,
Expand Down