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 <ralf.habacker@freenet.de>
This commit is contained in:
Simon McVittie 2015-11-24 01:19:27 +00:00 committed by Ralf Habacker
parent 4ddf4be03c
commit b21093478a
4 changed files with 4 additions and 4 deletions

View file

@ -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");

View file

@ -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");

View file

@ -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");

View file

@ -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;