runapptests - Allow filterung for demo app
parent
a597489c69
commit
c51ffbedd2
|
|
@ -446,6 +446,9 @@ emu.init({
|
||||||
console.log("Loading tests");
|
console.log("Loading tests");
|
||||||
let p = Promise.resolve();
|
let p = Promise.resolve();
|
||||||
let apps = apploader.apps;
|
let apps = apploader.apps;
|
||||||
|
|
||||||
|
apps.push(DEMOAPP);
|
||||||
|
|
||||||
if (process.argv.includes("--id")) {
|
if (process.argv.includes("--id")) {
|
||||||
let f = process.argv[process.argv.indexOf("--id") + 1];
|
let f = process.argv[process.argv.indexOf("--id") + 1];
|
||||||
apps = apps.filter(e=>e.id==f);
|
apps = apps.filter(e=>e.id==f);
|
||||||
|
|
@ -455,17 +458,14 @@ emu.init({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
apps.push(DEMOAPP);
|
|
||||||
|
|
||||||
p = p.then(()=>{
|
|
||||||
return runTest(DEMOTEST, testState);
|
|
||||||
});
|
|
||||||
|
|
||||||
apps.forEach(app => {
|
apps.forEach(app => {
|
||||||
var testFile = APP_DIR+"/"+app.id+"/test.json";
|
let test = DEMOTEST;
|
||||||
|
if (app.id != DEMOAPP.id){
|
||||||
|
let testFile = APP_DIR+"/"+app.id+"/test.json";
|
||||||
if (!require("fs").existsSync(testFile)) return;
|
if (!require("fs").existsSync(testFile)) return;
|
||||||
var test = JSON.parse(require("fs").readFileSync(testFile).toString());
|
test = JSON.parse(require("fs").readFileSync(testFile).toString());
|
||||||
test.app = app.id;
|
test.app = app.id;
|
||||||
|
}
|
||||||
p = p.then(()=>{
|
p = p.then(()=>{
|
||||||
return runTest(test, testState);
|
return runTest(test, testState);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue