Skip to content

Commit e51ddb0

Browse files
authored
fix reference to options from the commandline (#22163)
* fix reference to options from the commandline * create test datafiles so the tmpDirManager can flush it
1 parent 337baba commit e51ddb0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

js/client/modules/@arangodb/testsuites/gtest.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,12 @@ function gtestRunner (testfilename, name, opts, testoptions) {
8787
options.commandSwitches = options.commandSwitches.concat(testoptions);
8888
}
8989
let results = { failed: 0, [name]: {}};
90-
let rootDir = fs.join(fs.getTempPath(), name);
91-
let testResultJsonFile = fs.join(rootDir, 'testResults.json');
9290

9391
const binary = locateGTest(testfilename);
9492
if (binary !== '') {
9593
let tmpMgr = new tmpDirMmgr('gtest', options);
94+
let rootDir = fs.join(tmpMgr.tempDir, name);
95+
let testResultJsonFile = fs.join(rootDir, 'testResults.json');
9696
let argv = [
9797
'--gtest_output=json:' + testResultJsonFile,
9898
];

js/client/modules/@arangodb/testutils/dump.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ class DumpRestoreHelper extends trs.runLocalInArangoshRunner {
140140
this.results.failed += this.results[key].failed;
141141
}
142142
});
143-
this.doCleanup = this.serverOptions.cleanup && (this.results.failed === 0) && cleanup;
143+
this.doCleanup = this.firstRunOptions.cleanup && (this.results.failed === 0) && cleanup;
144144
if (this.doCleanup) {
145145
if (this.im1 !== null) {
146146
this.im1.destructor(this.results.failed === 0);

0 commit comments

Comments
 (0)