Skip to content

Commit 7385770

Browse files
committed
tests Makefile: Fix broken suite dependencies, and add full crosscompile test rules
1 parent 4f70b2f commit 7385770

File tree

1 file changed

+32
-18
lines changed

1 file changed

+32
-18
lines changed

tests/Makefile

Lines changed: 32 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,49 @@ test_results_c16_c16 = $(patsubst %, %-c16_c16-result.txt, $(test_names))
88
test_results_c64_hosted = $(test_results_c64_c64) $(test_results_c64_c16)
99
test_results_c16_hosted = $(test_results_c16_c64) $(test_results_c16_c16)
1010

11-
c64_rt_files = $(patsubst ../runtime/%, c64files/%, \
12-
$(wildcard ../runtime/rt-*.[hio]))
13-
c16_rt_files = $(patsubst ../runtime/%, c16files/%, \
14-
$(wildcard ../runtime/rt-*.[hio]))
11+
suite_suffixes = $(patsubst %, %.result, c64 c16)
12+
suite_c64_suffixes = $(patsubst %, suite-c64_%, $(suite_suffixes))
13+
suite_c16_suffixes = $(patsubst %, suite-c16_%, $(suite_suffixes))
14+
suite_results_c64_hosted = \
15+
$(patsubst %, cc64-% cc64pe-%, $(suite_c64_suffixes))
16+
suite_results_c16_hosted = \
17+
$(patsubst %, cc64-% cc64pe-%, $(suite_c16_suffixes))
18+
19+
c64_rt_files = \
20+
$(patsubst ../runtime/%, c64files/%, $(wildcard ../runtime/rt-*.[hio]))
21+
c16_rt_files = \
22+
$(patsubst ../runtime/%, c16files/%, $(wildcard ../runtime/rt-*.[hio]))
1523

1624
tests: fasttests
1725

1826
alltests: fasttests slowtests petests
1927

20-
slowtests: separate-tests-c64_c64.result
21-
2228
fasttests: cc64-suite-c64_c64.result
2329

30+
slowtests: separate-tests-c64_c64.result
31+
2432
petests: cc64pe-suite-c64_c64.result
2533

34+
allcrosstests: fastcrosstests slowcrosstests pecrosstests
35+
36+
fastcrosstests: \
37+
cc64-suite-c64_c64.result \
38+
cc64-suite-c16_c16.result \
39+
cc64-suite-c64_c16.result \
40+
cc64-suite-c16_c64.result
41+
2642
slowcrosstests: \
2743
separate-tests-c64_c64.result \
2844
separate-tests-c16_c16.result \
2945
separate-tests-c64_c16.result \
3046
separate-tests-c16_c64.result
3147

48+
pecrosstests: \
49+
cc64pe-suite-c64_c64.result \
50+
cc64pe-suite-c16_c16.result \
51+
cc64pe-suite-c64_c16.result \
52+
cc64pe-suite-c16_c64.result
53+
3254
separate-tests-c64_c64.result: $(test_results_c64_c64)
3355
cat $^ >$@
3456

@@ -41,19 +63,11 @@ separate-tests-c16_c64.result: $(test_results_c16_c64)
4163
separate-tests-c16_c16.result: $(test_results_c16_c16)
4264
cat $^ >$@
4365

44-
$(test_results_c64_hosted) cc64-suite-c64_*.result cc64pe-pesuite.result: \
45-
$(c64_rt_files) *.sh *.h
46-
47-
$(test_results_c16_hosted) cc64-suite-c16_*.result cc64pe-pesuite.result: \
48-
$(c16_rt_files) *.sh *.h
49-
50-
$(test_results_c64_hosted) cc64-suite-c64_*.result: ../autostart-c64/cc64.T64
51-
52-
$(test_results_c16_hosted) cc64-suite-c16_*.result: ../autostart-c16/cc64.T64
53-
54-
cc64pe-suite-c64_*.result: ../autostart-c64/cc64pe.T64
66+
$(test_results_c64_hosted) $(suite_results_c64_hosted): \
67+
../autostart-c64/cc64.T64 $(c64_rt_files) *.sh *.h
5568

56-
cc64pe-suite-c16_*.result: ../autostart-c16/cc64pe.T64
69+
$(test_results_c16_hosted) $(suite_results_c16_hosted): \
70+
../autostart-c16/cc64.T64 $(c16_rt_files) *.sh *.h
5771

5872
$(test_results_c64_c64): %-c64_c64-result.txt: %-test.c %.golden
5973
./run-test.sh $* c64_c64

0 commit comments

Comments
 (0)