Converted local project to demo structure.
All checks were successful
Run test asserts / Test-Asserts (push) Successful in -8s

This commit is contained in:
Willem Cazander 2024-06-30 02:42:42 +02:00
parent fd67884bee
commit 56e74ee085
21 changed files with 257 additions and 249 deletions

View file

@ -1,7 +1,11 @@
#
# Example project makefile for msxbuild.
#
rwildcard = $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2) $(filter $(subst *,%,$2),$d))
INC_TEST := $(call rwildcard, test, */0module.mk)
PATH_BIN := bin PATH_BIN := bin
PATH_SRC := src
rwildcard = $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2) $(filter $(subst *,%,$2),$d))
MK_MODULES := $(call rwildcard, src, */0module.mk)
BUILD_ALL := "Use 'make help' for possible targets." BUILD_ALL := "Use 'make help' for possible targets."
BUILD_HELP := "Use one of the following build targets;" BUILD_HELP := "Use one of the following build targets;"
@ -21,4 +25,4 @@ clean:
$(call mb_clean,$(PATH_BIN)) $(call mb_clean,$(PATH_BIN))
include lib/make/msxbuild.mk include lib/make/msxbuild.mk
include $(INC_TEST) include $(MK_MODULES)

View file

@ -33,7 +33,7 @@ The files in this repro try to handle these steps for you.
* make + wget + tar + dos2unix * make + wget + tar + dos2unix
* sdcc * sdcc
* openmsx * openmsx
* ffmpeg (optional, see `test/0module.mk` howto merge videos) * ffmpeg (optional, see `srv/assert-all/0module.mk` howto merge videos)
For debian use; For debian use;
@ -46,7 +46,7 @@ And override the paths if needed;
* PATH_SDCC=/usr/bin * PATH_SDCC=/usr/bin
* PATH_OPENMSX=/usr/bin * PATH_OPENMSX=/usr/bin
Then build result based compile rules see an example in; `test/ahello-m80/0module.mk` Then build result based compile rules see an example in; `src/ahello-m80/0module.mk`
When you want to see whats happening do a debug run; When you want to see whats happening do a debug run;

38
src/ahello-m80/0module.mk Normal file
View file

@ -0,0 +1,38 @@
AHELLO_M80_MOD := ahello-m80
AHELLO_M80_SRC := $(PATH_SRC)/$(AHELLO_M80_MOD)
AHELLO_M80_BIN := $(PATH_BIN)/$(AHELLO_M80_MOD)
BUILD_HELP += \\n\\t* $(AHELLO_M80_BIN)/ahello.com\\n\\t* ahello-m80-run\\n\\t* ahello-m80-assert
$(AHELLO_M80_BIN):
$(call mb_mkdir,$(AHELLO_M80_BIN))
$(call mb_mkdir,$(AHELLO_M80_BIN)/utils)
$(call mb_msxhub_get_macro80,$(AHELLO_M80_BIN)/utils)
$(call mb_msxhub_get_z80asmuk,$(AHELLO_M80_BIN)/utils)
$(AHELLO_M80_BIN)/%.mac: $(AHELLO_M80_SRC)/%.mac | $(AHELLO_M80_BIN)
$(call mb_unix2dos,$<,$@)
$(AHELLO_M80_BIN)/ahello.rel: $(AHELLO_M80_BIN)/ahello.mac
$(call mb_autoexec_safe_cmd,$(AHELLO_M80_BIN),m80 =ahello/Z)
$(call mb_openmsx_dosctl,$(AHELLO_M80_BIN))
$(AHELLO_M80_BIN)/ahello.hex: $(AHELLO_M80_BIN)/ahello.rel
$(call mb_autoexec_safe_cmd,$(AHELLO_M80_BIN),l80 ahello$(MB_COMMA)ahello/N/X/Y/E)
$(call mb_openmsx_dosctl,$(AHELLO_M80_BIN))
$(AHELLO_M80_BIN)/ahello.com: $(AHELLO_M80_BIN)/ahello.hex
$(call mb_autoexec_safe_cmd,$(AHELLO_M80_BIN),hextocom ahello)
$(call mb_openmsx_dosctl,$(AHELLO_M80_BIN))
.PHONY: ahello-m80-run
ahello-m80-run: $(AHELLO_M80_BIN)/ahello.com
$(call mb_autoexec_show_gui80,$(AHELLO_M80_BIN))
$(call mb_openmsx_dosctl,$(AHELLO_M80_BIN))
.PHONY: ahello-m80-assert
ahello-m80-assert: $(AHELLO_M80_BIN)/ahello.com
$(call mb_delete,$(AHELLO_M80_BIN)/ahello.out)
$(call mb_autoexec_safe_test,$(AHELLO_M80_BIN),ahello > ahello.out)
$(call mb_openmsx_dosctl,$(AHELLO_M80_BIN))
grep "M80: Hello world..." $(AHELLO_M80_BIN)/ahello.out

View file

@ -0,0 +1,29 @@
AHELLO_SDCC_MOD := ahello-sdcc
AHELLO_SDCC_SRC := $(PATH_SRC)/$(AHELLO_SDCC_MOD)
AHELLO_SDCC_BIN := $(PATH_BIN)/$(AHELLO_SDCC_MOD)
BUILD_HELP += \\n\\t* $(AHELLO_SDCC_BIN)/ahello.com\\n\\t* ahello-sdcc-run\\n\\t* ahello-sdcc-assert
$(AHELLO_SDCC_BIN):
$(call mb_mkdir,$(AHELLO_SDCC_BIN))
$(AHELLO_SDCC_BIN)/%.rel: $(AHELLO_SDCC_SRC)/%.asm | $(AHELLO_SDCC_BIN)
$(call mb_sdcc_compile_asm,$<,$@)
$(AHELLO_SDCC_BIN)/ahello.hex: $(AHELLO_SDCC_BIN)/ahello.rel
$(call mb_sdcc_link_asm_dos,$<,$@)
$(AHELLO_SDCC_BIN)/ahello.com: $(AHELLO_SDCC_BIN)/ahello.hex
$(call mb_sdcc_hex2bin,$<,$@)
.PHONY: ahello-sdcc-run
ahello-sdcc-run: $(AHELLO_SDCC_BIN)/ahello.com
$(call mb_autoexec_show_gui80,$(AHELLO_SDCC_BIN))
$(call mb_openmsx_dosctl,$(AHELLO_SDCC_BIN))
.PHONY: ahello-sdcc-assert
ahello-sdcc-assert: $(AHELLO_SDCC_BIN)/ahello.com
$(call mb_delete,$(AHELLO_SDCC_BIN)/ahello.out)
$(call mb_autoexec_safe_test,$(AHELLO_SDCC_BIN),ahello > ahello.out)
$(call mb_openmsx_dosctl,$(AHELLO_SDCC_BIN))
grep "SDCC: Hello world..." $(AHELLO_SDCC_BIN)/ahello.out

20
src/assert-all/0module.mk Normal file
View file

@ -0,0 +1,20 @@
BUILD_HELP += \\n\\t* assert-all \(Run all asertion tests\)\\n\\t* assert-all-video \(Merges all videos\)
ASSERT_ALL_DEPS := \
ahello-m80-assert \
ahello-sdcc-assert \
dist-qa-dos1-assert \
dist-qa-dos2-assert \
dist-qa-msx1-assert \
dist-qa-msxhub-assert
.PHONY: assert-all
assert-all: | $(ASSERT_ALL_DEPS)
@echo === All assertions completed
.PHONY: assert-all-video
assert-all-video: | assert-all
@echo === Build session video listing
ls -1tr bin/*-omsx/videos/msxbuild-*.avi | awk -F "bin/" -v s="file '" -v e="'" '{print s$$2e}' > bin/video-merge.lst
ffmpeg -v quiet -y -f concat -i bin/video-merge.lst -c copy bin/video-session.avi
@echo === Concatted video completed

View file

@ -0,0 +1,25 @@
DIST_QA_DOS1 := $(PATH_BIN)/dist-qa-dos1
DIST_QA_DOS1_DEPS := $(subst dist,dist-qa-dos1,$(DIST_DEPS))
BUILD_HELP += \\n\\t* dist-qa-dos1-run\\n\\t* dist-qa-dos1-assert
$(DIST_QA_DOS1):
$(call mb_mkdir,$(DIST_QA_DOS1))
$(call mb_msxhub_get_dos1_boot,$(DIST_QA_DOS1))
$(DIST_QA_DOS1)/%: bin/dist/% | $(DIST_QA_DOS1) $(DIST_DEPS)
$(call mb_copy,$<,$@)
.PHONY: dist-qa-dos1-run
dist-qa-dos1-run: | $(DIST_QA_DOS1_DEPS)
$(call mb_autoexec_show_gui80,$(DIST_QA_DOS1))
$(call mb_openmsx_dosctl,$(DIST_QA_DOS1))
.PHONY: dist-qa-dos1-assert
dist-qa-dos1-assert: | $(DIST_QA_DOS1_DEPS)
$(call mb_autoexec_write_default,$(DIST_QA_DOS1))
$(call mb_autoexec_append_safe_test,$(DIST_QA_DOS1),ahello1)
$(call mb_autoexec_append_safe_test,$(DIST_QA_DOS1),ahello2)
$(call mb_autoexec_append_exit,$(DIST_QA_DOS1))
$(call mb_openmsx_dosctl,$(DIST_QA_DOS1))

View file

@ -0,0 +1,28 @@
DIST_QA_DOS2 := $(PATH_BIN)/dist-qa-dos2
DIST_QA_DOS2_DEPS := $(subst dist,dist-qa-dos2,$(DIST_DEPS))
BUILD_HELP += \\n\\t* dist-qa-dos2-run\\n\\t* dist-qa-dos2-assert
$(DIST_QA_DOS2):
$(call mb_mkdir,$(DIST_QA_DOS2))
$(call mb_msxhub_get_dos2_boot,$(DIST_QA_DOS2))
$(DIST_QA_DOS2)/%: bin/dist/% | $(DIST_QA_DOS2) $(DIST_DEPS)
$(call mb_copy,$<,$@)
.PHONY: dist-qa-dos2-run
dist-qa-dos2-run: | $(DIST_QA_DOS2_DEPS)
$(call mb_autoexec_show_gui80,$(DIST_QA_DOS2))
$(call mb_openmsx_dosctl,$(DIST_QA_DOS2))
.PHONY: dist-qa-dos2-assert
dist-qa-dos2-assert: | $(DIST_QA_DOS2_DEPS)
$(call mb_delete,$(DIST_QA_DOS2)/ahello1.out)
$(call mb_delete,$(DIST_QA_DOS2)/ahello2.out)
$(call mb_autoexec_write_default,$(DIST_QA_DOS2))
$(call mb_autoexec_append_safe_test,$(DIST_QA_DOS2),ahello1 > ahello1.out)
$(call mb_autoexec_append_safe_test,$(DIST_QA_DOS2),ahello2 > ahello2.out)
$(call mb_autoexec_append_exit,$(DIST_QA_DOS2))
$(call mb_openmsx_dosctl,$(DIST_QA_DOS2))
grep "M80: Hello world..." $(DIST_QA_DOS2)/ahello1.out
grep "SDCC: Hello world..." $(DIST_QA_DOS2)/ahello2.out

View file

@ -0,0 +1,28 @@
DIST_QA_MSX1_MACHINE ?= Canon_V-20
DIST_QA_MSX1 := $(PATH_BIN)/dist-qa-msx1
DIST_QA_MSX1_DEPS := $(subst dist,dist-qa-msx1,$(DIST_DEPS))
BUILD_HELP += \\n\\t* dist-qa-msx1-run\\n\\t* dist-qa-msx1-assert
$(DIST_QA_MSX1):
$(call mb_mkdir,$(DIST_QA_MSX1))
$(DIST_QA_MSX1)/%: bin/dist/% | $(DIST_QA_MSX1) $(DIST_DEPS)
$(call mb_copy,$<,$@)
.PHONY: dist-qa-msx1-run
dist-qa-msx1-run: | $(DIST_QA_MSX1_DEPS)
$(call mb_autoexec_show_gui40,$(DIST_QA_MSX1))
$(call mb_openmsx_dosctl,$(DIST_QA_MSX1),$(DIST_QA_MSX1_MACHINE))
.PHONY: dist-qa-msx1-assert
dist-qa-msx1-assert: | $(DIST_QA_MSX1_DEPS)
$(call mb_delete,$(DIST_QA_MSX1)/ahello1.out)
$(call mb_delete,$(DIST_QA_MSX1)/ahello2.out)
$(call mb_autoexec_write_default,$(DIST_QA_MSX1),40)
$(call mb_autoexec_append_safe_test,$(DIST_QA_MSX1),ahello1 > ahello1.out,33)
$(call mb_autoexec_append_safe_test,$(DIST_QA_MSX1),ahello2 > ahello2.out,66,99)
$(call mb_autoexec_append_exit,$(DIST_QA_MSX1))
$(call mb_openmsx_dosctl,$(DIST_QA_MSX1),$(DIST_QA_MSX1_MACHINE))
grep "M80: Hello world..." $(DIST_QA_MSX1)/ahello1.out
grep "SDCC: Hello world..." $(DIST_QA_MSX1)/ahello2.out

View file

@ -0,0 +1,55 @@
DIST_QA_MSXHUB_MACHINE ?= Boosted_MSX2+_JP
DIST_QA_MSXHUB := $(PATH_BIN)/dist-qa-msxhub
DIST_QA_MSXHUB_DEPS := $(subst dist,dist-qa-msxhub,$(DIST_DEPS))
BUILD_HELP += \\n\\t* dist-qa-msxhub-run\\n\\t* dist-qa-msxhub-assert
$(DIST_QA_MSXHUB):
$(call mb_mkdir,$(DIST_QA_MSXHUB))
$(call mb_mkdir,$(DIST_QA_MSXHUB)/utils)
$(call mb_msxhub_get_dos2_utils,$(DIST_QA_MSXHUB)/utils)
$(call mb_msxhub_get_nextor_utils,$(DIST_QA_MSXHUB)/utils)
$(call mb_msxhub_get_macro80,$(DIST_QA_MSXHUB)/utils)
$(call mb_msxhub_get_z80asmuk,$(DIST_QA_MSXHUB)/utils)
$(call mb_msxhub_get_wbass2,$(DIST_QA_MSXHUB)/utils)
$(call mb_msxhub_get_konpass,$(DIST_QA_MSXHUB)/utils)
$(call mb_msxhub_get_pmarc,$(DIST_QA_MSXHUB)/utils)
$(call mb_msxhub_get_lhpack,$(DIST_QA_MSXHUB)/utils)
$(call mb_msxhub_get_lhext,$(DIST_QA_MSXHUB)/utils)
$(call mb_msxhub_get_gunzip,$(DIST_QA_MSXHUB)/utils)
$(call mb_msxhub_get_tunzip,$(DIST_QA_MSXHUB)/utils)
$(call mb_msxhub_get_popcom,$(DIST_QA_MSXHUB)/utils)
$(call mb_msxhub_get_make,$(DIST_QA_MSXHUB)/utils)
$(call mb_msxhub_get_adir,$(DIST_QA_MSXHUB)/utils)
$(call mb_msxhub_get_turbo,$(DIST_QA_MSXHUB)/utils)
$(call mb_msxhub_get_baskom,$(DIST_QA_MSXHUB)/utils)
$(call mb_msxhub_get_binldr,$(DIST_QA_MSXHUB)/utils)
$(call mb_msxhub_get_dmphex,$(DIST_QA_MSXHUB)/utils)
$(call mb_msxhub_get_zd,$(DIST_QA_MSXHUB)/utils)
$(call mb_msxhub_get_msxdos2t,$(DIST_QA_MSXHUB)/utils)
$(call mb_msxhub_get_gfxage,$(DIST_QA_MSXHUB)/utils)
$(DIST_QA_MSXHUB)/%: bin/dist/% | $(DIST_QA_MSXHUB) $(DIST_DEPS)
$(call mb_copy,$<,$@)
.PHONY: dist-qa-msxhub-run
dist-qa-msxhub-run: | $(DIST_QA_MSXHUB_DEPS)
$(call mb_autoexec_show_gui80,$(DIST_QA_MSXHUB),dir/w)
$(call mb_openmsx_dosctl,$(DIST_QA_MSXHUB),$(DIST_QA_MSXHUB_MACHINE))
.PHONY: dist-qa-msxhub-assert
dist-qa-msxhub-assert: | $(DIST_QA_MSXHUB_DEPS)
$(call mb_delete,$(DIST_QA_MSXHUB)/ahello1.out)
$(call mb_delete,$(DIST_QA_MSXHUB)/ahello2.out)
$(call mb_delete,$(DIST_QA_MSXHUB)/utils.out)
$(call mb_autoexec_write_default,$(DIST_QA_MSXHUB),80)
$(call mb_autoexec_append_safe_test,$(DIST_QA_MSXHUB),ahello1 > ahello1.out)
$(call mb_autoexec_append_safe_test,$(DIST_QA_MSXHUB),ahello2 > ahello2.out)
$(call mb_autoexec_append_safe_test,$(DIST_QA_MSXHUB),dir utils > utils.out)
$(call mb_autoexec_append_cmd,$(DIST_QA_MSXHUB),dir/w)
$(call mb_autoexec_append_exit,$(DIST_QA_MSXHUB))
$(call mb_openmsx_dosctl,$(DIST_QA_MSXHUB),$(DIST_QA_MSXHUB_MACHINE))
grep "M80: Hello world..." $(DIST_QA_MSXHUB)/ahello1.out
grep "SDCC: Hello world..." $(DIST_QA_MSXHUB)/ahello2.out
grep "KONPASS COM" $(DIST_QA_MSXHUB)/utils.out
grep "MAKE COM" $(DIST_QA_MSXHUB)/utils.out

25
src/dist/0module.mk vendored Normal file
View file

@ -0,0 +1,25 @@
DIST_MOD := dist
DIST_SRC := src/$(DIST_MOD)
DIST_BIN := $(PATH_BIN)/$(DIST_MOD)
DIST_OUT := $(PATH_BIN)/$(DIST_MOD).tar.gz
DIST_DEPS := $(DIST_BIN)/readme.txt $(DIST_BIN)/ahello1.com $(DIST_BIN)/ahello2.com
BUILD_HELP += \\n\\t* $(DIST_OUT)\\n\\t* dist-prepare
$(DIST_BIN):
$(call mb_mkdir,$(DIST_BIN))
$(DIST_BIN)/readme.txt: $(DIST_SRC)/readme.txt | $(DIST_BIN)
$(call mb_unix2dos,$<,$@)
$(DIST_BIN)/ahello1.com: bin/ahello-m80/ahello.com | $(DIST_BIN)
$(call mb_copy,$<,$@)
$(DIST_BIN)/ahello2.com: bin/ahello-sdcc/ahello.com | $(DIST_BIN)
$(call mb_copy,$<,$@)
.PHONY: dist-prepare
dist-prepare: | $(DIST_DEPS)
$(DIST_OUT): | dist-prepare
$(call mb_create_dist,$(DIST_OUT),$(DIST_BIN))

View file

@ -1,20 +0,0 @@
BUILD_HELP += \\n\\t* assert-all \(Run all asertion tests\)\\n\\t* assert-all-video \(Merges all videos to one\)
BUILD_TEST := \
test-ahello-m80-assert \
test-ahello-sdcc-assert \
test-dist-qa-dos1-assert \
test-dist-qa-dos2-assert \
test-dist-qa-msx1-assert \
test-dist-qa-msxhub-assert
.PHONY: assert-all
assert-all: | $(BUILD_TEST)
@echo === All assertions completed
.PHONY: assert-all-video
assert-all-video: | assert-all
@echo === Build session video listing
ls -1tr bin/test/*-omsx/videos/msxbuild-*.avi | awk -F "bin/test/" -v s="file '" -v e="'" '{print s$$2e}' > bin/test/video-merge.lst
ffmpeg -v quiet -y -f concat -i bin/test/video-merge.lst -c copy bin/test/video-session.avi
@echo === Concatted video completed

View file

@ -1,36 +0,0 @@
TEST_AHELLO_M80 := $(PATH_BIN)/test/ahello-m80
BUILD_HELP += \\n\\t* $(TEST_AHELLO_M80)/ahello.com\\n\\t* test-ahello-m80-run\\n\\t* test-ahello-m80-assert
$(TEST_AHELLO_M80):
$(call mb_mkdir,$(TEST_AHELLO_M80))
$(call mb_mkdir,$(TEST_AHELLO_M80)/utils)
$(call mb_msxhub_get_macro80,$(TEST_AHELLO_M80)/utils)
$(call mb_msxhub_get_z80asmuk,$(TEST_AHELLO_M80)/utils)
$(TEST_AHELLO_M80)/%.mac: test/ahello-m80/%.mac | $(TEST_AHELLO_M80)
$(call mb_unix2dos,$<,$@)
$(TEST_AHELLO_M80)/ahello.rel: $(TEST_AHELLO_M80)/ahello.mac
$(call mb_autoexec_safe_cmd,$(TEST_AHELLO_M80),m80 =ahello/Z)
$(call mb_openmsx_dosctl,$(TEST_AHELLO_M80))
$(TEST_AHELLO_M80)/ahello.hex: $(TEST_AHELLO_M80)/ahello.rel
$(call mb_autoexec_safe_cmd,$(TEST_AHELLO_M80),l80 ahello$(MB_COMMA)ahello/N/X/Y/E)
$(call mb_openmsx_dosctl,$(TEST_AHELLO_M80))
$(TEST_AHELLO_M80)/ahello.com: $(TEST_AHELLO_M80)/ahello.hex
$(call mb_autoexec_safe_cmd,$(TEST_AHELLO_M80),hextocom ahello)
$(call mb_openmsx_dosctl,$(TEST_AHELLO_M80))
.PHONY: test-ahello-m80-run
test-ahello-m80-run: $(TEST_AHELLO_M80)/ahello.com
$(call mb_autoexec_show_gui80,$(TEST_AHELLO_M80))
$(call mb_openmsx_dosctl,$(TEST_AHELLO_M80))
.PHONY: test-ahello-m80-assert
test-ahello-m80-assert: $(TEST_AHELLO_M80)/ahello.com
$(call mb_delete,$(TEST_AHELLO_M80)/ahello.out)
$(call mb_autoexec_safe_test,$(TEST_AHELLO_M80),ahello > ahello.out)
$(call mb_openmsx_dosctl,$(TEST_AHELLO_M80))
grep "M80: Hello world..." $(TEST_AHELLO_M80)/ahello.out

View file

@ -1,27 +0,0 @@
TEST_AHELLO_SDCC := $(PATH_BIN)/test/ahello-sdcc
BUILD_HELP += \\n\\t* $(TEST_AHELLO_SDCC)/ahello.com\\n\\t* test-ahello-sdcc-run\\n\\t* test-ahello-sdcc-assert
$(TEST_AHELLO_SDCC):
$(call mb_mkdir,$(TEST_AHELLO_SDCC))
$(TEST_AHELLO_SDCC)/%.rel: test/ahello-sdcc/%.asm | $(TEST_AHELLO_SDCC)
$(call mb_sdcc_compile_asm,$<,$@)
$(TEST_AHELLO_SDCC)/ahello.hex: $(TEST_AHELLO_SDCC)/ahello.rel
$(call mb_sdcc_link_asm_dos,$<,$@)
$(TEST_AHELLO_SDCC)/ahello.com: $(TEST_AHELLO_SDCC)/ahello.hex
$(call mb_sdcc_hex2bin,$<,$@)
.PHONY: test-ahello-sdcc-run
test-ahello-sdcc-run: $(TEST_AHELLO_SDCC)/ahello.com
$(call mb_autoexec_show_gui80,$(TEST_AHELLO_SDCC))
$(call mb_openmsx_dosctl,$(TEST_AHELLO_SDCC))
.PHONY: test-ahello-sdcc-assert
test-ahello-sdcc-assert: $(TEST_AHELLO_SDCC)/ahello.com
$(call mb_delete,$(TEST_AHELLO_SDCC)/ahello.out)
$(call mb_autoexec_safe_test,$(TEST_AHELLO_SDCC),ahello > ahello.out)
$(call mb_openmsx_dosctl,$(TEST_AHELLO_SDCC))
grep "SDCC: Hello world..." $(TEST_AHELLO_SDCC)/ahello.out

View file

@ -1,25 +0,0 @@
TEST_DIST_QA_DOS1 := $(PATH_BIN)/test/dist-qa-dos1
TEST_DIST_QA_DOS1_DEPS := $(subst dist,dist-qa-dos1,$(TEST_DIST_DEPS))
BUILD_HELP += \\n\\t* test-dist-qa-dos1-run\\n\\t* test-dist-qa-dos1-assert
$(TEST_DIST_QA_DOS1):
$(call mb_mkdir,$(TEST_DIST_QA_DOS1))
$(call mb_msxhub_get_dos1_boot,$(TEST_DIST_QA_DOS1))
$(TEST_DIST_QA_DOS1)/%: bin/test/dist/% | $(TEST_DIST_QA_DOS1) $(TEST_DIST_DEPS)
$(call mb_copy,$<,$@)
.PHONY: test-dist-qa-dos1-run
test-dist-qa-dos1-run: | $(TEST_DIST_QA_DOS1_DEPS)
$(call mb_autoexec_show_gui80,$(TEST_DIST_QA_DOS1))
$(call mb_openmsx_dosctl,$(TEST_DIST_QA_DOS1))
.PHONY: test-dist-qa-dos1-assert
test-dist-qa-dos1-assert: | $(TEST_DIST_QA_DOS1_DEPS)
$(call mb_autoexec_write_default,$(TEST_DIST_QA_DOS1))
$(call mb_autoexec_append_safe_test,$(TEST_DIST_QA_DOS1),ahello1)
$(call mb_autoexec_append_safe_test,$(TEST_DIST_QA_DOS1),ahello2)
$(call mb_autoexec_append_exit,$(TEST_DIST_QA_DOS1))
$(call mb_openmsx_dosctl,$(TEST_DIST_QA_DOS1))

View file

@ -1,28 +0,0 @@
TEST_DIST_QA_DOS2 := $(PATH_BIN)/test/dist-qa-dos2
TEST_DIST_QA_DOS2_DEPS := $(subst dist,dist-qa-dos2,$(TEST_DIST_DEPS))
BUILD_HELP += \\n\\t* test-dist-qa-dos2-run\\n\\t* test-dist-qa-dos2-assert
$(TEST_DIST_QA_DOS2):
$(call mb_mkdir,$(TEST_DIST_QA_DOS2))
$(call mb_msxhub_get_dos2_boot,$(TEST_DIST_QA_DOS2))
$(TEST_DIST_QA_DOS2)/%: bin/test/dist/% | $(TEST_DIST_QA_DOS2) $(TEST_DIST_DEPS)
$(call mb_copy,$<,$@)
.PHONY: test-dist-qa-dos2-run
test-dist-qa-dos2-run: | $(TEST_DIST_QA_DOS2_DEPS)
$(call mb_autoexec_show_gui80,$(TEST_DIST_QA_DOS2))
$(call mb_openmsx_dosctl,$(TEST_DIST_QA_DOS2))
.PHONY: test-dist-qa-dos2-assert
test-dist-qa-dos2-assert: | $(TEST_DIST_QA_DOS2_DEPS)
$(call mb_delete,$(TEST_DIST_QA_DOS2)/ahello1.out)
$(call mb_delete,$(TEST_DIST_QA_DOS2)/ahello2.out)
$(call mb_autoexec_write_default,$(TEST_DIST_QA_DOS2))
$(call mb_autoexec_append_safe_test,$(TEST_DIST_QA_DOS2),ahello1 > ahello1.out)
$(call mb_autoexec_append_safe_test,$(TEST_DIST_QA_DOS2),ahello2 > ahello2.out)
$(call mb_autoexec_append_exit,$(TEST_DIST_QA_DOS2))
$(call mb_openmsx_dosctl,$(TEST_DIST_QA_DOS2))
grep "M80: Hello world..." $(TEST_DIST_QA_DOS2)/ahello1.out
grep "SDCC: Hello world..." $(TEST_DIST_QA_DOS2)/ahello2.out

View file

@ -1,28 +0,0 @@
TEST_DIST_QA_MSX1_MACHINE ?= Canon_V-20
TEST_DIST_QA_MSX1 := $(PATH_BIN)/test/dist-qa-msx1
TEST_DIST_QA_MSX1_DEPS := $(subst dist,dist-qa-msx1,$(TEST_DIST_DEPS))
BUILD_HELP += \\n\\t* test-dist-qa-msx1-run\\n\\t* test-dist-qa-msx1-assert
$(TEST_DIST_QA_MSX1):
$(call mb_mkdir,$(TEST_DIST_QA_MSX1))
$(TEST_DIST_QA_MSX1)/%: bin/test/dist/% | $(TEST_DIST_QA_MSX1) $(TEST_DIST_DEPS)
$(call mb_copy,$<,$@)
.PHONY: test-dist-qa-msx1-run
test-dist-qa-msx1-run: | $(TEST_DIST_QA_MSX1_DEPS)
$(call mb_autoexec_show_gui40,$(TEST_DIST_QA_MSX1))
$(call mb_openmsx_dosctl,$(TEST_DIST_QA_MSX1),$(TEST_DIST_QA_MSX1_MACHINE))
.PHONY: test-dist-qa-msx1-assert
test-dist-qa-msx1-assert: | $(TEST_DIST_QA_MSX1_DEPS)
$(call mb_delete,$(TEST_DIST_QA_MSX1)/ahello1.out)
$(call mb_delete,$(TEST_DIST_QA_MSX1)/ahello2.out)
$(call mb_autoexec_write_default,$(TEST_DIST_QA_MSX1),40)
$(call mb_autoexec_append_safe_test,$(TEST_DIST_QA_MSX1),ahello1 > ahello1.out,33)
$(call mb_autoexec_append_safe_test,$(TEST_DIST_QA_MSX1),ahello2 > ahello2.out,66,99)
$(call mb_autoexec_append_exit,$(TEST_DIST_QA_MSX1))
$(call mb_openmsx_dosctl,$(TEST_DIST_QA_MSX1),$(TEST_DIST_QA_MSX1_MACHINE))
grep "M80: Hello world..." $(TEST_DIST_QA_MSX1)/ahello1.out
grep "SDCC: Hello world..." $(TEST_DIST_QA_MSX1)/ahello2.out

View file

@ -1,55 +0,0 @@
TEST_DIST_QA_MSXHUB_MACHINE ?= Boosted_MSX2+_JP
TEST_DIST_QA_MSXHUB := $(PATH_BIN)/test/dist-qa-msxhub
TEST_DIST_QA_MSXHUB_DEPS := $(subst dist,dist-qa-msxhub,$(TEST_DIST_DEPS))
BUILD_HELP += \\n\\t* test-dist-qa-msxhub-run\\n\\t* test-dist-qa-msxhub-assert
$(TEST_DIST_QA_MSXHUB):
$(call mb_mkdir,$(TEST_DIST_QA_MSXHUB))
$(call mb_mkdir,$(TEST_DIST_QA_MSXHUB)/utils)
$(call mb_msxhub_get_dos2_utils,$(TEST_DIST_QA_MSXHUB)/utils)
$(call mb_msxhub_get_nextor_utils,$(TEST_DIST_QA_MSXHUB)/utils)
$(call mb_msxhub_get_macro80,$(TEST_DIST_QA_MSXHUB)/utils)
$(call mb_msxhub_get_z80asmuk,$(TEST_DIST_QA_MSXHUB)/utils)
$(call mb_msxhub_get_wbass2,$(TEST_DIST_QA_MSXHUB)/utils)
$(call mb_msxhub_get_konpass,$(TEST_DIST_QA_MSXHUB)/utils)
$(call mb_msxhub_get_pmarc,$(TEST_DIST_QA_MSXHUB)/utils)
$(call mb_msxhub_get_lhpack,$(TEST_DIST_QA_MSXHUB)/utils)
$(call mb_msxhub_get_lhext,$(TEST_DIST_QA_MSXHUB)/utils)
$(call mb_msxhub_get_gunzip,$(TEST_DIST_QA_MSXHUB)/utils)
$(call mb_msxhub_get_tunzip,$(TEST_DIST_QA_MSXHUB)/utils)
$(call mb_msxhub_get_popcom,$(TEST_DIST_QA_MSXHUB)/utils)
$(call mb_msxhub_get_make,$(TEST_DIST_QA_MSXHUB)/utils)
$(call mb_msxhub_get_adir,$(TEST_DIST_QA_MSXHUB)/utils)
$(call mb_msxhub_get_turbo,$(TEST_DIST_QA_MSXHUB)/utils)
$(call mb_msxhub_get_baskom,$(TEST_DIST_QA_MSXHUB)/utils)
$(call mb_msxhub_get_binldr,$(TEST_DIST_QA_MSXHUB)/utils)
$(call mb_msxhub_get_dmphex,$(TEST_DIST_QA_MSXHUB)/utils)
$(call mb_msxhub_get_zd,$(TEST_DIST_QA_MSXHUB)/utils)
$(call mb_msxhub_get_msxdos2t,$(TEST_DIST_QA_MSXHUB)/utils)
$(call mb_msxhub_get_gfxage,$(TEST_DIST_QA_MSXHUB)/utils)
$(TEST_DIST_QA_MSXHUB)/%: bin/test/dist/% | $(TEST_DIST_QA_MSXHUB) $(TEST_DIST_DEPS)
$(call mb_copy,$<,$@)
.PHONY: test-dist-qa-msxhub-run
test-dist-qa-msxhub-run: | $(TEST_DIST_QA_MSXHUB_DEPS)
$(call mb_autoexec_show_gui80,$(TEST_DIST_QA_MSXHUB),dir/w)
$(call mb_openmsx_dosctl,$(TEST_DIST_QA_MSXHUB),$(TEST_DIST_QA_MSXHUB_MACHINE))
.PHONY: test-dist-qa-msxhub-assert
test-dist-qa-msxhub-assert: | $(TEST_DIST_QA_MSXHUB_DEPS)
$(call mb_delete,$(TEST_DIST_QA_MSXHUB)/ahello1.out)
$(call mb_delete,$(TEST_DIST_QA_MSXHUB)/ahello2.out)
$(call mb_delete,$(TEST_DIST_QA_MSXHUB)/utils.out)
$(call mb_autoexec_write_default,$(TEST_DIST_QA_MSXHUB),80)
$(call mb_autoexec_append_safe_test,$(TEST_DIST_QA_MSXHUB),ahello1 > ahello1.out)
$(call mb_autoexec_append_safe_test,$(TEST_DIST_QA_MSXHUB),ahello2 > ahello2.out)
$(call mb_autoexec_append_safe_test,$(TEST_DIST_QA_MSXHUB),dir utils > utils.out)
$(call mb_autoexec_append_cmd,$(TEST_DIST_QA_MSXHUB),dir/w)
$(call mb_autoexec_append_exit,$(TEST_DIST_QA_MSXHUB))
$(call mb_openmsx_dosctl,$(TEST_DIST_QA_MSXHUB),$(TEST_DIST_QA_MSXHUB_MACHINE))
grep "M80: Hello world..." $(TEST_DIST_QA_MSXHUB)/ahello1.out
grep "SDCC: Hello world..." $(TEST_DIST_QA_MSXHUB)/ahello2.out
grep "KONPASS COM" $(TEST_DIST_QA_MSXHUB)/utils.out
grep "MAKE COM" $(TEST_DIST_QA_MSXHUB)/utils.out

25
test/dist/0module.mk vendored
View file

@ -1,25 +0,0 @@
TEST_DIST_NAME := dist
TEST_DIST_SRC := test/$(TEST_DIST_NAME)
TEST_DIST_BIN := $(PATH_BIN)/test/$(TEST_DIST_NAME)
TEST_DIST_OUT := $(PATH_BIN)/test/$(TEST_DIST_NAME).tar.gz
TEST_DIST_DEPS := $(TEST_DIST_BIN)/readme.txt $(TEST_DIST_BIN)/ahello1.com $(TEST_DIST_BIN)/ahello2.com
BUILD_HELP += \\n\\t* $(TEST_DIST_OUT)\\n\\t* test-dist-prepare
$(TEST_DIST_BIN):
$(call mb_mkdir,$(TEST_DIST_BIN))
$(TEST_DIST_BIN)/readme.txt: $(TEST_DIST_SRC)/readme.txt | $(TEST_DIST_BIN)
$(call mb_unix2dos,$<,$@)
$(TEST_DIST_BIN)/ahello1.com: bin/test/ahello-m80/ahello.com | $(TEST_DIST_BIN)
$(call mb_copy,$<,$@)
$(TEST_DIST_BIN)/ahello2.com: bin/test/ahello-sdcc/ahello.com | $(TEST_DIST_BIN)
$(call mb_copy,$<,$@)
.PHONY: test-dist-prepare
test-dist-prepare: | $(TEST_DIST_DEPS)
$(TEST_DIST_OUT): | test-dist-prepare
$(call mb_create_dist,$(TEST_DIST_OUT),$(TEST_DIST_BIN))