Added dos1 and dos2 asserts of hello worlds.
All checks were successful
Run test asserts / Test-Asserts (push) Successful in 1s
All checks were successful
Run test asserts / Test-Asserts (push) Successful in 1s
This commit is contained in:
parent
e6301e9d48
commit
5562fe0d7a
|
@ -33,6 +33,11 @@ endef
|
|||
define mb_autoexec_append_exit
|
||||
$(call mb_autoexec_append_cmd,$(1),omsxctl exit 0)
|
||||
endef
|
||||
define mb_autoexec_append_cmd_test
|
||||
$(call mb_autoexec_append_cmd,$(1),omsxctl fail_after $(MB_AUTOEXEC_TEST_TIMEOUT) seconds failed_test $(MB_AUTOEXEC_TEST_EXITCODE))
|
||||
$(call mb_autoexec_append_echo,$(1),Running test '$(2)')
|
||||
$(call mb_autoexec_append_cmd,$(1),$(2))
|
||||
endef
|
||||
define mb_autoexec_write_default
|
||||
echo -n "" > $(1)/autoexec.bat
|
||||
$(if $(filter true,$(MB_AUTOEXEC_BYSELF)),$(call mb_autoexec_append_rem,$(1),$(MB_AUTOEXEC_BYSELF_MSG)))
|
||||
|
|
|
@ -2,7 +2,9 @@
|
|||
BUILD_HELP += \\n\\t* assert-all \(Run all asertion tests\)
|
||||
BUILD_TEST := \
|
||||
test-ahello-m80-assert \
|
||||
test-ahello-sdcc-assert
|
||||
test-ahello-sdcc-assert \
|
||||
test-dist-qa-dos1-assert \
|
||||
test-dist-qa-dos2-assert
|
||||
|
||||
.PHONY: assert-all
|
||||
assert-all: $(BUILD_TEST)
|
||||
|
|
|
@ -31,6 +31,6 @@ test-ahello-m80-run: $(TEST_AHELLO_M80)/ahello.com
|
|||
.PHONY: test-ahello-m80-assert
|
||||
test-ahello-m80-assert: $(TEST_AHELLO_M80)/ahello.com
|
||||
$(call mb_delete,$(TEST_AHELLO_M80)/test.out)
|
||||
$(call mb_autoexec_cmd_test,$(TEST_AHELLO_M80),ahello > test.out)
|
||||
$(call mb_autoexec_cmd_test,$(TEST_AHELLO_M80),ahello > ahello.out)
|
||||
$(call mb_openmsx_dosctl,$(TEST_AHELLO_M80))
|
||||
grep "M80: Hello world..." $(TEST_AHELLO_M80)/test.out
|
||||
grep "M80: Hello world..." $(TEST_AHELLO_M80)/ahello.out
|
||||
|
|
|
@ -24,6 +24,6 @@ test-ahello-sdcc-run: $(TEST_AHELLO_SDCC)/ahello.com
|
|||
.PHONY: test-ahello-sdcc-assert
|
||||
test-ahello-sdcc-assert: $(TEST_AHELLO_SDCC)/ahello.com
|
||||
$(call mb_delete,$(TEST_AHELLO_SDCC)/test.out)
|
||||
$(call mb_autoexec_cmd_test,$(TEST_AHELLO_SDCC),ahello > test.out)
|
||||
$(call mb_autoexec_cmd_test,$(TEST_AHELLO_SDCC),ahello > ahello.out)
|
||||
$(call mb_openmsx_dosctl,$(TEST_AHELLO_SDCC))
|
||||
grep "SDCC: Hello world..." $(TEST_AHELLO_SDCC)/test.out
|
||||
grep "SDCC: Hello world..." $(TEST_AHELLO_SDCC)/ahello.out
|
||||
|
|
29
test/dist-qa-dos1/0module.mk
Normal file
29
test/dist-qa-dos1/0module.mk
Normal file
|
@ -0,0 +1,29 @@
|
|||
|
||||
TEST_DIST_QA_DOS1 := $(PATH_BIN)/test/dist-qa-dos1
|
||||
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_package_emuctl,$(TEST_DIST_QA_DOS1))
|
||||
$(call mb_package_dos1,$(TEST_DIST_QA_DOS1))
|
||||
|
||||
$(TEST_DIST_QA_DOS1)/ahello1.com: bin/test/dist/ahello1.com | $(TEST_DIST_QA_DOS1)
|
||||
$(call mb_copy,$<,$@)
|
||||
|
||||
$(TEST_DIST_QA_DOS1)/ahello2.com: bin/test/dist/ahello2.com | $(TEST_DIST_QA_DOS1)
|
||||
$(call mb_copy,$<,$@)
|
||||
|
||||
.PHONY: test-dist-qa-dos1-run
|
||||
test-dist-qa-dos1-run: | $(TEST_DIST_QA_DOS1)/ahello1.com $(TEST_DIST_QA_DOS1)/ahello2.com
|
||||
$(call mb_autoexec_open_gui,$(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)/ahello1.com $(TEST_DIST_QA_DOS1)/ahello2.com
|
||||
$(call mb_delete,$(TEST_DIST_QA_DOS1)/test.out)
|
||||
$(call mb_autoexec_write_default,$(TEST_DIST_QA_DOS1))
|
||||
$(call mb_autoexec_append_cmd_test,$(TEST_DIST_QA_DOS1),ahello1)
|
||||
$(call mb_autoexec_append_cmd_test,$(TEST_DIST_QA_DOS1),ahello2)
|
||||
$(call mb_autoexec_append_exit,$(TEST_DIST_QA_DOS1))
|
||||
$(call mb_openmsx_dosctl,$(TEST_DIST_QA_DOS1))
|
||||
|
30
test/dist-qa-dos2/0module.mk
Normal file
30
test/dist-qa-dos2/0module.mk
Normal file
|
@ -0,0 +1,30 @@
|
|||
|
||||
TEST_DIST_QA_DOS2 := $(PATH_BIN)/test/dist-qa-dos2
|
||||
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_package_emuctl,$(TEST_DIST_QA_DOS2))
|
||||
$(call mb_package_dos2,$(TEST_DIST_QA_DOS2))
|
||||
|
||||
$(TEST_DIST_QA_DOS2)/ahello1.com: bin/test/dist/ahello1.com | $(TEST_DIST_QA_DOS2)
|
||||
$(call mb_copy,$<,$@)
|
||||
|
||||
$(TEST_DIST_QA_DOS2)/ahello2.com: bin/test/dist/ahello2.com | $(TEST_DIST_QA_DOS2)
|
||||
$(call mb_copy,$<,$@)
|
||||
|
||||
.PHONY: test-dist-qa-dos2-run
|
||||
test-dist-qa-dos2-run: | $(TEST_DIST_QA_DOS2)/ahello1.com $(TEST_DIST_QA_DOS2)/ahello2.com
|
||||
$(call mb_autoexec_open_gui,$(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)/ahello1.com $(TEST_DIST_QA_DOS2)/ahello2.com
|
||||
$(call mb_delete,$(TEST_DIST_QA_DOS2)/test.out)
|
||||
$(call mb_autoexec_write_default,$(TEST_DIST_QA_DOS2))
|
||||
$(call mb_autoexec_append_cmd_test,$(TEST_DIST_QA_DOS2),ahello1 > ahello1.out)
|
||||
$(call mb_autoexec_append_cmd_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
|
25
test/dist/0module.mk
vendored
Normal file
25
test/dist/0module.mk
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
|
||||
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_INC := readme.txt
|
||||
BUILD_HELP += \\n\\t* $(TEST_DIST_OUT)
|
||||
|
||||
$(TEST_DIST_BIN):
|
||||
$(call mb_mkdir,$(TEST_DIST_BIN))
|
||||
|
||||
$(TEST_DIST_BIN)/readme.txt: $(TEST_DIST_SRC)/readme.txt | $(TEST_DIST_BIN)
|
||||
$(call mb_copy,$<,$@)
|
||||
|
||||
$(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,$<,$@)
|
||||
|
||||
$(TEST_DIST_OUT): \
|
||||
$(TEST_DIST_BIN)/readme.txt \
|
||||
$(TEST_DIST_BIN)/ahello1.com \
|
||||
$(TEST_DIST_BIN)/ahello2.com
|
||||
$(call mb_create_dist,$(TEST_DIST_OUT),$(TEST_DIST_BIN))
|
2
test/dist/readme.txt
vendored
Normal file
2
test/dist/readme.txt
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
|
||||
Test readme
|
Loading…
Reference in a new issue