Skip to content

Commit 998a5b0

Browse files
committed
runner: use spawnSync timeout instead of own system
1 parent 5b0ffe3 commit 998a5b0

2 files changed

Lines changed: 2 additions & 17 deletions

File tree

runner/index.js

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -61,31 +61,15 @@ if (cluster.isPrimary) {
6161

6262
const worker = cluster.fork();
6363

64-
let timeout;
6564
let running;
6665
const enqueue = () => {
67-
if (timeout) clearTimeout(timeout);
6866
running = tests[queue++];
6967
if (!running) {
7068
worker.kill();
7169
return;
7270
}
7371

7472
worker.send(running);
75-
timeout = setTimeout(() => {
76-
worker.kill();
77-
result(running.file, false);
78-
79-
// cleanup tmp file
80-
const tmpFile = `test262/test/${running.file}.${engine}`;
81-
fs.unlinkSync(tmpFile);
82-
83-
if (finished === total) {
84-
resolve();
85-
} else {
86-
spawn();
87-
}
88-
}, 10000);
8973
};
9074

9175
worker.on('message', pass => {

util.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ export const $$ = (cmd, args, env = {}) => {
1616
...process.env,
1717
NO_COLOR: 1,
1818
...env
19-
}
19+
},
20+
timeout: 10000
2021
});
2122

2223
return {

0 commit comments

Comments
 (0)