1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

Fix make distcheck for Python tests

This commit is contained in:
Darshit Shah 2014-10-08 16:47:21 +05:30 committed by Tim Ruehsen
parent 601b282cd8
commit 7cd528a4e9
3 changed files with 14 additions and 34 deletions

View File

@ -1,3 +1,9 @@
2014-10-08 Darshit Shah <darnir@gmail.com>
* Makefile.am: Fix EXTRA_DIST variable for make distcheck
* server/http/http_server.py (HTTPServer.__init__): Fix how CERTFILE is
found when running make dist / make distcheck.
2014-09-30 Tim Ruehsen <tim.ruehsen@gmx.de> 2014-09-30 Tim Ruehsen <tim.ruehsen@gmx.de>
* test/base_test.py: Add --track-origins=yes to valgrind testing * test/base_test.py: Add --track-origins=yes to valgrind testing

View File

@ -27,7 +27,7 @@
AUTOMAKE_OPTIONS = parallel-tests AUTOMAKE_OPTIONS = parallel-tests
AM_TESTS_ENVIRONMENT = MAKE_CHECK=True; export MAKE_CHECK; AM_TESTS_ENVIRONMENT = export WGETRC=/dev/null; MAKE_CHECK=True; export MAKE_CHECK; export PYTHONPATH=$$PYTHONPATH:$(srcdir);
TESTS = Test-auth-basic-fail.py \ TESTS = Test-auth-basic-fail.py \
Test-auth-basic.py \ Test-auth-basic.py \
Test-auth-both.py \ Test-auth-both.py \
@ -44,39 +44,15 @@ TESTS = Test-auth-basic-fail.py \
Test-cookie-expires.py \ Test-cookie-expires.py \
Test-cookie.py \ Test-cookie.py \
Test-Head.py \ Test-Head.py \
Test--https.py \ Test--https.py \
Test-O.py \ Test-O.py \
Test-Post.py \ Test-Post.py \
Test--spider-r.py Test--spider-r.py
XFAIL_TESTS = Test-auth-both.py XFAIL_TESTS = Test-auth-both.py
LOG_COMPILER = python3 EXTRA_DIST = certs conf exc misc server test README $(TESTS) $(XFAIL_TESTS)
EXTRA_DIST = ColourTerm.py \ TEST_EXTENSIONS = .py
FTPServer.py \ PY_LOG_COMPILER = python3
HTTPServer.py \ AM_PY_LOG_FLAGS = -O
README \
Test--spider-r.py \
Test--https.py \
Test-Content-disposition-2.py \
Test-Content-disposition.py \
Test-Head.py \
Test-O.py \
Test-Parallel-Proto.py \
Test-Post.py \
Test-Proto.py \
Test-auth-basic-fail.py \
Test-auth-basic.py \
Test-auth-both.py \
Test-auth-digest.py \
Test-auth-no-challenge-url.py \
Test-auth-no-challenge.py \
Test-auth-retcode.py \
Test-auth-with-content-disposition.py \
Test-c-full.py \
Test-cookie-401.py \
Test-cookie-domain-mismatch.py \
Test-cookie-expires.py \
Test-cookie.py \
WgetTest.py

View File

@ -11,7 +11,6 @@ import re
import ssl import ssl
import os import os
class StoppableHTTPServer (HTTPServer): class StoppableHTTPServer (HTTPServer):
""" This class extends the HTTPServer class from default http.server library """ This class extends the HTTPServer class from default http.server library
in Python 3. The StoppableHTTPServer class is capable of starting an HTTP in Python 3. The StoppableHTTPServer class is capable of starting an HTTP
@ -38,9 +37,8 @@ class HTTPSServer (StoppableHTTPServer):
def __init__ (self, address, handler): def __init__ (self, address, handler):
BaseServer.__init__ (self, address, handler) BaseServer.__init__ (self, address, handler)
print (os.getcwd()) # step one up because test suite change directory away from $srcdir (don't do that !!!)
CERTFILE = os.path.abspath(os.path.join('..', 'certs', 'wget-cert.pem')) CERTFILE = os.path.abspath(os.path.join('..', os.getenv('srcdir', '.'), 'certs', 'wget-cert.pem'))
print (CERTFILE)
fop = open (CERTFILE) fop = open (CERTFILE)
print (fop.readline()) print (fop.readline())
self.socket = ssl.wrap_socket ( self.socket = ssl.wrap_socket (