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 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)
25 Output/%.asmdis: % $(LAS) $(LDIS) Output/.dir
26 @./TestAsmDisasm.sh $<
28 Output/%.opt: % $(LAS) $(LDIS) $(LOPT) Output/.dir
29 @./TestOptimizer.sh $<
31 Output/%.mc: Output/%.bc $(LLC)
32 @echo "======== Generating machine instructions for $<"
33 $(LLC) -f $(LLCFLAGS) $< > $@ || \
34 ( rm -f $@; $(FAILURE) $@ )
36 Output/%.s: Output/%.bc $(LLC)
37 @echo "======== Generating assembly code for $<"
38 $(LLC) -f $(LLCFLAGS) $< -o $@ || \
39 ( rm -f $@; $(FAILURE) $@ )