[libgdata] tests: Skip /service/network_error test by default



commit f8cd424a5594ed6b2680d860b33d3933f64f1c20
Author: Philip Withnall <withnall endlessm com>
Date:   Tue Jan 9 11:32:59 2018 +0000

    tests: Skip /service/network_error test by default
    
    It requires network access, so is not suitable for running on build
    machines as per Debian policy. Skip it unless running ‘slow’ tests.
    
    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=838530
    
    Signed-off-by: Philip Withnall <withnall endlessm com>

 gdata/tests/general.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/gdata/tests/general.c b/gdata/tests/general.c
index da531fe..977dc95 100644
--- a/gdata/tests/general.c
+++ b/gdata/tests/general.c
@@ -1421,6 +1421,12 @@ test_service_network_error (void)
 #endif
        GError *error = NULL;
 
+       /* Skip this test unless explicitly asked for, so that we don’t do network accesses on build machines 
by default. */
+       if (!g_test_slow ()) {
+               g_test_skip ("Test requires network access");
+               return;
+       }
+
        /* This is a little hacky, but it should work */
        service = g_object_new (GDATA_TYPE_SERVICE, NULL);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]