1
0
Fork 0

We can simplify extra arguments now that we work with objects for argv all over the place.

This commit is contained in:
Willi Goesgens 2015-04-15 10:21:32 +02:00
parent 950e05787b
commit feda1119b4
1 changed files with 4 additions and 15 deletions

View File

@ -271,26 +271,15 @@ function startInstance (protocol, options, addArgs, testname) {
appDir = fs.join(tmpDataDir, "apps"); appDir = fs.join(tmpDataDir, "apps");
fs.makeDirectoryRecursive(tmpDataDir); fs.makeDirectoryRecursive(tmpDataDir);
instanceInfo.tmpDataDir = tmpDataDir; instanceInfo.tmpDataDir = tmpDataDir;
var optionsExtraArgs = []; var optionsExtraArgs = {};
if (typeof(options.extraargs) === 'object') { if (typeof(options.extraargs) === 'object') {
if (_.isArray(options.extraargs)) { optionsExtraArgs = options.extraargs;
optionsExtraArgs = options.extraargs;
}
else {
optionsExtraArgs = optionsExtraArgs.concat(toArgv(options.extraargs));
}
} }
var endpoint; var endpoint;
var pos; var pos;
var valgrindopts = {}; var valgrindopts = {};
if (typeof(options.valgrindargs) === 'object') { if (typeof(options.valgrindargs) === 'object') {
if (_.isArray(options.valgrindargs)) { valgrindopts = options.valgrindargs;
valgrindopts = options.valgrindargs;
}
else {
valgrindopts = _.extend(valgrindopts, options.valgrindargs);
}
} }
var dispatcher; var dispatcher;
@ -377,7 +366,7 @@ function startInstance (protocol, options, addArgs, testname) {
testfn += '_' ; testfn += '_' ;
} }
testfn += testname; testfn += testname;
valgrindopts["xml-file"] = testfn + '.%p.xml'; valgrindopts["xml-file"] = testfn + '.%p.xml';
valgrindopts["log-file"] = testfn + '.%p.valgrind.log'; valgrindopts["log-file"] = testfn + '.%p.valgrind.log';
// Sequence: Valgrind arguments; binary to run; options to binary: // Sequence: Valgrind arguments; binary to run; options to binary: