[test] Interpret render tests params: --recycleMap and --shuffle

This commit is contained in:
Bruno de Oliveira Abinader
2017-08-28 18:12:19 +03:00
parent 6ee8d7bb60
commit b43d88b725

View File

@@ -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);