aboutsummaryrefslogtreecommitdiffstats
path: root/test/run_tests.py
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2018-11-08 11:21:39 +0100
committerDamjan Marion <dmarion@me.com>2018-11-29 08:22:10 +0000
commitb8c72a4a8d8bd330ab62dc0c9461cac2b137575b (patch)
treeb2470923ad4e3612282115ef11ec77e1e1b70f3c /test/run_tests.py
parent040950a59d53e8802ad31430d67df105939cce4c (diff)
make test: create virtualenv under /test/
instead of using build-root, use /test/venv directory for virtualenv similarly, don't pollute build-root with test-built binaries Change-Id: I1e63c04037eaee718b27b34ef16c9eb0252afa53 Signed-off-by: Klement Sekera <ksekera@cisco.com>
Diffstat (limited to 'test/run_tests.py')
-rw-r--r--test/run_tests.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/run_tests.py b/test/run_tests.py
index d72a74c2ee4..0978da0730c 100644
--- a/test/run_tests.py
+++ b/test/run_tests.py
@@ -68,8 +68,8 @@ class TestResult(dict):
def was_successful(self):
return 0 == len(self[FAIL]) == len(self[ERROR]) \
- and len(self[PASS] + self[SKIP]) \
- == self.testcase_suite.countTestCases() == len(self[TEST_RUN])
+ and len(self[PASS] + self[SKIP]) \
+ == self.testcase_suite.countTestCases() == len(self[TEST_RUN])
def no_tests_run(self):
return 0 == len(self[TEST_RUN])
@@ -232,7 +232,7 @@ def handle_failed_suite(logger, last_test_temp_dir, vpp_pid):
if last_test_temp_dir:
# Need to create link in case of a timeout or core dump without failure
lttd = os.path.basename(last_test_temp_dir)
- failed_dir = os.getenv('VPP_TEST_FAILED_DIR')
+ failed_dir = os.getenv('FAILED_DIR')
link_path = '%s%s-FAILED' % (failed_dir, lttd)
if not os.path.exists(link_path):
os.symlink(last_test_temp_dir, link_path)
@@ -750,10 +750,11 @@ if __name__ == '__main__':
filter_cb = FilterByTestOption(filter_file, filter_class, filter_func)
+ ignore_path = os.getenv("VENV_PATH", None)
cb = SplitToSuitesCallback(filter_cb)
for d in args.dir:
print("Adding tests from directory tree %s" % d)
- discover_tests(d, cb)
+ discover_tests(d, cb, ignore_path)
# suites are not hashable, need to use list
suites = []