summaryrefslogtreecommitdiff
path: root/tests/test-utils.c
diff options
context:
space:
mode:
authorSeonah Moon <seonah1.moon@samsung.com>2021-01-29 14:23:37 +0900
committerSeonah Moon <seonah1.moon@samsung.com>2021-01-29 14:23:45 +0900
commitff5de45a0b6ff33c38f40da53a2ae775e6275d5f (patch)
treecbf758e85015f0c8a40bccfd44d7c42974550971 /tests/test-utils.c
parentb74c5fd5483969d55625576448662edf864b6b9e (diff)
downloadlibsoup-ff5de45a0b6ff33c38f40da53a2ae775e6275d5f.tar.gz
libsoup-ff5de45a0b6ff33c38f40da53a2ae775e6275d5f.tar.bz2
libsoup-ff5de45a0b6ff33c38f40da53a2ae775e6275d5f.zip
Imported Upstream version 2.72.0upstream/2.72.0upstream
Change-Id: I026585438031f2cf6255822fdd432796c398efe3
Diffstat (limited to 'tests/test-utils.c')
-rw-r--r--tests/test-utils.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/test-utils.c b/tests/test-utils.c
index bd1bab05..0c48e506 100644
--- a/tests/test-utils.c
+++ b/tests/test-utils.c
@@ -131,6 +131,19 @@ debug_printf (int level, const char *format, ...)
va_end (args);
}
+gboolean
+have_curl(void) {
+ char *found;
+
+ found = g_find_program_in_path ("curl");
+ if (found) {
+ g_free (found);
+ return TRUE;
+ } else {
+ return FALSE;
+ }
+}
+
#ifdef HAVE_APACHE
static gboolean
@@ -189,7 +202,9 @@ apache_cmd (const char *cmd)
void
apache_init (void)
{
- if (g_getenv ("SOUP_TESTS_IN_MAKE_CHECK"))
+ /* Set this environment variable if you are already running a
+ * suitably-configured Apache server */
+ if (g_getenv ("SOUP_TESTS_ALREADY_RUNNING_APACHE"))
return;
if (!apache_cmd ("start")) {