From: Tim Kientzle Date: Sat, 14 Jun 2008 14:45:42 +0000 (-0400) Subject: Flush stdout after printing the name of the test; X-Git-Tag: v2.6.0~178 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7ae64c399b8f72723d921dbb54d4bc40d8bbfd3e;p=thirdparty%2Flibarchive.git Flush stdout after printing the name of the test; this ensures that any errors from that test appear after the name of the test. Submitted by: Carey Evans SVN-Revision: 114 --- diff --git a/cpio/test/main.c b/cpio/test/main.c index ecf343cde..133f4a989 100644 --- a/cpio/test/main.c +++ b/cpio/test/main.c @@ -712,9 +712,11 @@ static int test_run(int i, const char *tmpdir) { int failures_before = failures; - fflush(stdout); - if (!quiet_flag) + if (!quiet_flag) { printf("%d: %s\n", i, tests[i].name); + fflush(stdout); + } + /* * Always explicitly chdir() in case the last test moved us to * a strange place. diff --git a/libarchive/test/main.c b/libarchive/test/main.c index da8ea821b..0b479e3ac 100644 --- a/libarchive/test/main.c +++ b/libarchive/test/main.c @@ -711,9 +711,11 @@ static int test_run(int i, const char *tmpdir) { int failures_before = failures; - fflush(stdout); - if (!quiet_flag) + if (!quiet_flag) { printf("%d: %s\n", i, tests[i].name); + fflush(stdout); + } + /* * Always explicitly chdir() in case the last test moved us to * a strange place. diff --git a/tar/test/main.c b/tar/test/main.c index 281a0c69f..23b0e1eff 100644 --- a/tar/test/main.c +++ b/tar/test/main.c @@ -712,9 +712,11 @@ static int test_run(int i, const char *tmpdir) { int failures_before = failures; - fflush(stdout); - if (!quiet_flag) + if (!quiet_flag) { printf("%d: %s\n", i, tests[i].name); + fflush(stdout); + } + /* * Always explicitly chdir() in case the last test moved us to * a strange place.