summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am66
-rw-r--r--tests/auth-test.c12
-rw-r--r--tests/forms-test.c12
-rw-r--r--tests/proxy-test.c12
-rw-r--r--tests/pull-api.c12
-rw-r--r--tests/range-test.c12
-rw-r--r--tests/server-auth-test.c12
-rw-r--r--tests/xmlrpc-server-test.c12
-rw-r--r--tests/xmlrpc-test.c12
9 files changed, 128 insertions, 34 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 57ec0f4b..55dd3273 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -11,40 +11,38 @@ LIBS = \
$(LIBGNUTLS_LIBS) \
$(GLIB_LIBS)
-TESTS = \
- cache-test \
- chunk-test \
- coding-test \
- connection-test \
- context-test \
- continue-test \
- cookies-test \
- date \
- header-parsing \
- misc-test \
- multipart-test \
- ntlm-test \
- redirect-test \
- requester-test \
- resource-test \
- session-test \
- sniffing-test \
- socket-test \
- ssl-test \
- streaming-test \
- timeout-test \
- tld-test \
- uri-parsing
-
-if HAVE_APACHE
-TESTS += auth-test proxy-test pull-api range-test
-endif
-if HAVE_CURL
-TESTS += forms-test server-auth-test
-endif
-if HAVE_XMLRPC_PHP
-TESTS += xmlrpc-test xmlrpc-server-test
-endif
+TESTS = \
+ auth-test \
+ cache-test \
+ chunk-test \
+ coding-test \
+ connection-test \
+ context-test \
+ continue-test \
+ cookies-test \
+ date \
+ forms-test \
+ header-parsing \
+ misc-test \
+ multipart-test \
+ ntlm-test \
+ proxy-test \
+ pull-api \
+ range-test \
+ redirect-test \
+ requester-test \
+ resource-test \
+ session-test \
+ server-auth-test \
+ sniffing-test \
+ socket-test \
+ ssl-test \
+ streaming-test \
+ timeout-test \
+ tld-test \
+ uri-parsing \
+ xmlrpc-server-test \
+ xmlrpc-test
noinst_PROGRAMS = \
$(TESTS) \
diff --git a/tests/auth-test.c b/tests/auth-test.c
index 334033b3..2c443d63 100644
--- a/tests/auth-test.c
+++ b/tests/auth-test.c
@@ -2,6 +2,8 @@
#include "test-utils.h"
+#ifdef HAVE_APACHE
+
static GMainLoop *loop;
typedef struct {
@@ -1201,3 +1203,13 @@ main (int argc, char **argv)
test_cleanup ();
return errors != 0;
}
+
+#else /* HAVE_APACHE */
+
+int
+main (int argc, char **argv)
+{
+ return 77; /* SKIP */
+}
+
+#endif
diff --git a/tests/forms-test.c b/tests/forms-test.c
index 1d254b12..3b6e5c16 100644
--- a/tests/forms-test.c
+++ b/tests/forms-test.c
@@ -5,6 +5,8 @@
#include "test-utils.h"
+#ifdef HAVE_CURL
+
static struct {
const char *title, *name;
const char *result;
@@ -451,3 +453,13 @@ main (int argc, char **argv)
test_cleanup ();
return errors != 0;
}
+
+#else /* HAVE_CURL */
+
+int
+main (int argc, char **argv)
+{
+ return 77; /* SKIP */
+}
+
+#endif
diff --git a/tests/proxy-test.c b/tests/proxy-test.c
index 1ac38557..075289dc 100644
--- a/tests/proxy-test.c
+++ b/tests/proxy-test.c
@@ -2,6 +2,8 @@
#include "test-utils.h"
+#ifdef HAVE_APACHE
+
typedef struct {
const char *explanation;
const char *url;
@@ -394,3 +396,13 @@ main (int argc, char **argv)
test_cleanup ();
return errors != 0;
}
+
+#else /* HAVE_APACHE */
+
+int
+main (int argc, char **argv)
+{
+ return 77; /* SKIP */
+}
+
+#endif
diff --git a/tests/pull-api.c b/tests/pull-api.c
index 512d1768..070c2099 100644
--- a/tests/pull-api.c
+++ b/tests/pull-api.c
@@ -2,6 +2,8 @@
#include "test-utils.h"
+#ifdef HAVE_APACHE
+
static SoupBuffer *correct_response;
static void
@@ -527,3 +529,13 @@ main (int argc, char **argv)
test_cleanup ();
return errors != 0;
}
+
+#else /* HAVE_APACHE */
+
+int
+main (int argc, char **argv)
+{
+ return 77; /* SKIP */
+}
+
+#endif
diff --git a/tests/range-test.c b/tests/range-test.c
index 09e95f12..e7d01d21 100644
--- a/tests/range-test.c
+++ b/tests/range-test.c
@@ -2,6 +2,8 @@
#include "test-utils.h"
+#ifdef HAVE_APACHE
+
SoupBuffer *full_response;
int total_length;
char *test_response;
@@ -370,3 +372,13 @@ main (int argc, char **argv)
test_cleanup ();
return errors != 0;
}
+
+#else /* HAVE_APACHE */
+
+int
+main (int argc, char **argv)
+{
+ return 77; /* SKIP */
+}
+
+#endif
diff --git a/tests/server-auth-test.c b/tests/server-auth-test.c
index 757e065a..33cff45a 100644
--- a/tests/server-auth-test.c
+++ b/tests/server-auth-test.c
@@ -5,6 +5,8 @@
#include "test-utils.h"
+#ifdef HAVE_CURL
+
static struct {
gboolean client_sent_basic, client_sent_digest;
gboolean server_requested_basic, server_requested_digest;
@@ -361,3 +363,13 @@ main (int argc, char **argv)
test_cleanup ();
return errors != 0;
}
+
+#else /* HAVE_CURL */
+
+int
+main (int argc, char **argv)
+{
+ return 77; /* SKIP */
+}
+
+#endif
diff --git a/tests/xmlrpc-server-test.c b/tests/xmlrpc-server-test.c
index 75f6c911..421348b1 100644
--- a/tests/xmlrpc-server-test.c
+++ b/tests/xmlrpc-server-test.c
@@ -5,6 +5,8 @@
#include "test-utils.h"
+#ifdef HAVE_PHP_XMLRPC
+
#ifdef G_GNUC_BEGIN_IGNORE_DEPRECATIONS
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
#endif
@@ -345,3 +347,13 @@ main (int argc, char **argv)
test_cleanup ();
return errors != 0;
}
+
+#else /* HAVE_PHP_XMLRPC */
+
+int
+main (int argc, char **argv)
+{
+ return 77; /* SKIP */
+}
+
+#endif
diff --git a/tests/xmlrpc-test.c b/tests/xmlrpc-test.c
index 7a29d0e9..3c3f76fe 100644
--- a/tests/xmlrpc-test.c
+++ b/tests/xmlrpc-test.c
@@ -5,6 +5,8 @@
#include "test-utils.h"
+#ifdef HAVE_PHP_XMLRPC
+
#ifdef G_GNUC_BEGIN_IGNORE_DEPRECATIONS
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
#endif
@@ -552,3 +554,13 @@ main (int argc, char **argv)
test_cleanup ();
return errors != 0;
}
+
+#else /* HAVE_PHP_XMLRPC */
+
+int
+main (int argc, char **argv)
+{
+ return 77; /* SKIP */
+}
+
+#endif