Improve interactive output on GHA (#15)
Before this commit the output of the test262 step was only visible in the web interface at the end of the test run. Now it prints a status update every few seconds.
This commit is contained in:
parent
18eb603e0d
commit
a59faac8c4
1 changed files with 6 additions and 4 deletions
|
@ -1889,21 +1889,23 @@ void show_progress(int force) {
|
||||||
if (compact) {
|
if (compact) {
|
||||||
static int last_test_skipped;
|
static int last_test_skipped;
|
||||||
static int last_test_failed;
|
static int last_test_failed;
|
||||||
|
static int dots;
|
||||||
char c = '.';
|
char c = '.';
|
||||||
if (test_skipped > last_test_skipped) c = '-';
|
if (test_skipped > last_test_skipped) c = '-';
|
||||||
if (test_failed > last_test_failed) c = '!';
|
if (test_failed > last_test_failed) c = '!';
|
||||||
last_test_skipped = test_skipped;
|
last_test_skipped = test_skipped;
|
||||||
last_test_failed = test_failed;
|
last_test_failed = test_failed;
|
||||||
fputc(c, stderr);
|
fputc(c, stderr);
|
||||||
if (force)
|
if (force || ++dots % 60 == 0) {
|
||||||
fputc('\n', stderr);
|
fprintf(stderr, " %d/%d/%d\n",
|
||||||
fflush(stderr);
|
test_failed, test_count, test_skipped);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
/* output progress indicator: erase end of line and return to col 0 */
|
/* output progress indicator: erase end of line and return to col 0 */
|
||||||
fprintf(stderr, "%d/%d/%d\033[K\r",
|
fprintf(stderr, "%d/%d/%d\033[K\r",
|
||||||
test_failed, test_count, test_skipped);
|
test_failed, test_count, test_skipped);
|
||||||
fflush(stderr);
|
|
||||||
}
|
}
|
||||||
|
fflush(stderr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue