File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -172,11 +172,16 @@ async function main(argv) {
172172 }
173173 files . sort ( ) ;
174174
175+ if ( no_headless ) {
176+ opts [ "jobs" ] = 1 ;
177+ console . log ( "`--no-headless` option is active, disabling concurrency for running tests." ) ;
178+ }
179+
175180 console . log ( `Running ${ files . length } rustdoc-gui (${ opts [ "jobs" ] } concurrently) ...` ) ;
176181
177182 if ( opts [ "jobs" ] < 1 ) {
178183 process . setMaxListeners ( files . length + 1 ) ;
179- } else {
184+ } else if ( ! no_headless ) {
180185 process . setMaxListeners ( opts [ "jobs" ] + 1 ) ;
181186 }
182187
@@ -217,9 +222,7 @@ async function main(argv) {
217222 tests_queue . splice ( tests_queue . indexOf ( callback ) , 1 ) ;
218223 } ) ;
219224 tests_queue . push ( callback ) ;
220- if ( no_headless ) {
221- await tests_queue [ i ] ;
222- } else if ( opts [ "jobs" ] > 0 && tests_queue . length >= opts [ "jobs" ] ) {
225+ if ( opts [ "jobs" ] > 0 && tests_queue . length >= opts [ "jobs" ] ) {
223226 await Promise . race ( tests_queue ) ;
224227 }
225228 }
You can’t perform that action at this time.
0 commit comments