diff options
author | Klement Sekera <ksekera@cisco.com> | 2018-11-08 11:21:39 +0100 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2018-11-29 08:22:10 +0000 |
commit | b8c72a4a8d8bd330ab62dc0c9461cac2b137575b (patch) | |
tree | b2470923ad4e3612282115ef11ec77e1e1b70f3c /test/discover_tests.py | |
parent | 040950a59d53e8802ad31430d67df105939cce4c (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/discover_tests.py')
-rwxr-xr-x | test/discover_tests.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/test/discover_tests.py b/test/discover_tests.py index fbd2d9c7e59..6dea20e3de5 100755 --- a/test/discover_tests.py +++ b/test/discover_tests.py @@ -7,12 +7,14 @@ import importlib import argparse -def discover_tests(directory, callback): +def discover_tests(directory, callback, ignore_path): do_insert = True for _f in os.listdir(directory): f = "%s/%s" % (directory, _f) if os.path.isdir(f): - discover_tests(f, callback) + if ignore_path is not None and f.startswith(ignore_path): + continue + discover_tests(f, callback, ignore_path) continue if not os.path.isfile(f): continue @@ -50,6 +52,7 @@ if __name__ == '__main__': if args.dir is None: args.dir = "." + ignore_path = os.getenv("VENV_PATH", "") suite = unittest.TestSuite() for d in args.dir: - discover_tests(d, print_callback) + discover_tests(d, print_callback, ignore_path) |