]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Flush stdout after printing the name of the test;
authorTim Kientzle <kientzle@gmail.com>
Sat, 14 Jun 2008 14:45:42 +0000 (10:45 -0400)
committerTim Kientzle <kientzle@gmail.com>
Sat, 14 Jun 2008 14:45:42 +0000 (10:45 -0400)
this ensures that any errors from that test appear after the
name of the test.  <sigh>
Submitted by: Carey Evans

SVN-Revision: 114

cpio/test/main.c
libarchive/test/main.c
tar/test/main.c

index ecf343cde39042a7d41371906196e7264d0972ee..133f4a9893904e08c9dbbb93421f240ed1af7e39 100644 (file)
@@ -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.
index da8ea821b4d32aa407cef5c8b8b0a0ee8fbb3894..0b479e3ac1200b38b8a0129211ca251b9fd38fff 100644 (file)
@@ -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.
index 281a0c69fb072c56b55377dd98c29d6f07ae8bb0..23b0e1eff5386b09bb0c6ce8b0b8f3ce188fb12e 100644 (file)
@@ -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.