@@ -80,7 +80,7 @@ module.exports = function run(args, rawArgs) {
8080 // accept the access key from command line or env variable if provided
8181 utils . setAccessKey ( bsConfig , args ) ;
8282
83- let buildReportData = ! isBrowserstackInfra ? null : await getInitialDetails ( bsConfig , args , rawArgs ) ;
83+ let buildReportData = ( turboScaleSession || ! isBrowserstackInfra ) ? null : await getInitialDetails ( bsConfig , args , rawArgs ) ;
8484
8585 // accept the build name from command line if provided
8686 utils . setBuildName ( bsConfig , args ) ;
@@ -158,11 +158,6 @@ module.exports = function run(args, rawArgs) {
158158
159159 if ( gridDetails && Object . keys ( gridDetails ) . length > 0 ) {
160160 Constants . turboScaleObj . gridDetails = gridDetails ;
161-
162- if ( gridDetails . isTrialGrid ) {
163- logger . info ( 'Will be running the build on Trial Grid. Ensure you are using connect-grid command if using a private website' ) ;
164- }
165-
166161 Constants . turboScaleObj . gridUrl = gridDetails . cypressUrl ;
167162 Constants . turboScaleObj . uploadUrl = gridDetails . cypressUrl + '/upload' ;
168163 Constants . turboScaleObj . buildUrl = gridDetails . cypressUrl + '/build' ;
@@ -212,7 +207,7 @@ module.exports = function run(args, rawArgs) {
212207
213208 //get the number of spec files
214209 markBlockStart ( 'getNumberOfSpecFiles' ) ;
215- let specFiles = utils . getNumberOfSpecFiles ( bsConfig , args , cypressConfigFile ) ;
210+ let specFiles = utils . getNumberOfSpecFiles ( bsConfig , args , cypressConfigFile , turboScaleSession ) ;
216211 markBlockEnd ( 'getNumberOfSpecFiles' ) ;
217212
218213 bsConfig [ 'run_settings' ] [ 'video_config' ] = utils . getVideoConfig ( cypressConfigFile ) ;
@@ -325,13 +320,13 @@ module.exports = function run(args, rawArgs) {
325320 logger . debug ( "Completed polling of build status" ) ;
326321
327322 // stop the Local instance
328- await utils . stopLocalBinary ( bsConfig , bs_local , args , rawArgs , buildReportData ) ;
323+ if ( ! turboScaleSession ) await utils . stopLocalBinary ( bsConfig , bs_local , args , rawArgs , buildReportData ) ;
329324
330325 // waiting for 5 secs for upload to complete (as a safety measure)
331326 await new Promise ( resolve => setTimeout ( resolve , 5000 ) ) ;
332327
333328 // download build artifacts
334- if ( exitCode != Constants . BUILD_FAILED_EXIT_CODE ) {
329+ if ( exitCode != Constants . BUILD_FAILED_EXIT_CODE && ! turboScaleSession ) {
335330 if ( utils . nonEmptyArray ( bsConfig . run_settings . downloads ) ) {
336331 logger . debug ( "Downloading build artifacts" ) ;
337332 await downloadBuildArtifacts ( bsConfig , data . build_id , args , rawArgs , buildReportData ) ;
@@ -343,7 +338,7 @@ module.exports = function run(args, rawArgs) {
343338 markBlockEnd ( 'postBuild' ) ;
344339 utils . handleSyncExit ( exitCode , data . dashboard_url ) ;
345340 } ) ;
346- } else {
341+ } else if ( ! turboScaleSession ) {
347342 let stacktraceUrl = getStackTraceUrl ( ) ;
348343 downloadBuildStacktrace ( stacktraceUrl ) . then ( ( message ) => {
349344 utils . sendUsageReport ( bsConfig , args , message , Constants . messageTypes . SUCCESS , null , buildReportData , rawArgs ) ;
@@ -359,7 +354,7 @@ module.exports = function run(args, rawArgs) {
359354 } ) ;
360355 }
361356 } ) ;
362- } else if ( utils . nonEmptyArray ( bsConfig . run_settings . downloads ) ) {
357+ } else if ( utils . nonEmptyArray ( bsConfig . run_settings . downloads && ! turboScaleSession ) ) {
363358 logger . info ( Constants . userMessages . ASYNC_DOWNLOADS . replace ( '<build-id>' , data . build_id ) ) ;
364359 }
365360
0 commit comments