remove leading comma from macro expansion
This commit is contained in:
parent
c49555821f
commit
b2cd3374e9
@ -934,8 +934,8 @@ def main():
|
||||
if len(sys.argv) > 1 and sys.argv[1] == 'help':
|
||||
sys.argv = [sys.argv[0], '-h'] + sys.argv[2:]
|
||||
|
||||
help_triggered = (
|
||||
'-h' in sys.argv) or ('--help' in sys.argv) or (len(sys.argv) == 1)
|
||||
# help_triggered = ('-h' in sys.argv) or ('--help' in sys.argv) or (len(sys.argv) == 1)
|
||||
help_triggered = len(sys.argv) == 1 or any(x in ["-h", "--help", "--version"] for x in sys.argv)
|
||||
try:
|
||||
bootstrap(help_triggered)
|
||||
if not help_triggered:
|
||||
|
@ -69,4 +69,4 @@ pub mod ui_tests;
|
||||
pub mod unit_tests;
|
||||
pub mod unstable_book;
|
||||
pub mod walk;
|
||||
pub mod x;
|
||||
pub mod x_version;
|
||||
|
@ -53,34 +53,18 @@ fn main() {
|
||||
VecDeque::with_capacity(concurrency.get());
|
||||
|
||||
macro_rules! check {
|
||||
($p:ident) => {
|
||||
while handles.len() >= concurrency.get() {
|
||||
handles.pop_front().unwrap().join().unwrap();
|
||||
}
|
||||
|
||||
let handle = s.spawn(|| {
|
||||
let mut flag = false;
|
||||
$p::check(&mut flag);
|
||||
if (flag) {
|
||||
bad.store(true, Ordering::Relaxed);
|
||||
}
|
||||
});
|
||||
handles.push_back(handle);
|
||||
};
|
||||
|
||||
($p:ident $(, $args:expr)* ) => {
|
||||
drain_handles(&mut handles);
|
||||
|
||||
let handle = s.spawn(|| {
|
||||
let mut flag = false;
|
||||
$p::check($($args),* , &mut flag);
|
||||
$p::check($($args, )* &mut flag);
|
||||
if (flag) {
|
||||
bad.store(true, Ordering::Relaxed);
|
||||
}
|
||||
});
|
||||
handles.push_back(handle);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
check!(target_specific_tests, &src_path);
|
||||
@ -123,7 +107,7 @@ fn main() {
|
||||
check!(alphabetical, &compiler_path);
|
||||
check!(alphabetical, &library_path);
|
||||
|
||||
check!(x);
|
||||
check!(x_version);
|
||||
|
||||
let collected = {
|
||||
drain_handles(&mut handles);
|
||||
|
@ -1,9 +1,7 @@
|
||||
use std::process::Command;
|
||||
|
||||
pub fn check(_bad: &mut bool) {
|
||||
let result = Command::new("x")
|
||||
.arg("--version")
|
||||
.output();
|
||||
let result = Command::new("x").arg("--version").output();
|
||||
let output = match result {
|
||||
Ok(output) => output,
|
||||
Err(_e) => todo!(),
|
Loading…
x
Reference in New Issue
Block a user