@@ -60,7 +60,7 @@ if (process.platform === 'darwin') {
60
60
assert ( executablePaths . length === 1 , `More than one application to run tests against was found. ${ executablePaths . join ( ',' ) } ` )
61
61
executablePath = executablePaths [ 0 ]
62
62
} else {
63
- throw new Error ( 'Running tests on this platform is not supported.' )
63
+ throw new Error ( '##[error] Running tests on this platform is not supported.' )
64
64
}
65
65
66
66
function prepareEnv ( suiteName ) {
@@ -91,7 +91,7 @@ function runCoreMainProcessTests (callback) {
91
91
92
92
const testEnv = Object . assign ( { } , prepareEnv ( 'core-main-process' ) , { ATOM_GITHUB_INLINE_GIT_EXEC : 'true' } )
93
93
94
- console . log ( 'Executing core main process tests' . bold . green )
94
+ console . log ( '##[command] Executing core main process tests' . bold . green )
95
95
const cp = childProcess . spawn ( executablePath , testArguments , { stdio : 'inherit' , env : testEnv } )
96
96
cp . on ( 'error' , error => { callback ( error ) } )
97
97
cp . on ( 'close' , exitCode => { callback ( null , { exitCode, step : 'core-main-process' } ) } )
@@ -105,7 +105,7 @@ for (let testFile of testFiles) {
105
105
coreRenderProcessTestSuites . push ( function ( callback ) {
106
106
107
107
const testEnv = prepareEnv ( 'core-render-process' )
108
- console . log ( `Executing core render process tests for ${ testFile } ` . bold . green )
108
+ console . log ( `##[command] Executing core render process tests for ${ testFile } ` . bold . green )
109
109
const testArguments = [
110
110
'--resource-path' , resourcePath ,
111
111
'--test' , testFile
@@ -145,17 +145,17 @@ for (let packageName in CONFIG.appMetadata.packageDependencies) {
145
145
const nodeModulesPath = path . join ( repositoryPackagePath , 'node_modules' )
146
146
let finalize = ( ) => null
147
147
if ( require ( pkgJsonPath ) . atomTestRunner ) {
148
- console . log ( `Installing test runner dependencies for ${ packageName } ` . bold . green )
148
+ console . log ( `##[command] Installing test runner dependencies for ${ packageName } ` . bold . green )
149
149
if ( fs . existsSync ( nodeModulesPath ) ) {
150
150
const backup = backupNodeModules ( repositoryPackagePath )
151
151
finalize = backup . restore
152
152
} else {
153
153
finalize = ( ) => fs . removeSync ( nodeModulesPath )
154
154
}
155
155
runApmInstall ( repositoryPackagePath )
156
- console . log ( `Executing ${ packageName } tests` . green )
156
+ console . log ( `##[command] Executing ${ packageName } tests` . green )
157
157
} else {
158
- console . log ( `Executing ${ packageName } tests` . bold . green )
158
+ console . log ( `##[command] Executing ${ packageName } tests` . bold . green )
159
159
}
160
160
const cp = childProcess . spawn ( executablePath , testArguments , { env : testEnv } )
161
161
@@ -169,7 +169,7 @@ for (let packageName in CONFIG.appMetadata.packageDependencies) {
169
169
} )
170
170
cp . on ( 'close' , exitCode => {
171
171
if ( exitCode !== 0 ) {
172
- console . log ( `Package tests failed for ${ packageName } :` . red )
172
+ console . log ( `##[error] Package tests failed for ${ packageName } :` . red )
173
173
console . log ( stderrOutput )
174
174
}
175
175
finalize ( )
@@ -183,7 +183,7 @@ function runBenchmarkTests (callback) {
183
183
const testArguments = [ '--benchmark-test' , benchmarksPath ]
184
184
const testEnv = prepareEnv ( 'benchmark' )
185
185
186
- console . log ( 'Executing benchmark tests' . bold . green )
186
+ console . log ( '##[command] Executing benchmark tests' . bold . green )
187
187
const cp = childProcess . spawn ( executablePath , testArguments , { stdio : 'inherit' , env : testEnv } )
188
188
cp . on ( 'error' , error => { callback ( error ) } )
189
189
cp . on ( 'close' , exitCode => { callback ( null , { exitCode, step : 'core-benchmarks' } ) } )
@@ -277,9 +277,9 @@ async.parallel(testSuitesToRun, function (err, results) {
277
277
const failedSteps = results . filter ( ( { exitCode} ) => exitCode !== 0 )
278
278
279
279
if ( failedSteps . length > 0 ) {
280
- console . warn ( "\n \n *** Reporting the errors that happened in all of the tests: *** \n \n" )
280
+ console . warn ( "##[error] \n \n *** Reporting the errors that happened in all of the tests: *** \n \n" )
281
281
for ( const { step} of failedSteps ) {
282
- console . error ( `Error! The '${ step } ' test step finished with a non-zero exit code` )
282
+ console . error ( `##[error] The '${ step } ' test step finished with a non-zero exit code` )
283
283
}
284
284
process . exit ( 1 )
285
285
}
0 commit comments