Clean up the usage of evaluateICmpRelation's return value.
[oota-llvm.git] / test / Makefile
index 9db85c53939715b231f92666ea1e0eb6486e2e59..661f791024c465d82431bd12b65fb64269ebd188 100644 (file)
@@ -43,7 +43,7 @@ LIT_TESTSUITE := .
 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 :=
@@ -66,18 +66,19 @@ endif
 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
@@ -170,3 +171,18 @@ lit.site.cfg: site.exp
        @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\"\"\")" >> $@
+