llvmpipe: Flush stdout on lp_test_* unit tests.
authorJosé Fonseca <jfonseca@vmware.com>
Fri, 24 Oct 2014 18:54:28 +0000 (19:54 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Fri, 24 Oct 2014 20:35:09 +0000 (21:35 +0100)
So that the order of test messages and gallivm/llvmpipe debug output is
preserved.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/gallium/drivers/llvmpipe/lp_test_arit.c
src/gallium/drivers/llvmpipe/lp_test_format.c

index 660ad4db02e7dda1714c8f7e523c716689bdee4c..3fc64ce691deeac7ec0535efa65760b424dee8d2 100644 (file)
@@ -395,6 +395,7 @@ test_unary(unsigned verbose, FILE *fp, const struct unary_test_t *test)
             printf("%s(%.9g): ref = %.9g, out = %.9g, precision = %f bits, %s\n",
                   test->name, in[i], ref, out[i], precision,
                   pass ? "PASS" : "FAIL");
+            fflush(stdout);
          }
 
          if (!pass) {
index cdacb1ba6b90e069da0cc14fb39038e9689ad4ed..a4b3b564d65b2decf64e9e0bd987a4a16be47556 100644 (file)
@@ -156,6 +156,7 @@ test_format_float(unsigned verbose, FILE *fp,
          if (first) {
             printf("Testing %s (float) ...\n",
                    desc->name);
+            fflush(stdout);
             first = FALSE;
          }
 
@@ -194,6 +195,7 @@ test_format_float(unsigned verbose, FILE *fp,
                          test->unpacked[i][j][1],
                          test->unpacked[i][j][2],
                          test->unpacked[i][j][3]);
+                  fflush(stdout);
                   success = FALSE;
                }
             }