@@ -6,6 +6,7 @@ import path from 'node:path';
66import yargs from 'yargs' ;
77import { hideBin } from 'yargs/helpers' ;
88import { pick } from 'lodash' ;
9+ import createDebug from 'debug' ;
910import { execute } from './execute' ;
1011import {
1112 type PackageDetails ,
@@ -22,6 +23,8 @@ import { installMacDMG } from './installers/mac-dmg';
2223import { installMacZIP } from './installers/mac-zip' ;
2324import { installWindowsZIP } from './installers/windows-zip' ;
2425
26+ const debug = createDebug ( 'compass-smoke-tests' ) ;
27+
2528const SUPPORTED_PLATFORMS = [ 'win32' , 'darwin' , 'linux' ] as const ;
2629const SUPPORTED_ARCHS = [ 'x64' , 'arm64' ] as const ;
2730
@@ -166,9 +169,9 @@ async function run() {
166169 sandboxPath : createSandbox ( ) ,
167170 } ;
168171
169- console . log ( `Running tests in ${ context . sandboxPath } ` ) ;
172+ debug ( `Running tests in ${ context . sandboxPath } ` ) ;
170173
171- console . log (
174+ debug (
172175 'context' ,
173176 pick ( context , [
174177 'forceDownload' ,
@@ -196,11 +199,11 @@ async function run() {
196199 await uninstall ( ) ;
197200 }
198201 } finally {
199- console . log ( 'Cleaning up sandbox' ) ;
202+ debug ( 'Cleaning up sandbox' ) ;
200203 fs . rmSync ( context . sandboxPath , { recursive : true } ) ;
201204 }
202205
203- console . log ( 'update from latest release to this package' ) ;
206+ debug ( 'update from latest release to this package' ) ;
204207 const releasepath = await getLatestRelease (
205208 buildInfo . channel ,
206209 context . arch ,
@@ -223,7 +226,7 @@ async function run() {
223226 await uninstall ( ) ;
224227 }
225228 } finally {
226- console . log ( 'Cleaning up sandbox' ) ;
229+ debug ( 'Cleaning up sandbox' ) ;
227230 fs . rmSync ( context . sandboxPath , { recursive : true } ) ;
228231 }
229232}
@@ -259,7 +262,7 @@ function runTest({ appName, appPath }: RunTestOptions) {
259262
260263run ( )
261264 . then ( function ( ) {
262- console . log ( 'done' ) ;
265+ debug ( 'done' ) ;
263266 } )
264267 . catch ( function ( err ) {
265268 console . error ( err . stack ) ;
0 commit comments