mirror of
https://github.com/mirror/wget.git
synced 2025-01-14 22:30:44 +08:00
testenv: enable running tests on different wget binary
* testenv/README: Document $WGET_PATH * testenv/test/base_test.py: Use $WGET_PATH instead ../src/wget if set Previously tests in testenv/ directory were run only on wget binary which was built from sources in src/ directory. However as a wget maintainer in a Linux distribution, I would like to be able to run upstream tests on the wget binary distributed with the distribution. This change enables one to define WGET_PATH environment variable to a path to wget binary which should be used by tests. Signed-off-by: Tomas Hozza <thozza@redhat.com>
This commit is contained in:
parent
1e4262e98d
commit
bac6fbab6c
@ -99,6 +99,10 @@ Environment Variables:
|
||||
If it is set to "1", valgrind memcheck is enabled with hard coded options.
|
||||
This variable is set by ./configure --enable-valgrind-tests.
|
||||
* SSL_TESTS: This must be set to run any https tests.
|
||||
* WGET_PATH: Set this environment variable to a path to wget binary on which you
|
||||
want to run tests. This is useful for OS distributions, which want to reuse
|
||||
upstream tests for testing wget build that they distribute. If the variable is
|
||||
not set, the "../src/wget" binary is used by tests.
|
||||
|
||||
|
||||
File Structure:
|
||||
|
@ -111,8 +111,12 @@ class BaseTest:
|
||||
|
||||
def gen_cmd_line(self):
|
||||
test_path = os.path.abspath(".")
|
||||
wget_path = os.path.abspath(os.path.join(test_path,
|
||||
"..", '..', 'src', "wget"))
|
||||
if os.getenv("WGET_PATH"):
|
||||
wget_path = os.path.abspath(os.getenv("WGET_PATH"))
|
||||
else:
|
||||
wget_path = os.path.abspath(os.path.join(test_path,
|
||||
"..", '..', 'src',
|
||||
"wget"))
|
||||
wget_options = '--debug --no-config %s' % self.wget_options
|
||||
|
||||
valgrind = os.getenv("VALGRIND_TESTS", "")
|
||||
|
Loading…
Reference in New Issue
Block a user