소스 검색

Find scripts/chutney_tests/ based on CHUTNEY_PATH

teor 7 년 전
부모
커밋
513a66273d
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      lib/chutney/TorNet.py

+ 4 - 1
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