Skip to content

Commit

Permalink
Enable separate e2e tests and cross separate e2e tests involving X16
Browse files Browse the repository at this point in the history
  • Loading branch information
pzembrod committed Feb 14, 2021
1 parent 33d3c43 commit b4baad0
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 5 deletions.
43 changes: 39 additions & 4 deletions tests/e2e/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ suite_results_c64_hosted = \
suite_results_c16_hosted = \
$(patsubst %, cc64-% cc64pe-%, $(suite_c16_suffixes))
suite_results_x16_hosted = \
$(patsubst %, cc64-% cc64pe-%, $(suite_x16_suffixes))
$(patsubst %, cc64-%, $(suite_x16_suffixes))

c64_rt_files = \
$(patsubst $(basedir)/runtime/%, c64files/%, $(wildcard $(basedir)/runtime/rt-*.[hio]))
Expand Down Expand Up @@ -64,9 +64,14 @@ fastcrosstests: \

slowcrosstests: \
separate-tests-c64_c64.result \
separate-tests-c16_c16.result \
separate-tests-c64_c16.result \
separate-tests-c16_c64.result
separate-tests-c64_x16.result \
separate-tests-c16_c64.result \
separate-tests-c16_c16.result \
separate-tests-c16_x16.result \
separate-tests-x16_c64.result \
separate-tests-x16_c16.result \
separate-tests-x16_x16.result

pecrosstests: \
cc64pe-suite-c64_c64.result \
Expand All @@ -80,12 +85,27 @@ separate-tests-c64_c64.result: $(test_results_c64_c64)
separate-tests-c64_c16.result: $(test_results_c64_c16)
cat $^ >$@

separate-tests-c64_x16.result: $(test_results_c64_x16)
cat $^ >$@

separate-tests-c16_c64.result: $(test_results_c16_c64)
cat $^ >$@

separate-tests-c16_c16.result: $(test_results_c16_c16)
cat $^ >$@

separate-tests-c16_x16.result: $(test_results_c16_x16)
cat $^ >$@

separate-tests-x16_c64.result: $(test_results_x16_c64)
cat $^ >$@

separate-tests-x16_c16.result: $(test_results_x16_c16)
cat $^ >$@

separate-tests-x16_x16.result: $(test_results_x16_x16)
cat $^ >$@

$(test_results_c64_hosted) $(suite_results_c64_hosted): \
$(basedir)/autostart-c64/cc64.T64 $(c64_rt_files) *.sh *.h

Expand All @@ -101,20 +121,35 @@ $(test_results_c64_c64): %-c64_c64.result: %-test.c %.golden
$(test_results_c64_c16): %-c64_c16.result: %-test.c %.golden
./compile-run-test.sh $* c64_c16

$(test_results_c64_x16): %-c64_x16.result: %-test.c %.golden
./compile-run-test.sh $* c64_x16

$(test_results_c16_c64): %-c16_c64.result: %-test.c %.golden
./compile-run-test.sh $* c16_c64

$(test_results_c16_c16): %-c16_c16.result: %-test.c %.golden
./compile-run-test.sh $* c16_c16

$(test_results_c16_x16): %-c16_x16.result: %-test.c %.golden
./compile-run-test.sh $* c16_x16

$(test_results_x16_c64): %-x16_c64.result: %-test.c %.golden
./compile-run-test.sh $* x16_c64

$(test_results_x16_c16): %-x16_c16.result: %-test.c %.golden
./compile-run-test.sh $* x16_c16

$(test_results_x16_x16): %-x16_x16.result: %-test.c %.golden
./compile-run-test.sh $* x16_x16


cc64-suite-%.result: *-test.c *.golden
./compile-run-suite.sh cc64 $*

cc64pe-suite-%.result: *-test.c *.golden
./compile-run-suite.sh cc64pe $*



cc64-suite-c64_x16.result: $(basedir)/emulator/sdcard.img

cc64pe-suite-c64_x16.result: $(basedir)/emulator/sdcard.img
Expand Down
7 changes: 6 additions & 1 deletion tests/e2e/compile-run-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,13 @@ echo "char *name(){ return \"${testname}.out,s,w\"; } test(){ ${testname}_test (
| tee "${testname}-generated.c" \
| ascii2petscii - "${hostfiles}/${testname}.c"
rm -f "${hostfiles}/${testname}" "${targetfiles}/${testname}.T64"
CC64HOST="${host}" ./compile-in-emu.sh "cc ${testname}.c\ndos s0:notdone"
CC64HOST="${host}" OUTFILES="${testname}" \
./compile-in-emu.sh "cc ${testname}.c\ndos s0:notdone"

if [ "${hostfiles}" != "${targetfiles}" ]
then
cp "${hostfiles}/${testname}" "${targetfiles}/${testname}"
fi
bin2t64 "${hostfiles}/${testname}" "${targetfiles}/${testname}.T64"
fulltestname="${testname}-${host_target}"

Expand Down

0 comments on commit b4baad0

Please sign in to comment.