summaryrefslogtreecommitdiff
path: root/tests/connection-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/connection-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/connection-test.c')
-rw-r--r--tests/connection-test.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/tests/connection-test.c b/tests/connection-test.c
index 3dd2cae5..f092944b 100644
--- a/tests/connection-test.c
+++ b/tests/connection-test.c
@@ -621,8 +621,6 @@ do_non_idempotent_connection_test (void)
soup_test_session_abort_unref (session);
}
-#ifdef HAVE_APACHE
-
#define HTTP_SERVER "http://127.0.0.1:47524"
#define HTTPS_SERVER "https://127.0.0.1:47525"
#define HTTP_PROXY "http://127.0.0.1:47526"
@@ -724,6 +722,8 @@ do_connection_state_test (void)
{
SoupSession *session;
+ SOUP_TEST_SKIP_IF_NO_APACHE;
+
debug_printf (1, "\nConnection states\n");
debug_printf (1, " Async session\n");
@@ -832,6 +832,8 @@ do_connection_event_test (void)
{
SoupSession *session;
+ SOUP_TEST_SKIP_IF_NO_APACHE;
+
debug_printf (1, "\nConnection events\n");
debug_printf (1, " Async session\n");
@@ -845,17 +847,13 @@ do_connection_event_test (void)
soup_test_session_abort_unref (session);
}
-#endif
-
int
main (int argc, char **argv)
{
int ret;
test_init (argc, argv, NULL);
-#ifdef HAVE_APACHE
apache_init ();
-#endif
server = soup_test_server_new (TRUE);
soup_server_add_handler (server, NULL, server_callback, "http", NULL);
@@ -867,10 +865,8 @@ main (int argc, char **argv)
g_test_add_func ("/connection/max-conns", do_max_conns_test);
g_test_add_func ("/connection/non-persistent", do_non_persistent_connection_test);
g_test_add_func ("/connection/non-idempotent", do_non_idempotent_connection_test);
-#ifdef HAVE_APACHE
g_test_add_func ("/connection/state", do_connection_state_test);
g_test_add_func ("/connection/event", do_connection_event_test);
-#endif
ret = g_test_run ();