First msdos test using emu2

This commit is contained in:
Philip Zembrod 2024-12-25 00:18:04 +01:00
parent d0f6df803c
commit 8a02a04baf
2 changed files with 50 additions and 1 deletions

View File

@ -6,7 +6,8 @@ testsfbtxtfiles = $(patsubst tests/%.fb, tests/%.fb.txt, $(testsfbfiles))
fb_txt_files = $(srcfbtxtfiles) $(testsfbtxtfiles)
test: incltest.result logtest.result test-std.result test-blk.result \
incltest-volks4th.result test-volks4th-min.result test-stdi.result
incltest-volks4th.result test-volks4th-min.result \
test-stdi.result test-stde.result
fb.txt: $(fb_txt_files)
@ -120,6 +121,14 @@ test-stdi.log: \
"include logprep.fs include test-std.fs")
dos2unix -n dosfiles/OUTPUT.LOG $@
test-stde.log: \
$(patsubst %, dosfiles/%, v4thi.com $(prepfths)) \
$(patsubst tests/%, dosfiles/%, $(wildcard tests/*.*))
rm -f dosfiles/OUTPUT.LOG
(cd dosfiles && ../emulator/run-in-emu2.sh v4thi.com \
"include logprep.fs include test-std.fs")
dos2unix -n dosfiles/output.log $@
forthblkdos: v4thblk.dos v4thblk.forth
forthdos: forthblkdos v4thfile.dos v4thfile.forth v4th0.dos v4th0.forth
@ -214,6 +223,10 @@ test-stdi.golden: $(patsubst %, tests/golden/%.golden, \
prelim core coreplus coreext doubltst report-noblk)
cat $^ > $@
test-stde.golden: $(patsubst %, tests/golden/%.golden, \
prelim core coreplus coreext doubltst report-noblk)
cat $^ > $@
%.golden: tests/golden/%.golden
cp -p $< $@

View File

@ -0,0 +1,36 @@
#!/bin/bash
set -e
forth="$1"
forthcmd="$2"
pathcmd=""
if [ -n "${FORTHPATH}" ]; then
pathcmd="path ${FORTHPATH}"
fi
f_mountpoint="."
if [ -n "${F_MOUNTPOINT}" ]; then
f_mountpoint="${F_MOUNTPOINT}"
fi
exit=""
bye=""
if [ -n "${forthcmd}" ]; then
logname="output.log"
doslogname="$(echo ${logname}|tr '[:lower:]' '[:upper:]')"
rm -f "${logname}" "${doslogname}"
if [ -z "${KEEPEMU}" ]; then
exit="-c exit"
bye="bye"
fi
fi
auto_c=""
autocmd=""
if [ -n "${forth}" ]; then
auto_c="-c"
autocmd="${forthcmd} ${bye}"
fi
# dosbox -c "mount f ${f_mountpoint}" -c "f:" "${auto_c}" "${autocmd}" $exit
emu2 "${forth}" "${autocmd}"