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():
934934 if len (sys .argv ) > 1 and sys .argv [1 ] == 'help' :
935935 sys .argv = [sys .argv [0 ], '-h' ] + sys .argv [2 :]
936936
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 )
939939 try :
940940 bootstrap (help_triggered )
941941 if not help_triggered :
Original file line number Diff line number Diff line change @@ -69,4 +69,4 @@ pub mod ui_tests;
6969pub mod unit_tests;
7070pub mod unstable_book;
7171pub 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() {
5353 VecDeque :: with_capacity ( concurrency. get ( ) ) ;
5454
5555 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-
7156 ( $p: ident $( , $args: expr) * ) => {
7257 drain_handles( & mut handles) ;
7358
7459 let handle = s. spawn( || {
7560 let mut flag = false ;
76- $p:: check( $( $args) , * , & mut flag) ;
61+ $p:: check( $( $args, ) * & mut flag) ;
7762 if ( flag) {
7863 bad. store( true , Ordering :: Relaxed ) ;
7964 }
8065 } ) ;
8166 handles. push_back( handle) ;
82- } ;
83-
67+ }
8468 }
8569
8670 check ! ( target_specific_tests, & src_path) ;
@@ -123,7 +107,7 @@ fn main() {
123107 check ! ( alphabetical, & compiler_path) ;
124108 check ! ( alphabetical, & library_path) ;
125109
126- check ! ( x ) ;
110+ check ! ( x_version ) ;
127111
128112 let collected = {
129113 drain_handles ( & mut handles) ;
Original file line number Diff line number Diff line change 11use std:: process:: Command ;
22
33pub 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 ( ) ;
75 let output = match result {
86 Ok ( output) => output,
97 Err ( _e) => todo ! ( ) ,
You can’t perform that action at this time.
0 commit comments