File tree Expand file tree Collapse file tree 4 files changed +7
-25
lines changed Expand file tree Collapse file tree 4 files changed +7
-25
lines changed Original file line number Diff line number Diff line change @@ -934,8 +934,8 @@ def main():
934
934
if len (sys .argv ) > 1 and sys .argv [1 ] == 'help' :
935
935
sys .argv = [sys .argv [0 ], '-h' ] + sys .argv [2 :]
936
936
937
- help_triggered = (
938
- '-h' in sys .argv ) or ( '-- help' in sys . argv ) or ( len ( sys .argv ) == 1 )
937
+ # help_triggered = ('-h' in sys.argv) or ('--help' in sys.argv) or (len(sys.argv) == 1)
938
+ help_triggered = len ( sys .argv ) == 1 or any ( x in [ "-h" , "-- help" , "--version" ] for x in sys .argv )
939
939
try :
940
940
bootstrap (help_triggered )
941
941
if not help_triggered :
Original file line number Diff line number Diff line change @@ -69,4 +69,4 @@ pub mod ui_tests;
69
69
pub mod unit_tests;
70
70
pub mod unstable_book;
71
71
pub mod walk;
72
- pub mod x ;
72
+ pub mod x_version ;
Original file line number Diff line number Diff line change @@ -53,34 +53,18 @@ fn main() {
53
53
VecDeque :: with_capacity ( concurrency. get ( ) ) ;
54
54
55
55
macro_rules! check {
56
- ( $p: ident) => {
57
- while handles. len( ) >= concurrency. get( ) {
58
- handles. pop_front( ) . unwrap( ) . join( ) . unwrap( ) ;
59
- }
60
-
61
- let handle = s. spawn( || {
62
- let mut flag = false ;
63
- $p:: check( & mut flag) ;
64
- if ( flag) {
65
- bad. store( true , Ordering :: Relaxed ) ;
66
- }
67
- } ) ;
68
- handles. push_back( handle) ;
69
- } ;
70
-
71
56
( $p: ident $( , $args: expr) * ) => {
72
57
drain_handles( & mut handles) ;
73
58
74
59
let handle = s. spawn( || {
75
60
let mut flag = false ;
76
- $p:: check( $( $args) , * , & mut flag) ;
61
+ $p:: check( $( $args, ) * & mut flag) ;
77
62
if ( flag) {
78
63
bad. store( true , Ordering :: Relaxed ) ;
79
64
}
80
65
} ) ;
81
66
handles. push_back( handle) ;
82
- } ;
83
-
67
+ }
84
68
}
85
69
86
70
check ! ( target_specific_tests, & src_path) ;
@@ -123,7 +107,7 @@ fn main() {
123
107
check ! ( alphabetical, & compiler_path) ;
124
108
check ! ( alphabetical, & library_path) ;
125
109
126
- check ! ( x ) ;
110
+ check ! ( x_version ) ;
127
111
128
112
let collected = {
129
113
drain_handles ( & mut handles) ;
Original file line number Diff line number Diff line change 1
1
use std:: process:: Command ;
2
2
3
3
pub fn check ( _bad : & mut bool ) {
4
- let result = Command :: new ( "x" )
5
- . arg ( "--version" )
6
- . output ( ) ;
4
+ let result = Command :: new ( "x" ) . arg ( "--version" ) . output ( ) ;
7
5
let output = match result {
8
6
Ok ( output) => output,
9
7
Err ( _e) => todo ! ( ) ,
You can’t perform that action at this time.
0 commit comments