all::
@ echo '--- Running clang tests for $(TARGET_TRIPLE) ---'
- @ PATH=$(ToolDir):$(LLVM_SRC_ROOT)/test/Scripts:$$PATH $(PROJ_SRC_DIR)/../utils/test/MultiTestRunner.py $(TESTARGS) $(TESTDIRS) $(VGARG)
+ @ $(PROJ_SRC_DIR)/../utils/test/MultiTestRunner.py \
+ --path $(ToolDir) \
+ --path $(LLVM_SRC_ROOT)/test/Scripts \
+ $(TESTARGS) $(TESTDIRS) $(VGARG)
clean::
@ rm -rf Output/
action="store_true", default=False)
parser.add_option("", "--path", dest="path",
help="Additional paths to add to testing environment",
- action="store", type=str, default=None)
+ action="append", type=str, default=[])
(opts, args) = parser.parse_args()
parser.error('Support for running with valgrind is '
'temporarily disabled')
+ # FIXME: Move into configuration object.
+ TestRunner.kChildEnv["PATH"] = os.pathsep.join(opts.path +
+ [TestRunner.kChildEnv['PATH']])
+
if opts.clang is None:
opts.clang = TestRunner.inferClang()
if opts.clangcc is None:
random.shuffle(tests)
if opts.maxTests is not None:
tests = tests[:opts.maxTests]
- if opts.path is not None:
- os.environ["PATH"] = opts.path + ":" + os.environ["PATH"];
-
+
extra = ''
if len(tests) != len(allTests):
extra = ' of %d'%(len(allTests),)
if not ln.endswith('&&'):
return (TestStatus.Fail,
- "MISSING \'&&\': %s\n" +
- "FOLLOWED BY : %s\n" % (ln,scriptLines[i + 1]))
+ ("MISSING \'&&\': %s\n" +
+ "FOLLOWED BY : %s\n") % (ln, scriptLines[i + 1]))
# Strip off '&&'
scriptLines[i] = ln[:-2]
return out
def which(command):
+ # FIXME: Take configuration object.
+
# Check for absolute match first.
if os.path.exists(command):
return command
# Would be nice if Python had a lib function for this.
- paths = os.environ.get('PATH')
+ paths = kChildEnv['PATH']
if not paths:
paths = os.defpath