Closed mithro closed 11 years ago
tansell@tansell-x220-l:~/gst/gst-switch$ git diff
diff --git a/tests/test_switch_server.c b/tests/test_switch_server.c
index 90d2568..765c496 100644
--- a/tests/test_switch_server.c
+++ b/tests/test_switch_server.c
@@ -471,9 +471,17 @@ testcase_second_timer (testcase *t)
static gpointer
testcase_run (testcase *t)
{
+ int cols = 0;
+ if (getenv("COLS") != NULL)
+ cols = atoi(getenv("COLS"));
+ if (cols <= 1)
+ cols = 80;
+
g_mutex_init (&t->lock);
- g_print ("Running %s (%d seconds)\n", t->name, t->live_seconds);
+ g_print ("\r%*s ", cols, " ");
+ g_print ("\rRunning %s\n%*s (%5d seconds)", t->name, cols-16, " ", t->live_seconds);
+
t->pass = TRUE; // assume everything is ok
t->mainloop = g_main_loop_new (NULL, TRUE);
if (testcase_launch_pipeline (t)) {
This patch doesn't work when multiple tests run in parallel.
IE The output should look like
This can be calculated by doing the following
$ echo -e '12345\b6' 12346