Am Montag, 13. Juli 2015, 09:08:10 schrieb Ander Juaristi: > On 06/22/2015 11:22 AM, Tim Ruehsen wrote: > > On Sunday 21 June 2015 12:08:39 Ander Juaristi wrote: > >> Hi all, > >> > >> I noticed that when Wget is compiled with no SSL support, two tests from > >> the>> > >> Python test suite fail. For me it's always reproducible: > >> $ ./configure --without-ssl > >> $ make check > >> <output trimmed> > >> FAIL: Test--https.py > >> FAIL: Test--https-crl.py > >> > >> This doesn't look like desired behaviour, does it? Ideally, those tests > >> should be skipped when Wget does not support SSL. > >> > >> Isn't there anything like WgetFeature.pm in the Python tests? > > > > Today we have the possibility to work with XFAIL_TESTS in Makefile.am. > > > > How it should work (IMO): > > When we './configure --without-ssl' we expect the https tests to FAIL (not > > just SKIPPED). What we simply need is a SUBST variable that we check in > > testenv/Makefile.am. Depending on the check the https tests are either > > added to TESTS or to XFAIL_TESTS. Same with other switchable features. > > Hi Tim, sorry for my late response. Just to make sure we can close this > ticket. > > I'm not really sure if I understood your proposed use case. You meant to > have an environment variable called SUBST that was checked on > testenv/Makefile.am?
What I meant using AC_SUBST in configure.ac. I just made up a quick patch using AM_CONDITIONAL (attached). When you apply it, you have to $ autoreconf && configure --without-ssl && make check If it works for you and noone complains would push it to master. Tim
diff --git a/configure.ac b/configure.ac
index 01ea237..5450455 100644
--- a/configure.ac
+++ b/configure.ac
@@ -714,7 +714,7 @@ AS_IF([test "X$enable_pcre" != "Xno"],[
dnl Needed by src/Makefile.am
AM_CONDITIONAL([IRI_IS_ENABLED], [test "X$iri" != "Xno"])
-
+AM_CONDITIONAL([WITH_SSL], [test "X$with_ssl" != "Xno"])
dnl
dnl Create output
diff --git a/testenv/Makefile.am b/testenv/Makefile.am
index 1058421..6cd84c8 100644
--- a/testenv/Makefile.am
+++ b/testenv/Makefile.am
@@ -29,6 +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@";
+
+SSL_TESTS = Test--https.py Test--https-crl.py
if HAVE_PYTHON3
TESTS = Test-auth-basic-fail.py \
Test-auth-basic.py \
@@ -47,21 +49,23 @@ if HAVE_PYTHON3
Test-cookie-expires.py \
Test-cookie.py \
Test-Head.py \
- Test--https.py \
- Test--https-crl.py \
Test-O.py \
Test-Post.py \
Test-504.py \
Test--spider-r.py \
Test-redirect-crash.py \
Test-reserved-chars.py \
- Test-condget.py
+ Test-condget.py \
+ $(SSL_TESTS)
# added test cases expected to fail here and under TESTS
- XFAIL_TESTS +if !WITH_SSL
+ XFAIL_TESTS = $(SSL_TESTS)
+endif
+
endif
-EXTRA_DIST = certs conf exc misc server test README $(TESTS) $(XFAIL_TESTS)
+EXTRA_DIST = certs conf exc misc server test README $(TESTS)
TEST_EXTENSIONS = .py
PY_LOG_COMPILER = python3
signature.asc
Description: This is a digitally signed message part.
