endif
ifdef VG
-VALGRIND := valgrind --tool=memcheck --quiet --trace-children=yes --error-exitcode=3 --leak-check=full
+VALGRIND := valgrind --tool=memcheck --quiet --trace-children=yes --error-exitcode=3 --leak-check=full $(VALGRIND_EXTRA_ARGS)
endif
IGNORE_TESTS :=
ifneq ($(RUNTEST),)
check-local:: site.exp
( $(ULIMIT) \
- PATH="$(LLVMToolDir):$(LLVM_SRC_ROOT)/test/Scripts:$(PATH)" \
+ PATH="$(LLVMToolDir):$(LLVM_SRC_ROOT)/test/Scripts:$(LLVMGCCDIR)/bin:$(PATH)" \
$(RUNTEST) $(RUNTESTFLAGS) )
else
check-local:: site.exp
@echo "*** dejagnu not found. Make sure 'runtest' is in your PATH, then reconfigure LLVM."
endif
-check-local-lit:: lit.site.cfg
+check-local-lit:: lit.site.cfg Unit/lit.site.cfg
( $(ULIMIT) \
$(LLVM_SRC_ROOT)/utils/lit/lit.py \
--path "$(LLVMToolDir)" \
--path "$(LLVM_SRC_ROOT)/test/Scripts" \
+ --path "$(LLVMGCCDIR)/bin" \
$(LIT_ARGS) $(LIT_TESTSUITE) )
ifdef TESTONE
@echo >> $@
@echo "# Let the main config do the real work." >> $@
@echo "lit.load_config(config, \"\"\"$(LLVM_SRC_ROOT)/test/lit.cfg\"\"\")" >> $@
+
+Unit/lit.site.cfg: Unit/.dir FORCE
+ @echo "Making unittest 'lit.site.cfg' file..."
+ @echo "## Autogenerated by Makefile ##" > $@
+ @echo "# Do not edit!" >> $@
+ @echo >> $@
+ @echo "# Preserve some key paths for use by main LLVM test suite config." >> $@
+ @echo "config.llvm_obj_root = \"\"\"$(LLVM_OBJ_ROOT)\"\"\"" >> $@
+ @echo >> $@
+ @echo "# Remember the build mode." >> $@
+ @echo "config.llvm_build_mode = \"\"\"$(BuildMode)\"\"\"" >> $@
+ @echo >> $@
+ @echo "# Let the main config do the real work." >> $@
+ @echo "lit.load_config(config, \"\"\"$(LLVM_SRC_ROOT)/test/Unit/lit.cfg\"\"\")" >> $@
+