improve test/travis-ufuzz.js (#2786)

- use more RAM
- show progress in console
- report failure as job status
This commit is contained in:
Alex Lam S.L
2018-01-15 15:08:35 +08:00
committed by GitHub
parent 2b6657e967
commit f96929c031

View File

@@ -34,10 +34,24 @@ if (process.argv.length > 2) {
}));
})();
} else {
var child = require("child_process").spawn("node", [ "test/ufuzz" ], {
stdio: [ "ignore", "ignore", 1 ]
var child = require("child_process").spawn("node", [
"--max-old-space-size=2048",
"test/ufuzz"
], {
stdio: [ "ignore", "pipe", "pipe" ]
});
var keepAlive = setInterval(console.log, 5 * 60 * 1000);
var line = "";
child.stdout.on("data", function(data) {
line += data;
});
child.stderr.on("data", function() {
process.exitCode = (process.exitCode || 0) + 1;
}).pipe(process.stdout);
var keepAlive = setInterval(function() {
var end = line.lastIndexOf("\r");
console.log(line.slice(line.lastIndexOf("\r", end - 1) + 1, end));
line = line.slice(end + 1);
}, 5 * 60 * 1000);
setTimeout(function() {
clearInterval(keepAlive);
child.kill();