diff --git a/test/common.js b/test/common.js index 7e91194cf0291e..b7e15e03156fd9 100644 --- a/test/common.js +++ b/test/common.js @@ -70,7 +70,7 @@ exports.refreshTmpDir = function() { fs.accessSync(testRoot, fs.W_OK); } catch (e) { if (e.code === 'ENOENT') { - fs.mkdirSync(testRoot); + process.exit(101); } } diff --git a/tools/test.py b/tools/test.py index 4baca769c25ee5..45e40b129aa321 100755 --- a/tools/test.py +++ b/tools/test.py @@ -152,6 +152,11 @@ def RunSingle(self, parallel, thread_id): if self.shutdown_event.is_set(): return self.lock.acquire() + if output.ShouldExit(): + self.lock.release() + PrintError("\nThe temporary folder you specified doesn't exist or" \ + " can't be written to. Take necessary actions and try again") + os._exit(1) if output.UnexpectedOutput(): if FLAKY in output.test.outcomes and self.flaky_tests_mode == DONTCARE: self.flaky_failed.append(output) @@ -497,6 +502,9 @@ def __init__(self, test, command, output, store_unexpected_output): self.store_unexpected_output = store_unexpected_output self.diagnostic = [] + def ShouldExit(self): + return self.output.exit_code == 101 + def UnexpectedOutput(self): if self.HasCrashed(): outcome = CRASH