tests/full: Use fewer cores, remove useless code, improve formatting
This commit is contained in:
parent
3e54bcba6b
commit
c44b60ce81
|
@ -147,7 +147,7 @@ if(cluster.isMaster)
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
var nr_of_cpus = Math.min(os.cpus().length - 1 || 1, tests.length);
|
var nr_of_cpus = Math.min(os.cpus().length / 2 || 1, tests.length);
|
||||||
console.log("Using %d cpus", nr_of_cpus);
|
console.log("Using %d cpus", nr_of_cpus);
|
||||||
|
|
||||||
var current_test = 0;
|
var current_test = 0;
|
||||||
|
@ -178,16 +178,6 @@ if(cluster.isMaster)
|
||||||
{
|
{
|
||||||
process.exit(code);
|
process.exit(code);
|
||||||
}
|
}
|
||||||
|
|
||||||
var remaining_tests = 0;
|
|
||||||
|
|
||||||
for(let i in cluster.workers)
|
|
||||||
{
|
|
||||||
if(cluster.workers[i].state === "online")
|
|
||||||
{
|
|
||||||
remaining_tests++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
worker.on("error", function(error)
|
worker.on("error", function(error)
|
||||||
|
@ -288,8 +278,7 @@ function run_test(test, done)
|
||||||
|
|
||||||
emulator.stop();
|
emulator.stop();
|
||||||
|
|
||||||
console.warn("Passed test: %s", test.name);
|
console.warn("Passed test: %s (took %ds)", test.name, (Date.now() - test_start) / 1000);
|
||||||
console.warn("Took %ds", (Date.now() - test_start) / 1000);
|
|
||||||
console.warn();
|
console.warn();
|
||||||
|
|
||||||
done();
|
done();
|
||||||
|
|
Loading…
Reference in a new issue