[tor-commits] [chutney/master] Find scripts/chutney_tests/ based on CHUTNEY_PATH
teor at torproject.org
teor at torproject.org
Tue Aug 30 02:00:13 UTC 2016
commit 513a66273dac98eacba123641f805ef4b3a79fdb
Author: teor <teor2345 at gmail.com>
Date: Tue Aug 30 11:56:25 2016 +1000
Find scripts/chutney_tests/ based on CHUTNEY_PATH
---
lib/chutney/TorNet.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/chutney/TorNet.py b/lib/chutney/TorNet.py
index 12fc19e..352e671 100644
--- a/lib/chutney/TorNet.py
+++ b/lib/chutney/TorNet.py
@@ -923,7 +923,10 @@ def ConfigureNodes(nodelist):
def getTests():
tests = []
- for x in os.listdir("scripts/chutney_tests/"):
+ chutney_path = os.environ.get('CHUTNEY_PATH', '')
+ if len(chutney_path) > 0 and chutney_path[-1] != '/':
+ chutney_path += "/"
+ for x in os.listdir(chutney_path + "scripts/chutney_tests/"):
if not x.startswith("_") and os.path.splitext(x)[1] == ".py":
tests.append(os.path.splitext(x)[0])
return tests
More information about the tor-commits
mailing list