[test] Interpret render tests params: --recycleMap and --shuffle
This commit is contained in:
@@ -5,9 +5,21 @@ const suiteImplementation = require('./suite_implementation');
|
||||
const ignores = require('./ignores.json');
|
||||
|
||||
let tests;
|
||||
let shuffle = false;
|
||||
let recycleMap = false;
|
||||
|
||||
if (process.argv[1] === __filename && process.argv.length > 2) {
|
||||
tests = process.argv.slice(2);
|
||||
function checkParameter(param) {
|
||||
const index = tests.indexOf(param);
|
||||
if (index === -1)
|
||||
return false;
|
||||
tests.splice(index, 1);
|
||||
return true;
|
||||
}
|
||||
|
||||
suite.run('native', {tests: tests, ignores: ignores}, suiteImplementation);
|
||||
if (process.argv[1] === __filename && process.argv.length > 2) {
|
||||
tests = process.argv.slice(2).filter((value, index, self) => { return self.indexOf(value) === index; });
|
||||
shuffle = checkParameter('--shuffle');
|
||||
recycleMap = checkParameter('--recycle-map');
|
||||
}
|
||||
|
||||
suite.run('native', {tests, ignores, shuffle, recycleMap}, suiteImplementation);
|
||||
|
||||
Reference in New Issue
Block a user