[libsoup] tests: [CENSORED] [CENSORED] automake [CENSORED]
- From: Dan Winship <danw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup] tests: [CENSORED] [CENSORED] automake [CENSORED]
- Date: Wed, 20 Feb 2013 00:26:22 +0000 (UTC)
commit 98144c40bd5614237d23a95d068b8036af7af9ef
Author: Dan Winship <danw gnome org>
Date: Tue Feb 19 19:02:59 2013 -0500
tests: [CENSORED] [CENSORED] automake [CENSORED]
Specifying serial-tests in AM_INIT_AUTOMAKE breaks the build with
automake 1.11, so the only way to support both 1.11 and 1.13 is to
make the tests work under the parallel harness. Fortunately this
wasn't that hard.
.gitignore | 3 +++
configure.ac | 2 +-
tests/Makefile.am | 29 +++++++++++++++++++++--------
tests/test-utils.c | 3 +++
4 files changed, 28 insertions(+), 9 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 9fbae76..19686f4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -63,6 +63,9 @@ po/Makefile.in.in
po/POTFILES
po/stamp-it
stamp-h1
+test-driver
+tests/*.log
+tests/*.trs
tests/*-test
tests/date
tests/dns
diff --git a/configure.ac b/configure.ac
index 781361a..1b12081 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11,7 +11,7 @@ AC_INIT([libsoup],[soup_major_version.soup_minor_version.soup_micro_version],[ht
AC_CONFIG_SRCDIR([libsoup-2.4.pc.in])
AC_CONFIG_MACRO_DIR([m4])
-AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz -Wno-portability serial-tests])
+AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz -Wno-portability])
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])],)
AC_PROG_MAKE_SET
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 6f0c5ae..57ec0f4 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -11,7 +11,7 @@ LIBS = \
$(LIBGNUTLS_LIBS) \
$(GLIB_LIBS)
-tests = \
+TESTS = \
cache-test \
chunk-test \
coding-test \
@@ -37,17 +37,17 @@ tests = \
uri-parsing
if HAVE_APACHE
-tests += auth-test proxy-test pull-api range-test
+TESTS += auth-test proxy-test pull-api range-test
endif
if HAVE_CURL
-tests += forms-test server-auth-test
+TESTS += forms-test server-auth-test
endif
if HAVE_XMLRPC_PHP
-tests += xmlrpc-test xmlrpc-server-test
+TESTS += xmlrpc-test xmlrpc-server-test
endif
noinst_PROGRAMS = \
- $(tests) \
+ $(TESTS) \
dns \
get \
ntlm-test-helper \
@@ -86,8 +86,6 @@ endif
soup-tests.gresource: soup-tests.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir)
--generate-dependencies $(srcdir)/soup-tests.gresource.xml)
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) $<
-TESTS = $(sort $(tests))
-
RESOURCES = \
resources/atom.xml \
resources/home.gif \
@@ -116,14 +114,29 @@ EXTRA_DIST = \
DISTCLEANFILES = soup-tests.gresource httpd.conf
-check-local: check-TESTS kill-httpd
+TESTS_ENVIRONMENT = \
+ SOUP_TESTS_IN_MAKE_CHECK=1
+
+check: start-httpd
+
+check-local: check-TESTS
+ @$(MAKE) kill-httpd
if MISSING_REGRESSION_TEST_PACKAGES
@echo ""
@echo "NOTE: some tests were not run due to missing packages:" $(MISSING_REGRESSION_TEST_PACKAGES)
@echo ""
endif
+.PHONY: start-httpd kill-httpd
+
+start-httpd:
+if HAVE_APACHE
+ @$(APACHE_HTTPD) -d `pwd` -f httpd.conf -k start;
+endif
+
kill-httpd:
+if HAVE_APACHE
@if [ -f httpd.pid ]; then \
$(APACHE_HTTPD) -d `pwd` -f httpd.conf -k stop; \
fi
+endif
diff --git a/tests/test-utils.c b/tests/test-utils.c
index a2c24cf..8e0fb25 100644
--- a/tests/test-utils.c
+++ b/tests/test-utils.c
@@ -187,6 +187,9 @@ apache_cmd (const char *cmd)
void
apache_init (void)
{
+ if (g_getenv ("SOUP_TESTS_IN_MAKE_CHECK"))
+ return;
+
if (!apache_cmd ("start")) {
g_printerr ("Could not start apache\n");
exit (1);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]