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>
* test/base_test.py: Add --track-origins=yes to valgrind testing

View File

@ -27,7 +27,7 @@
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 \
Test-auth-basic.py \
Test-auth-both.py \
@ -51,32 +51,8 @@ TESTS = Test-auth-basic-fail.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 \
FTPServer.py \
HTTPServer.py \
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
TEST_EXTENSIONS = .py
PY_LOG_COMPILER = python3
AM_PY_LOG_FLAGS = -O

View File

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