Skip to content

Commit

Permalink
pass exitCode
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Sep 17, 2020
1 parent 8450f16 commit c48aacd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions script/test
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ function spawnTest(executablePath, testArguments, options, callback, testName, f
cp.on('close', exitCode => {
if (finalize) { finalize() } // if finalizer provided
if (exitCode !== 0) {
retryOrFailTest(stderrOutput, executablePath, testArguments, options, callback, testName, finalize)
retryOrFailTest(stderrOutput, exitCode, executablePath, testArguments, options, callback, testName, finalize)
} else {
callback(null, {
exitCode,
Expand All @@ -120,7 +120,7 @@ const retryNumber = 1 // the number of times a tests repeats
const retriedTests = new Map() // a cache of retried tests

// Retries the tests if it is timed out for a number of times. Fails the rest of the tests or those that are tried enough times.
function retryOrFailTest(stderrOutput, executablePath, testArguments, options, callback, testName, finalize) {
function retryOrFailTest(stderrOutput, exitCode, executablePath, testArguments, options, callback, testName, finalize) {
const testKey = createTestKey(executablePath, testArguments, testName)
if (isTimedOut(stderrOutput) && shouldTryAgain(testKey)) {
// retry the timed out test
Expand Down

0 comments on commit c48aacd

Please sign in to comment.