diff options
author | Philip Withnall <philip.withnall@collabora.co.uk> | 2014-12-12 17:31:29 +0000 |
---|---|---|
committer | Philip Withnall <philip.withnall@collabora.co.uk> | 2014-12-12 17:36:03 +0000 |
commit | 3f0e6f8c650ba93a4c284dbbb52a86c44ce0d5b4 (patch) | |
tree | 23283500fbe2ed2b06f7fc644b0f362429d47457 | |
parent | bc16d2f822a45fa69e76fcddb7e2c9a25bee579f (diff) | |
download | libgdata-3f0e6f8c650ba93a4c284dbbb52a86c44ce0d5b4.tar.gz |
tests: Switch to non-interactive tests by default
This fixes `make check` stalling forever on requesting user input. To
run the interactive tests, the programs now need to be run with
--interactive.
-rw-r--r-- | gdata/tests/common.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gdata/tests/common.c b/gdata/tests/common.c index d73c61a9..87fd88e4 100644 --- a/gdata/tests/common.c +++ b/gdata/tests/common.c @@ -27,7 +27,7 @@ #include "common.h" /* %TRUE if interactive tests should be skipped because we're running automatically (for example) */ -static gboolean no_interactive = FALSE; +static gboolean no_interactive = TRUE; /* declaration of debug handler */ static void gdata_test_debug_handler (const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data); @@ -57,9 +57,12 @@ gdata_test_init (int argc, char **argv) /* Parse the custom options */ for (i = 1; i < argc; i++) { - if (strcmp ("--no-interactive", argv[i]) == 0 || strcmp ("-i", argv[i]) == 0) { + if (strcmp ("--no-interactive", argv[i]) == 0 || strcmp ("-ni", argv[i]) == 0) { no_interactive = TRUE; argv[i] = (char*) ""; + } else if (strcmp ("--interactive", argv[i]) == 0 || strcmp ("-i", argv[i]) == 0) { + no_interactive = FALSE; + argv[i] = (char*) ""; } else if (strcmp ("--trace-dir", argv[i]) == 0 || strcmp ("-t", argv[i]) == 0) { if (i >= argc - 1) { fprintf (stderr, "Error: Missing directory for --trace-dir option.\n"); @@ -92,7 +95,8 @@ gdata_test_init (int argc, char **argv) " -p TESTPATH Execute all tests matching TESTPATH\n" " -m {perf|slow|thorough|quick} Execute tests according modes\n" " --debug-log Debug test logging output\n" - " -i, --no-interactive Only execute tests which don't require user interaction\n" + " -ni, --no-interactive Only execute tests which don't require user interaction\n" + " -i, --interactive Execute tests including those requiring user interaction\n" " -t, --trace-dir [directory] Read/Write trace files in the specified directory\n" " -w, --write-traces Work online and write trace files to --trace-dir\n" " -c, --compare-traces Work online and compare with existing trace files in --trace-dir\n", |