From 8bdb2aaeea59e5b0c06980cee232be31490833c0 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Mon, 23 Nov 2015 18:50:48 +0100 Subject: [PATCH] nmtst: detect whether the test runs as tap test Same as gtestutils does, look for --tap command line argument. (cherry picked from commit c8174f0f9f2a38f0022ef49fb905d3b891b97e85) --- include/nm-test-utils.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/nm-test-utils.h b/include/nm-test-utils.h index 2cec325bbe..354f7efaf3 100644 --- a/include/nm-test-utils.h +++ b/include/nm-test-utils.h @@ -142,6 +142,7 @@ struct __nmtst_internal gboolean assert_logging; gboolean no_expect_message; gboolean test_quick; + gboolean test_tap_log; char *sudo_cmd; char **orig_argv; }; @@ -347,6 +348,8 @@ __nmtst_init (int *argc, char ***argv, gboolean assert_logging, const char *log_ || !strcmp (*(a+1), "slow") || !strcmp (*(a+1), "thorough")))) test_quick_argv = TRUE; + else if (strcmp (*a, "--tap") == 0) + __nmtst_internal.test_tap_log = TRUE; } }