Skip to content

Commit

Permalink
rustc
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexendoo committed Feb 28, 2024
1 parent 7b9229a commit e36b3fd
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions tests/sigabrt.rs
Original file line number Diff line number Diff line change
@@ -1,27 +1,17 @@
#![feature(lazy_cell)]

use std::env;
use std::process::Command;
use std::thread;

#[test]
fn check() {
println!("{:?}", std::thread::available_parallelism());

let current_exe_path = env::current_exe().unwrap();
let deps_path = current_exe_path.parent().unwrap();
let profile_path = deps_path.parent().unwrap();

std::thread::scope(|s| {
for t in 0..std::thread::available_parallelism().unwrap().get() {
let program = profile_path.join(if cfg!(windows) {
"clippy-driver.exe"
} else {
"clippy-driver"
});
println!("{:?}", thread::available_parallelism());

thread::scope(|s| {
for t in 0..thread::available_parallelism().unwrap().get() {
s.spawn(move || {
for i in 0..5000 {
let mut c = Command::new(&program);
let mut c = Command::new("rustc");
c.arg("tests/ui/hello_world.rs");
c.arg("--out-dir=target/ui");
let out = c.output().unwrap();
Expand Down

0 comments on commit e36b3fd

Please sign in to comment.