1 # test/Feature/Makefile
3 # This makefile runs a moderate number of tests against LLVM source "feature"
4 # tests, which are designed to test individual components of the LLVM language.
5 # This runs through three sets of tests, designed to test to (dis)assembler,
6 # the optimizer, and the code generator for support for the more esoteric LLVM
11 include ../Makefile.tests
13 TESTS := $(wildcard *.ll)
14 OTESTS := $(addprefix Output/, $(TESTS)) # Tests in output directory
16 test all :: testasmdis testopt testcbe testsparc
17 @echo "All tests completed!"
19 testasmdis : $(addsuffix .asmdis, $(OTESTS))
20 testopt : $(addsuffix .opt , $(OTESTS))
22 testcodegen : $(OTESTS:%.ll=%.mc)
23 testsparc : $(OTESTS:%.ll=%.s)
24 testcbe : $(OTESTS:%.ll=%.tc)
26 Output/%.asmdis: % $(LAS) $(LDIS) Output/.dir
27 @./TestAsmDisasm.sh $< $(TOOLDEBUG) $(LIBDEBUG)
29 Output/%.opt: % $(LAS) $(LDIS) $(LOPT) Output/.dir
30 @./TestOptimizer.sh $< $(TOOLDEBUG) $(LIBDEBUG)
32 Output/%.tc: Output/%.bc $(LDIS)
33 @echo "======== Generating C code for $<"
34 $(LDIS) -c < $< > $@ || \
35 ( rm -f $@; $(FAILURE) $@ )
37 Output/%.mc: Output/%.bc $(LLC)
38 @echo "======== Generating machine instructions for $<"
39 $(LLC) -f $(LLCFLAGS) $< > $@ || \
40 ( rm -f $@; $(FAILURE) $@ )
42 Output/%.s: Output/%.bc $(LLC)
43 @echo "======== Generating assembly code for $<"
44 $(LLC) -f $(LLCFLAGS) $< -o $@ || \
45 ( rm -f $@; $(FAILURE) $@ )