X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=test%2FMakefile;h=36b3223a89f19923d56e65ba66e471a257c8637e;hb=40ef630a4626365faeef8696f611e18d1a69f63a;hp=583e2757d21da0a790ccd70170caab08c9ffa2ae;hpb=817046e1f1945ce2e3aaf6239e849d5ad3112d26;p=oota-llvm.git diff --git a/test/Makefile b/test/Makefile index 583e2757d21..36b3223a89f 100644 --- a/test/Makefile +++ b/test/Makefile @@ -22,6 +22,10 @@ include Makefile.tests # DejaGNU testing support #===------------------------------------------------------------------------===# +ifneq ($(GREP_OPTIONS),) +$(warning GREP_OPTIONS environment variable may interfere with test results) +endif + ifdef VERBOSE RUNTESTFLAGS := $(VERBOSE) endif @@ -48,9 +52,16 @@ ifdef IGNORE_TESTS RUNTESTFLAGS += --ignore "$(strip $(IGNORE_TESTS))" endif +# Both AuroraUX & Solaris do not have the -m flag for ulimit +ifeq ($(HOST_OS),SunOS) +ULIMIT=ulimit -t 600 ; ulimit -d 512000 ; ulimit -v 512000 ; +else +ULIMIT=ulimit -t 600 ; ulimit -d 512000 ; ulimit -m 512000 ; ulimit -v 512000 ; +endif + ifneq ($(RUNTEST),) check-local:: site.exp - ( ulimit -t 600 ; ulimit -d 512000 ; \ + ( $(ULIMIT) \ PATH="$(LLVMToolDir):$(LLVM_SRC_ROOT)/test/Scripts:$(PATH)" \ $(RUNTEST) $(RUNTESTFLAGS) ) else @@ -73,7 +84,7 @@ check-one: site.exp $(TCLSH) echo "proc verbose args { }" ; \ echo "source $(LLVM_SRC_ROOT)/test/lib/llvm.exp" ; \ echo "RunLLVMTests $(TESTPATH)" ) | \ - ( ulimit -t 600 ; ulimit -d 512000 ; \ + ( $(ULIMIT) \ PATH="$(LLVMToolDir):$(LLVM_SRC_ROOT)/test/Scripts:$(PATH)" \ $(TCLSH) ) endif @@ -82,13 +93,20 @@ clean:: $(RM) -rf `find $(LLVM_OBJ_ROOT)/test -name Output -type d -print` # dsymutil is used on the Darwin to manipulate DWARF debugging information. -ifeq ($(OS),Darwin) +ifeq ($(TARGET_OS),Darwin) DSYMUTIL=dsymutil else DSYMUTIL=true endif -ifeq ($(OS),Darwin) +ifdef TargetCommonOpts BUGPOINT_TOPTS="-gcc-tool-args $(TargetCommonOpts)" +else +BUGPOINT_TOPTS="" +endif + +ifneq ($(OCAMLC),) +CC_FOR_OCAMLC := $(shell $(OCAMLC) -config | grep native_c_compiler | sed -e 's/native_c_compiler: //') +CXX_FOR_OCAMLC := $(subst gcc,g++,$(CC_FOR_OCAMLC)) endif FORCE: @@ -119,7 +137,7 @@ site.exp: FORCE @echo 'set llvmgccmajvers "$(LLVMGCC_MAJVERS)"' >> site.tmp @echo 'set bugpoint_topts $(BUGPOINT_TOPTS)' >> site.tmp @echo 'set shlibext "$(SHLIBEXT)"' >> site.tmp - @echo 'set ocamlc "$(OCAMLC) -cc $(CXX) -I $(LibDir)/ocaml"' >> site.tmp + @echo 'set ocamlc "$(OCAMLC) -cc \"$(CXX_FOR_OCAMLC)\" -I $(LibDir)/ocaml"' >> site.tmp @echo 'set valgrind "$(VALGRIND)"' >> site.tmp @echo 'set grep "$(GREP)"' >>site.tmp @echo 'set gas "$(GAS)"' >>site.tmp