Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Commit c46c689

Browse files
committed
fix(ci): Show progress when running tests.
CircleCI will timeout the test if it doesn't see any output for 10 minutes. This prints out a '.' with every bit of stdio input to show that we're making progress.
1 parent 530ca59 commit c46c689

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

scripts/test/test_util.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,17 @@ var CommandlineTest = function(command) {
7979
test_process = child_process.spawn(args[0], args.slice(1));
8080

8181
test_process.stdout.on('data', function(data) {
82+
process.stdout.write('.');
8283
output += data;
8384
});
8485

8586
test_process.stderr.on('data', function(data) {
87+
process.stdout.write('.');
8688
output += data;
8789
});
8890
} else {
89-
test_process = child_process.spawn(args[0], args.slice(1), {stdio: 'inherit'});
91+
test_process = child_process
92+
.spawn(args[0], args.slice(1), {stdio: 'inherit', stderr: 'inherit'});
9093
}
9194

9295
test_process.on('error', function(err) {
@@ -209,10 +212,10 @@ exports.Executor = function() {
209212
if (i < tests.length) {
210213
console.log('running: ' + tests[i].command_);
211214
tests[i].run().then(function() {
212-
console.log('>>> \033[1;32mpass\033[0m');
215+
console.log('\n>>> \033[1;32mpass\033[0m');
213216
}, function(err) {
214217
failed = true;
215-
console.log('>>> \033[1;31mfail: ' + err.toString() + '\033[0m');
218+
console.log('\n>>> \033[1;31mfail: ' + err.toString() + '\033[0m');
216219
}).fin(function() {
217220
runTests(i + 1);
218221
}).done();

0 commit comments

Comments
 (0)