summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-01-23 19:42:52 +0000
committerChris Lattner <sabre@nondot.org>2002-01-23 19:42:52 +0000
commit9363884abe14278f75ae7d5fecf2cf3461f89b34 (patch)
tree456fd81d7abad7ca7f2220294ececf238268f1e6
parent8cb23b2cf97109984f26ca36ce91ac7cfd733d46 (diff)
downloadllvm-9363884abe14278f75ae7d5fecf2cf3461f89b34.tar.gz
llvm-9363884abe14278f75ae7d5fecf2cf3461f89b34.tar.bz2
llvm-9363884abe14278f75ae7d5fecf2cf3461f89b34.tar.xz
Initial checkin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1564 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/Feature/Makefile39
-rw-r--r--test/Feature/README.txt5
2 files changed, 44 insertions, 0 deletions
diff --git a/test/Feature/Makefile b/test/Feature/Makefile
new file mode 100644
index 0000000000..2187b9f4d2
--- /dev/null
+++ b/test/Feature/Makefile
@@ -0,0 +1,39 @@
+# test/Feature/Makefile
+#
+# This makefile runs a moderate number of tests against LLVM source "feature"
+# tests, which are designed to test individual components of the LLVM language.
+# This runs through three sets of tests, designed to test to (dis)assembler,
+# the optimizer, and the code generator for support for the more esoteric LLVM
+# features.
+#
+
+LEVEL = ../..
+include ../Makefile.tests
+
+TESTS := $(wildcard *.ll)
+OTESTS := $(addprefix Output/, $(TESTS)) # Tests in output directory
+
+test all :: testasmdis testopt testsparc
+ @echo "All tests completed!"
+
+testasmdis : $(addsuffix .asmdis, $(OTESTS))
+testopt : $(addsuffix .opt , $(OTESTS))
+
+testcodegen : $(OTESTS:%.ll=%.mc)
+testsparc : $(OTESTS:%.ll=%.s)
+
+Output/%.asmdis: % $(LAS) $(LDIS) Output/.dir
+ @./TestAsmDisasm.sh $<
+
+Output/%.opt: % $(LAS) $(LDIS) $(LOPT) Output/.dir
+ @./TestOptimizer.sh $<
+
+Output/%.mc: Output/%.bc $(LLC)
+ @echo "======== Generating machine instructions for $<"
+ $(LLC) -f $(LLCFLAGS) $< > $@ || \
+ ( rm -f $@; ./Failure.sh $@ )
+
+Output/%.s: Output/%.bc $(LLC)
+ @echo "======== Generating assembly code for $<"
+ $(LLC) -f $(LLCFLAGS) $< -o $@ || \
+ ( rm -f $@; ./Failure.sh $@ )
diff --git a/test/Feature/README.txt b/test/Feature/README.txt
new file mode 100644
index 0000000000..ae290ee730
--- /dev/null
+++ b/test/Feature/README.txt
@@ -0,0 +1,5 @@
+This directory contains test cases for individual source features of LLVM.
+It is designed to make sure that the major components of LLVM support all of the
+features of LLVM, for very small examples. Entire programs should not go here.
+
+Regression tests for individual bug fixes should go into the test/Regression dir. \ No newline at end of file