summaryrefslogtreecommitdiff
path: root/tests/auth-test.c
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2014-02-17 22:29:44 -0500
committerDan Winship <danw@gnome.org>2014-02-17 22:35:04 -0500
commit2b0de6b7de7537c7d36ab33a7e5cf0e274ea3e23 (patch)
tree23fac5bb11876b8b5701e4d1e4d25ac05414d32f /tests/auth-test.c
parenta70ea67ade04ffc8048c93308d88ae70028dcf38 (diff)
downloadlibsoup-2b0de6b7de7537c7d36ab33a7e5cf0e274ea3e23.tar.gz
tests: skip individual tests rather than whole test programs
Use g_skip_test() to skip individual tests rather than just returning status 77 from the test program as a whole. In several cases, we still end up skipping more than necessary, due to test cases that need to be split up more. Remove the "MISSING_REGRESSION_TESTS_PACKAGES" functionality, since the skipped tests are now pointed out explicitly.
Diffstat (limited to 'tests/auth-test.c')
-rw-r--r--tests/auth-test.c28
1 files changed, 16 insertions, 12 deletions
diff --git a/tests/auth-test.c b/tests/auth-test.c
index c1825205..35b05cc7 100644
--- a/tests/auth-test.c
+++ b/tests/auth-test.c
@@ -2,8 +2,6 @@
#include "test-utils.h"
-#ifdef HAVE_APACHE
-
static const char *base_uri;
static GMainLoop *loop;
@@ -294,6 +292,8 @@ do_pipelined_auth_test (void)
char *uri;
int i;
+ SOUP_TEST_SKIP_IF_NO_APACHE;
+
debug_printf (1, "Testing pipelined auth (bug 271540):\n");
session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, NULL);
@@ -445,6 +445,8 @@ do_digest_expiration_test (void)
SoupSession *session;
char *uri;
+ SOUP_TEST_SKIP_IF_NO_APACHE;
+
debug_printf (1, "\nTesting digest nonce expiration:\n");
session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, NULL);
@@ -549,6 +551,8 @@ do_async_auth_test (void)
int remaining;
gboolean been_there;
+ SOUP_TEST_SKIP_IF_NO_APACHE;
+
debug_printf (1, "\nTesting async auth:\n");
loop = g_main_loop_new (NULL, TRUE);
@@ -820,6 +824,8 @@ do_select_auth_test (void)
SoupAuthDomain *basic_auth_domain, *digest_auth_domain;
SoupURI *uri;
+ SOUP_TEST_SKIP_IF_NO_APACHE;
+
debug_printf (1, "\nTesting selection among multiple auths:\n");
/* It doesn't seem to be possible to configure Apache to serve
@@ -976,6 +982,8 @@ do_auth_close_test (void)
SoupURI *uri;
AuthCloseData acd;
+ SOUP_TEST_SKIP_IF_NO_APACHE;
+
debug_printf (1, "\nTesting auth when server times out connection:\n");
server = soup_test_server_new (FALSE);
@@ -1033,6 +1041,8 @@ do_infinite_auth_test (void)
char *uri;
int timeout;
+ SOUP_TEST_SKIP_IF_NO_APACHE;
+
debug_printf (1, "\nTesting broken infinite-loop auth:\n");
session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, NULL);
@@ -1089,6 +1099,8 @@ do_disappearing_auth_test (void)
SoupSession *session;
int counter;
+ SOUP_TEST_SKIP_IF_NO_APACHE;
+
debug_printf (1, "\nTesting auth when server does not repeat challenge on failure:\n");
server = soup_test_server_new (FALSE);
@@ -1164,6 +1176,8 @@ do_batch_tests (gconstpointer data)
guint signal;
int i;
+ SOUP_TEST_SKIP_IF_NO_APACHE;
+
session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, NULL);
base = soup_uri_new (base_uri);
@@ -1246,13 +1260,3 @@ main (int argc, char **argv)
test_cleanup ();
return ret;
}
-
-#else /* HAVE_APACHE */
-
-int
-main (int argc, char **argv)
-{
- return 77; /* SKIP */
-}
-
-#endif