[libgdata] tests: Remove --no-internet option in favour of trace files
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgdata] tests: Remove --no-internet option in favour of trace files
- Date: Fri, 2 Aug 2013 10:12:10 +0000 (UTC)
commit a04ac5150b25331fb7ca3ab51d3026740b9593cc
Author: Philip Withnall <philip tecnocode co uk>
Date: Tue Jul 30 13:27:49 2013 +0200
tests: Remove --no-internet option in favour of trace files
All unit test suites now support running against committed trace
files, so the --no-internet option can now be removed.
gdata/tests/common.c | 26 ++------------------------
gdata/tests/common.h | 1 -
2 files changed, 2 insertions(+), 25 deletions(-)
---
diff --git a/gdata/tests/common.c b/gdata/tests/common.c
index 4e439f0..0918a3a 100644
--- a/gdata/tests/common.c
+++ b/gdata/tests/common.c
@@ -27,9 +27,6 @@
#include "common.h"
#include "mock-server.h"
-/* %TRUE if there's no Internet connection, so we should only run local tests */
-static gboolean no_internet = FALSE;
-
/* %TRUE if interactive tests should be skipped because we're running automatically (for example) */
static gboolean no_interactive = FALSE;
@@ -65,10 +62,7 @@ gdata_test_init (int argc, char **argv)
/* Parse the custom options */
for (i = 1; i < argc; i++) {
- if (strcmp ("--no-internet", argv[i]) == 0 || strcmp ("-n", argv[i]) == 0) {
- no_internet = TRUE;
- argv[i] = (char*) "";
- } else if (strcmp ("--no-interactive", argv[i]) == 0 || strcmp ("-i", argv[i]) == 0) {
+ if (strcmp ("--no-interactive", argv[i]) == 0 || strcmp ("-i", argv[i]) == 0) {
no_interactive = TRUE;
argv[i] = (char*) "";
} else if (strcmp ("--trace-dir", argv[i]) == 0 || strcmp ("-t", argv[i]) == 0) {
@@ -89,7 +83,7 @@ gdata_test_init (int argc, char **argv)
compare_traces = TRUE;
argv[i] = (char*) "";
} else if (strcmp ("-?", argv[i]) == 0 || strcmp ("--help", argv[i]) == 0 || strcmp ("-h" ,
argv[i]) == 0) {
- /* We have to override --help in order to document --no-internet and --no-interactive
*/
+ /* We have to override --help in order to document --no-interactive and the trace
flags. */
printf ("Usage:\n"
" %s [OPTION...]\n\n"
"Help Options:\n"
@@ -103,7 +97,6 @@ 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"
- " -n, --no-internet Only execute tests which don't require
Internet connectivity\n"
" -i, --no-interactive Only execute tests which don't require
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"
@@ -154,21 +147,6 @@ gdata_test_get_mock_server (void)
}
/*
- * gdata_test_internet:
- *
- * Returns whether tests which require Internet access should be run.
- *
- * Return value: %TRUE if Internet-requiring tests should be run, %FALSE otherwise
- *
- * Since: 0.7.0
- */
-gboolean
-gdata_test_internet (void)
-{
- return (no_internet == FALSE) ? TRUE : FALSE;
-}
-
-/*
* gdata_test_interactive:
*
* Returns whether tests which require interactivity should be run.
diff --git a/gdata/tests/common.h b/gdata/tests/common.h
index c5fcac8..122608b 100644
--- a/gdata/tests/common.h
+++ b/gdata/tests/common.h
@@ -50,7 +50,6 @@ void gdata_test_init (int argc, char **argv);
GDataMockServer *gdata_test_get_mock_server (void) G_GNUC_WARN_UNUSED_RESULT;
-gboolean gdata_test_internet (void);
gboolean gdata_test_interactive (void);
guint gdata_test_batch_operation_query (GDataBatchOperation *operation, const gchar *id, GType entry_type,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]