1 # Starting at the bottom
2 # Set of source test suites
3 # Each source suite is processesd producing multiple device specific test suites.
4 # Each device specific test suite is compiled.
5 # Each device specific test suite is run, and the output recorded.
6 # The output from each device specific test suite derrived from a source
7 # test suite are collated.
15 SUBRESULTS_DIR = subresults
17 GENERATE_CASES = generate-cases.py
19 ALL_PORTS = $(filter-out CVS,$(notdir $(wildcard $(PORTS_DIR)/*)))
22 for i in $(ALL_PORTS); do $(MAKE) inter-port-clean test-port PORT=$$i; done
24 ALL_TESTS = $(shell find $(TESTS_DIR) -name "*.c")
26 PORT_CASES_DIR = $(CASES_DIR)/$(PORT)
27 PORT_RESULTS_DIR = $(RESULTS_DIR)/$(PORT)
28 PORT_SUBRESULTS_DIR = $(SUBRESULTS_DIR)/$(PORT)
29 PORT_RESULTS = $(ALL_TESTS:$(TESTS_DIR)/%.c=$(PORT_RESULTS_DIR)/%.out)
39 include $(PORTS_DIR)/$(PORT)/spec.mk
42 .PRECIOUS: $(PORT_CASES_DIR)/% %$(OBJEXT) %$(EXEEXT) %.dir
44 SDCCFLAGS += -Ifwk/include
46 $(PORT_CASES_DIR)/%$(DIREXT): $(TESTS_DIR)/%.c $(GENERATE_CASES)
47 rm -rf $(CASES_DIR)/tests
48 mkdir -p $(CASES_DIR)/tests
50 python $(GENERATE_CASES) $< > /dev/null
51 cp $(CASES_DIR)/tests/*.c $@
54 $(PORT_RESULTS_DIR)/%.out: $(PORT_CASES_DIR)/%$(DIREXT)
55 $(MAKE) iterations PORT=$(PORT) CASES=$<
57 port-results: port-dirs $(PORT_RESULTS)
58 echo Summary for \'$(PORT)\': `cat $(PORT_RESULTS) | python collate-results.py`
61 mkdir -p $(PORT_CASES_DIR) $(PORT_RESULTS_DIR) $(PORT_SUBRESULTS_DIR)
63 test-port: port-results
65 SUB_CASES = $(wildcard $(CASES)/*.c)
66 SUB_RESULTS = $(SUB_CASES:$(PORT_CASES_DIR)/%.c=$(PORT_SUBRESULTS_DIR)/%.out)
67 RESULTS = $(CASES:$(CASES_DIR)/%$(DIREXT)=$(RESULTS_DIR)/%.out)
69 iterations: $(RESULTS)
71 $(RESULTS): $(SUB_RESULTS)
72 cat $(SUB_RESULTS) > $@
74 #$(PORT_CASES_DIR)/%.bin: $(PORT_CASES_DIR)/%.c
76 #$(PORT_CASES_DIR)/%.o: $(PORT_CASES_DIR)/%.c
79 rm -rf $(CASES_DIR) $(RESULTS_DIR) $(SUBRESULTS_DIR)