diff --git a/birdtest/birdtest.c b/birdtest/birdtest.c index cafadb2d..03fa35b0 100644 --- a/birdtest/birdtest.c +++ b/birdtest/birdtest.c @@ -35,6 +35,7 @@ bt_init(int argc, char *argv[]) { int c; + bt_verbose = 0; bt_filename = argv[0]; while ((c = getopt(argc, argv, "lcftv")) >= 0) @@ -58,7 +59,7 @@ bt_init(int argc, char *argv[]) break; case 'v': - bt_verbose = 1; + bt_verbose++; break; default: @@ -83,7 +84,7 @@ bt_init(int argc, char *argv[]) return; usage: - printf("Usage: %s [-l] [-c] [-f] [-t] [-v] []\n", argv[0]); + printf("Usage: %s [-l] [-c] [-f] [-t] [-vv] []\n", argv[0]); exit(3); } diff --git a/birdtest/birdtest.h b/birdtest/birdtest.h index 19a2d4f8..3ca8e5b8 100644 --- a/birdtest/birdtest.h +++ b/birdtest/birdtest.h @@ -30,6 +30,9 @@ void bt_test_case2(int (*fn)(void), const char *id, const char *dsc, int forked, #define bt_note(format, ...) \ do { if (bt_verbose) bt_log(format, ##__VA_ARGS__); } while (0) +#define bt_debug(format, ...) \ + do { if (bt_verbose > 1) printf(format, ##__VA_ARGS__); } while (0) + #define bt_abort() \ bt_abort_msg("Aborted at %s:%d", __FILE__, __LINE__)