aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-04-15 06:18:50 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-04-15 06:18:50 +0000
commit9df5561a952cbfe32aea4e1fbde16655af82efd0 (patch)
tree68f272279270e07768e3060011a4851ec734b2a4 /test
parente9989b91522f8c28ee820dd56c3f46d420b22644 (diff)
downloadexternal_llvm-9df5561a952cbfe32aea4e1fbde16655af82efd0.zip
external_llvm-9df5561a952cbfe32aea4e1fbde16655af82efd0.tar.gz
external_llvm-9df5561a952cbfe32aea4e1fbde16655af82efd0.tar.bz2
Add a new testing target: check-one. It is used like this:
make check-one TESTONE=test/path/to/test.ll This runs a single check in exactly the same way that dejagnu runs it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36049 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Makefile19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/Makefile b/test/Makefile
index 001e3ac..7c8a7b3 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -42,6 +42,25 @@ check-local:: site.exp
@echo "*** dejagnu not found. Make sure runtest is in your PATH, then reconfigure llvm."
endif
+ifdef TESTONE
+CLEANED_TESTONE := $(patsubst %/,%,$(TESTONE))
+CLEANED_TESTONE := $(patsubst test/%,%,$(CLEANED_TESTONE))
+SUBDIR := $(shell dirname $(CLEANED_TESTONE))
+TESTPATH := $(LLVM_SRC_ROOT)/test/$(CLEANED_TESTONE)
+check-one: site.exp $(TCLSH)
+ @( echo "source $(LLVM_SRC_ROOT)/test/site.exp" ; \
+ echo "set subdir $(SUBDIR)" ; \
+ echo "proc pass { msg } { puts \"PASS: \$$msg\" } "; \
+ echo "proc fail { msg } { puts \"FAIL: \$$msg\" }" ; \
+ echo "proc xfail { msg } { puts \"XFAIL: \$$msg\" }" ; \
+ echo "proc xpass { msg } { puts \"XPASS: \$$msg\" }" ; \
+ echo "source $(LLVM_SRC_ROOT)/test/lib/llvm.exp" ; \
+ echo "RunLLVMTests $(TESTPATH)" ) | \
+ ( ulimit -t 600 ; ulimit -d 512000 ; \
+ PATH="$(LLVMToolDir):$(LLVM_SRC_ROOT)/test/Scripts:$(PATH)" \
+ $(TCLSH) )
+endif
+
clean::
$(RM) -rf `find $(LLVM_OBJ_ROOT)/test -name Output -type d -print`