Am Dienstag, 4. November 2014, 17:19:42 schrieb Giuseppe Scrivano: > Tim Ruehsen <[email protected]> writes: > > * configure.ac: check for python3 > > * Makefile.am: only use python test suite if python3 found > > > > On system without python3 the test suite will fail since > > the tests are designed for python3 only. > > > > Please review. > > > > Tim > > > > * configure.ac: Fix check for libpsl > > > > diff --git a/Makefile.am b/Makefile.am > > index a059794..8bf7def 100644 > > --- a/Makefile.am > > +++ b/Makefile.am > > @@ -41,7 +41,10 @@ distuninstallcheck_listfiles = find . -type f | \ > > > > ACLOCAL_AMFLAGS = -I m4 > > > > # subdirectories in the distribution > > > > -SUBDIRS = lib src doc po tests util testenv > > +SUBDIRS = lib src doc po tests util > > +if HAVE_PYTHON > > + SUBDIRS += testenv > > +endif > > I-ve not tried it, but I am afraid this will break make dist on systems > without python3 as testenv is not even included in Makefile.in. We > should check for HAVE_PYTHON (that ideally is HAVE_PYTHON3) inside the > testenv/Makefile.am itself and skip tests if not present.
You are right. I amended the patch to reflect your idea. I tested make distcheck with and without python3 available. Please have a look. Tim
From 3855dc0f6b480624d6150836c3829fb09d05bccc Mon Sep 17 00:00:00 2001 From: Tim Ruehsen <[email protected]> Date: Wed, 5 Nov 2014 21:35:13 +0100 Subject: [PATCH] Skip python test suite if python3 is not available --- ChangeLog | 5 +++++ configure.ac | 6 ++++++ testenv/Makefile.am | 6 ++++-- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index a7357aa..e9595f7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2014-11-05 Tim Ruehsen <[email protected]> + + * configure.ac: check for python3 + * Makefile.am: only use python test suite if python3 found + 2014-11-05 Giuseppe Scrivano <[email protected]> * contrib/tsocked-wget (TSOCKS_CONF_FILE): Remove empty new-line. diff --git a/configure.ac b/configure.ac index 01d3eef..7028481 100644 --- a/configure.ac +++ b/configure.ac @@ -136,6 +136,12 @@ AC_AIX gl_EARLY dnl +dnl Find python3 +dnl +AM_PATH_PYTHON([3.0],,[:]) +AM_CONDITIONAL([HAVE_PYTHON3], [test "$PYTHON" != :]) + +dnl dnl Gettext dnl AM_GNU_GETTEXT([external],[need-ngettext]) diff --git a/testenv/Makefile.am b/testenv/Makefile.am index 33604bc..f745bdb 100644 --- a/testenv/Makefile.am +++ b/testenv/Makefile.am @@ -29,7 +29,8 @@ AUTOMAKE_OPTIONS = parallel-tests AM_TESTS_ENVIRONMENT = export WGETRC=/dev/null; MAKE_CHECK=True; export MAKE_CHECK;\ export PYTHONPATH=$$PYTHONPATH:$(srcdir); export VALGRIND_TESTS="@VALGRIND_TESTS@"; -TESTS = Test-auth-basic-fail.py \ +if HAVE_PYTHON3 + TESTS = Test-auth-basic-fail.py \ Test-auth-basic.py \ Test-auth-both.py \ Test-auth-digest.py \ @@ -50,7 +51,8 @@ TESTS = Test-auth-basic-fail.py \ Test-Post.py \ Test--spider-r.py -XFAIL_TESTS = Test-auth-both.py + XFAIL_TESTS = Test-auth-both.py +endif EXTRA_DIST = certs conf exc misc server test README $(TESTS) $(XFAIL_TESTS) -- 2.1.1
signature.asc
Description: This is a digitally signed message part.
