Hi, here is a first patch to enable the parallel test harness for the perl tests.
Please test and comment - i admit I have no older auto* environment to test. If you like it, we could get rid of tests/run-px (not used any more in my patch). Also, we could easily merge the python test suite into the tests/ directory. Tim
From 7a871ea9049aee8e5c150053ed1dc7abd30ef9dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim Rühsen?= <[email protected]> Date: Wed, 24 Sep 2014 16:40:03 +0200 Subject: [PATCH] Switched to parallel test harness --- tests/ChangeLog | 5 +++++ tests/Makefile.am | 32 +++++++++++++------------------- tests/Test-proxied-https-auth.px | 10 +++++++--- 3 files changed, 25 insertions(+), 22 deletions(-) diff --git a/tests/ChangeLog b/tests/ChangeLog index d957b57..070e995 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,8 @@ +2014-40-22 Tim Ruehsen <[email protected]> + + * Makefile.am: Modified to use parallel test harness + * Test-proxied-https-auth.px: get $top_srcdir from ENV + 2014-06-11 Giuseppe Scrivano <[email protected]> * Makefile.am: Remove @VAR@ with $FOO. diff --git a/tests/Makefile.am b/tests/Makefile.am index 4bd3ebf..ecb7001 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -27,20 +27,12 @@ # shall include the source code for the parts of OpenSSL used as well # as that of the covered work. +# see http://www.gnu.org/software/automake/manual/html_node/Parallel-Test-Harness.html#Parallel-Test-Harness + # # Version: $(VERSION) # -PERL = perl -PERLRUN = $(PERL) -I$(srcdir) - -LIBS += $(LIBICONV) $(LIBINTL) $(LIB_CLOCK_GETTIME) - -.PHONY: test run-unit-tests run-px-tests - -check-local: test - -test: ../src/wget$(EXEEXT) run-unit-tests run-px-tests ../src/wget$(EXEEXT): cd ../src && $(MAKE) $(AM_MAKEFLAGS) @@ -53,14 +45,7 @@ test: ../src/wget$(EXEEXT) run-unit-tests run-px-tests ../lib/libgnu.a: cd ../lib && $(MAKE) $(AM_MAKEFLAGS) -run-unit-tests: unit-tests$(EXEEXT) ../src/libunittest.a - ./unit-tests$(EXEEXT) - -run-px-tests: WgetTest.pm ../src/wget$(EXEEXT) - $(srcdir)/run-px $(top_srcdir) - -EXTRA_DIST = FTPServer.pm FTPTest.pm HTTPServer.pm HTTPTest.pm \ - WgetFeature.pm WgetFeature.cfg \ +PX_TESTS = \ Test-auth-basic.px \ Test-auth-no-challenge.px \ Test-auth-no-challenge-url.px \ @@ -142,7 +127,10 @@ EXTRA_DIST = FTPServer.pm FTPTest.pm HTTPServer.pm HTTPTest.pm \ Test--start-pos.px \ Test--start-pos--continue.px \ Test--httpsonly-r.px \ - Test-204.px \ + Test-204.px + +EXTRA_DIST = FTPServer.pm FTPTest.pm HTTPServer.pm HTTPTest.pm \ + WgetFeature.pm WgetFeature.cfg $(PX_TESTS) \ run-px certs check_PROGRAMS = unit-tests @@ -150,3 +138,9 @@ unit_tests_SOURCES LDADD = ../src/libunittest.a ../lib/libgnu.a $(LIBS) CLEANFILES = *~ *.bak core core.[0-9]* + +TESTS = ./unit-tests$(EXEEXT) $(PX_TESTS) +TEST_EXTENSIONS = .pl +AM_TESTS_ENVIRONMENT = export top_srcdir=$(top_srcdir); export WGETRC=/dev/null; export SYSTEM_WGETRC=/dev/null; +PL_LOG_COMPILER = $(PERL) +AM_PL_LOG_FLAGS = -I$(top_srcdir) diff --git a/tests/Test-proxied-https-auth.px b/tests/Test-proxied-https-auth.px index 1de5357..45017d0 100755 --- a/tests/Test-proxied-https-auth.px +++ b/tests/Test-proxied-https-auth.px @@ -8,12 +8,16 @@ use WgetTest; # For $WGETPATH. my $cert_path; my $key_path; +my $top_srcdir; if (@ARGV) { - my $top_srcdir = shift @ARGV; - $key_path = "$top_srcdir/tests/certs/server-key.pem"; - $cert_path = "$top_srcdir/tests/certs/server-cert.pem"; + $top_srcdir = shift @ARGV; +} else { + $top_srcdir = $ENV{top_srcdir}; } +$key_path = "$top_srcdir/tests/certs/server-key.pem"; +$cert_path = "$top_srcdir/tests/certs/server-cert.pem"; + use HTTP::Daemon; use HTTP::Request; -- 2.1.1
signature.asc
Description: This is a digitally signed message part.
