]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - support/test-driver.h
support: Invent verbose_printf macro
[thirdparty/glibc.git] / support / test-driver.h
index a9710af0e1cfdf110f8062538e9e0bbaab25a9ef..55f355f50ddedb0f7a729b962757e11742b1564a 100644 (file)
@@ -69,6 +69,14 @@ extern const char *test_dir;
    tests.  */
 extern unsigned int test_verbose;
 
+/* Output that is only emitted if at least one --verbose argument was
+   specified. */
+#define verbose_printf(...)                      \
+  do {                                           \
+    if (test_verbose > 0)                        \
+      printf (__VA_ARGS__);                      \
+  } while (0);
+
 int support_test_main (int argc, char **argv, const struct test_config *);
 
 __END_DECLS