parent
9b92e13721
commit
8c6c48595a
@ -34,7 +34,7 @@
|
||||
|
||||
|
||||
static void log_progress(int total, int passed, int failed, char* name) {
|
||||
LOGF("[%% %3d|+ %3d|- %3d]: %-50s\n", (passed + failed) / total * 100,
|
||||
LOGF("[%% %3d|+ %3d|- %3d]: %s", (passed + failed) / total * 100,
|
||||
passed, failed, name);
|
||||
}
|
||||
|
||||
@ -68,8 +68,8 @@ int main(int argc, char **argv) {
|
||||
continue;
|
||||
}
|
||||
|
||||
log_progress(total, passed, failed, task->task_name);
|
||||
rewind_cursor();
|
||||
log_progress(total, passed, failed, task->task_name);
|
||||
|
||||
if (run_task(task, TEST_TIMEOUT, 0)) {
|
||||
passed++;
|
||||
@ -77,6 +77,8 @@ int main(int argc, char **argv) {
|
||||
failed++;
|
||||
}
|
||||
}
|
||||
|
||||
rewind_cursor();
|
||||
log_progress(total, passed, failed, "Done.");
|
||||
|
||||
return 0;
|
||||
|
||||
@ -299,6 +299,6 @@ void process_cleanup(process_info_t *p) {
|
||||
|
||||
/* Move the console cursor one line up and back to the first column. */
|
||||
int rewind_cursor() {
|
||||
printf("\033[0A\r");
|
||||
printf("\033[2K\r");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -117,7 +117,7 @@ finalize:
|
||||
|
||||
/* Show error and output from processes if the test failed. */
|
||||
if (!success) {
|
||||
LOG("=============================================================\n");
|
||||
LOG("\n=============================================================\n");
|
||||
LOGF("`%s` failed: %s\n", test->task_name, errmsg);
|
||||
|
||||
for (i = 0; i < process_count; i++) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user