bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] [PATCH] Using parallel test harness


From: Darshit Shah
Subject: Re: [Bug-wget] [PATCH] Using parallel test harness
Date: Thu, 25 Sep 2014 14:53:44 +0530
User-agent: Mutt/1.5.23 (2014-03-12)

On Wed, Sep 24, 2014 at 04:45:59PM +0200, Tim Ruehsen wrote:
> 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.

Looks good! I have only the latest autotools for testing the patch, but I don't
think this patch should create many issues. Of course, this feature was added
only in autotools 1.11 I guess, so anything before that ./configure will fail.
But since we've already used this feature in the Python based test suite, I
don't think it's a problem any more.

I ran the patch on both, master and parallel-wget without any errors.

One thing this patch does is speed up the Perl-based test suite by a large
extent and I'm really glad about it.
> 
> 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.

Yes, I agree we can eliminate run-px completely. I don't see a use for that
script anymore since you've integrated the tests to use the autotools harness.

I'm not too sure about merging the Python tests into the tests/ directory. It
would fix up the test and supporting files. The Python based tests require
someone to volunteer to port the tests too. All the HTTP features are ready,
only the tests are missing. FTP support is woefully lacking however and also the
support for spawning multiple HTTP Servers for the parallel-wget branch's tests.

In my opinion, the two test suites should be kept separate, atleast for the time
being while the new test suite is completed.
> 
> Tim

> From 7a871ea9049aee8e5c150053ed1dc7abd30ef9dc Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Tim=20R=C3=BChsen?= <address@hidden>
> 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 <address@hidden>
> +
> +     * Makefile.am: Modified to use parallel test harness
> +        * Test-proxied-https-auth.px: get $top_srcdir from ENV
> +
>  2014-06-11  Giuseppe Scrivano  <address@hidden>
>  
>       * 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
> 



Attachment: pgp5hrIbc3nQp.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]