about summary refs log tree commit diff
path: root/support
diff options
context:
space:
mode:
Diffstat (limited to 'support')
-rw-r--r--support/test-driver.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/support/test-driver.h b/support/test-driver.h
index a9710af0e1..55f355f50d 100644
--- a/support/test-driver.h
+++ b/support/test-driver.h
@@ -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