From ae533ae9b9e3b0b527cc06879755d6b944141060 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 24 Nov 2015 01:19:27 +0000 Subject: embedded tests: accept and ignore --tap argument This makes them semi-command-line-compatible with a way we can invoke the GLib-based tests to get more useful debug logs. These tests still do not actually produce TAP output yet; I tried implementing that, but it requires changing a lot of noise on stdout to come out of stderr, and there was something weird going on with subprocesses restarting the test numbering which will need further investigation before making that change. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93194 Reviewed-by: Ralf Habacker --- bus/test-launch-helper.c | 2 +- bus/test-main.c | 2 +- bus/test-system.c | 2 +- dbus/dbus-test-main.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bus/test-launch-helper.c b/bus/test-launch-helper.c index e9ba412a..c58d06eb 100644 --- a/bus/test-launch-helper.c +++ b/bus/test-launch-helper.c @@ -102,7 +102,7 @@ main (int argc, char **argv) const char *dir; DBusString config_file; - if (argc > 1) + if (argc > 1 && strcmp (argv[1], "--tap") != 0) dir = argv[1]; else dir = _dbus_getenv ("DBUS_TEST_DATA"); diff --git a/bus/test-main.c b/bus/test-main.c index 788574fe..faa63955 100644 --- a/bus/test-main.c +++ b/bus/test-main.c @@ -95,7 +95,7 @@ main (int argc, char **argv) progname = argv[0]; - if (argc > 1) + if (argc > 1 && strcmp (argv[1], "--tap") != 0) dir = argv[1]; else dir = _dbus_getenv ("DBUS_TEST_DATA"); diff --git a/bus/test-system.c b/bus/test-system.c index 5f02d0ab..2d7848c7 100644 --- a/bus/test-system.c +++ b/bus/test-system.c @@ -73,7 +73,7 @@ main (int argc, char **argv) progname = argv[0]; - if (argc > 1) + if (argc > 1 && strcmp (argv[1], "--tap") != 0) dir = argv[1]; else dir = _dbus_getenv ("DBUS_TEST_DATA"); diff --git a/dbus/dbus-test-main.c b/dbus/dbus-test-main.c index 9a80f853..08e402b9 100644 --- a/dbus/dbus-test-main.c +++ b/dbus/dbus-test-main.c @@ -51,7 +51,7 @@ main (int argc, setlocale(LC_ALL, ""); #endif - if (argc > 1) + if (argc > 1 && strcmp (argv[1], "--tap") != 0) test_data_dir = argv[1]; else test_data_dir = NULL; -- cgit v1.2.1