diff options
Diffstat (limited to 'tests/test-utils.c')
-rw-r--r-- | tests/test-utils.c | 17 |
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")) { |