aboutsummaryrefslogtreecommitdiffstats
path: root/testing/runner.py
diff options
context:
space:
mode:
Diffstat (limited to 'testing/runner.py')
-rw-r--r--testing/runner.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/testing/runner.py b/testing/runner.py
index a993c3a5c..6c3eef388 100644
--- a/testing/runner.py
+++ b/testing/runner.py
@@ -51,6 +51,8 @@ from textwrap import dedent
from .buildlog import builds
from .helper import decorate, PY3, TimeoutExpired
+sys.path.append('..')
+from utils import detectClang
class TestRunner(object):
def __init__(self, log_entry, project, index):
@@ -63,8 +65,20 @@ class TestRunner(object):
else:
self.logfile = os.path.join(log_dir, project + ".log")
os.environ['CTEST_OUTPUT_ON_FAILURE'] = '1'
+ self._setupClang()
self._setup()
+ def _setupClang(self):
+ if sys.platform != "win32":
+ return
+ clangDir = detectClang()
+ if clangDir[0]:
+ clangBinDir = os.path.join(clangDir[0], 'bin')
+ path = os.environ.get('PATH')
+ if not clangBinDir in path:
+ os.environ['PATH'] = clangBinDir + os.pathsep + path
+ print("Adding %s as detected by %s to PATH" % (clangBinDir, clangDir[1]))
+
def _find_ctest(self):
"""
Find ctest in the Makefile
@@ -149,11 +163,11 @@ class TestRunner(object):
print(*args, file=output, **kw)
# 'for line in input:' would read into too large chunks
+ labelled = True
while True:
line = input.readline()
if not line:
break
- labelled = True
if line.startswith('BEGIN_FILE'):
labelled = False
txt = line.rstrip()