New testcases
[oota-llvm.git] / test / Makefile.tests
index 630bacfb9f1002350fd7287470d17fa63c08840b..953ae80fd1d29fef61bf5428f29c258e32fbd03f 100644 (file)
@@ -1,6 +1,8 @@
 ##----------------------------------------------------------*- Makefile -*-===##
+##
 ## Common rules for generating, linking, and compiling via LLVM.  This is
 ## used to implement a robust testing framework for LLVM
+##
 ##-------------------------------------------------------------------------===##
 
 # If the user specified a TEST= option on the command line, we do not want to do
@@ -30,11 +32,7 @@ endif
 .PRECIOUS: Output/%.llvm.bc
 .PRECIOUS: Output/%.llvm
 
-ifdef ENABLE_OPTIMIZED
-TOOLS    = $(BUILD_OBJ_ROOT)/tools/Release
-else
-TOOLS    = $(BUILD_OBJ_ROOT)/tools/Debug
-endif
+TOOLS    = $(LLVMTOOLCURRENT)
 
 # LLVM Tool Definitions...
 #
@@ -47,6 +45,7 @@ LLC      = $(TOOLS)/llc
 LAS      = $(TOOLS)/as
 LGCCAS   = $(TOOLS)/gccas
 LGCCLD   = $(TOOLS)/gccld -L$(LLVMGCCDIR)/lib/gcc-lib/$(LLVMGCCARCH) -L$(LLVMGCCDIR)/lib
+LGCCLDPROG = $(TOOLS)/gccld
 LDIS     = $(TOOLS)/dis 
 LOPT     = $(TOOLS)/opt
 LLINK    = $(TOOLS)/link
@@ -57,7 +56,9 @@ LCCFLAGS  += -O2 -Wall
 LCXXFLAGS += -O2 -Wall
 LLCFLAGS =
 FAILURE  = $(LEVEL)/test/Failure.sh
-TESTRUNR = $(LEVEL)/test/TestRunner.sh
+TESTRUNR = @echo Running test: $<; \
+             PATH=$(LLVMTOOLCURRENT):$(LEVEL)/test/Scripts:$(PATH) \
+                  $(LEVEL)/test/TestRunner.sh
 
 # Native Tool Definitions
 NATGCC  = $(CC)
@@ -67,23 +68,19 @@ CP  = /bin/cp -f
 ## mark that tracing on, and set the TRACELIBS variable.
 TRACEFLAGS = 
 ifeq ($(TRACE), yes)
-    TRACEFLAGS += -trace
-    DOTRACING = yes
-else
-    ifeq ($(TRACEM), yes)
-       TRACEFLAGS += -tracem
-       DOTRACING = yes
-    endif
-endif
-ifeq ($(DOTRACING), yes)
-    TRACELIBS := -L$(LEVEL)/test/Libraries/Output -linstr64
+    TRACEFLAGS = -trace
+    TRACELIBS := -L$(LEVEL)/test/Libraries/Output -linstr.$(ARCH)
 endif
 
+ifeq ($(TRACEM), yes)
+    TRACEFLAGS = -tracem
+    TRACELIBS := -L$(LEVEL)/test/Libraries/Output -linstr.$(ARCH)
+endif
 
 LLCLIBS := $(LLCLIBS) -lm
 
 clean::
-       $(RM) a.out core
+       $(RM) -f a.out core
        $(RM) -rf Output/
 
 # Compile from X.c to Output/X.ll