Using open gui optional command + fixed all echo escaping.
All checks were successful
Run test asserts / Test-Asserts (push) Successful in -7s

This commit is contained in:
Willem Cazander 2024-06-29 03:08:21 +02:00
parent be6e4c5aa6
commit 5a97dc89e7
3 changed files with 5 additions and 13 deletions

View file

@ -84,9 +84,7 @@ Current set is WIP.
* mb_autoexec_append_safe_cmd * mb_autoexec_append_safe_cmd
* mb_autoexec_write_default * mb_autoexec_write_default
* mb_autoexec_open_gui40 * mb_autoexec_open_gui40
* mb_autoexec_open_gui40_cmd
* mb_autoexec_open_gui80 * mb_autoexec_open_gui80
* mb_autoexec_open_gui80_cmd
* mb_autoexec_safe_cmd * mb_autoexec_safe_cmd
* mb_autoexec_safe_test * mb_autoexec_safe_test
* mb_msxhub_file * mb_msxhub_file

View file

@ -11,7 +11,7 @@ define mb_autoexec_append_cmd
echo "$(2)\r" >> $(1)/autoexec.bat echo "$(2)\r" >> $(1)/autoexec.bat
endef endef
define mb_autoexec_append_echo define mb_autoexec_append_echo
$(call mb_autoexec_append_cmd,$(1),echo $(2)) $(call mb_autoexec_append_cmd,$(1),echo $(subst >,>,$(2)))
endef endef
define mb_autoexec_append_rem define mb_autoexec_append_rem
$(call mb_autoexec_append_cmd,$(1),rem $(2)) $(call mb_autoexec_append_cmd,$(1),rem $(2))
@ -29,12 +29,12 @@ define mb_autoexec_append_exit
endef endef
define mb_autoexec_append_safe_test define mb_autoexec_append_safe_test
$(call mb_autoexec_append_cmd,$(1),omsxctl fail_after $(if $(3),$(3),$(MB_AUTOEXEC_TEST_TIMEOUT)) seconds failed_test $(if $(4),$(4),$(MB_AUTOEXEC_TEST_EXITCODE))) $(call mb_autoexec_append_cmd,$(1),omsxctl fail_after $(if $(3),$(3),$(MB_AUTOEXEC_TEST_TIMEOUT)) seconds failed_test $(if $(4),$(4),$(MB_AUTOEXEC_TEST_EXITCODE)))
$(call mb_autoexec_append_echo,$(1),Running test: $(subst >,>,$(2))) $(call mb_autoexec_append_echo,$(1),Running test: $(2))
$(call mb_autoexec_append_cmd,$(1),$(2)) $(call mb_autoexec_append_cmd,$(1),$(2))
endef endef
define mb_autoexec_append_safe_cmd define mb_autoexec_append_safe_cmd
$(call mb_autoexec_append_cmd,$(1),omsxctl fail_after $(if $(3),$(3),$(MB_AUTOEXEC_CMD_TIMEOUT)) seconds failed_cmd $(if $(4),$(4),$(MB_AUTOEXEC_CMD_EXITCODE))) $(call mb_autoexec_append_cmd,$(1),omsxctl fail_after $(if $(3),$(3),$(MB_AUTOEXEC_CMD_TIMEOUT)) seconds failed_cmd $(if $(4),$(4),$(MB_AUTOEXEC_CMD_EXITCODE)))
$(call mb_autoexec_append_echo,$(1),Running command: $(subst >,>,$(2))) $(call mb_autoexec_append_echo,$(1),Running command: $(2))
$(call mb_autoexec_append_cmd,$(1),$(2)) $(call mb_autoexec_append_cmd,$(1),$(2))
endef endef
define mb_autoexec_write_default define mb_autoexec_write_default
@ -59,19 +59,13 @@ define _mb_autoexec_open_gui
$(call mb_autoexec_append_stop_fail,$(1)) $(call mb_autoexec_append_stop_fail,$(1))
$(call mb_autoexec_append_gui_mode,$(1)) $(call mb_autoexec_append_gui_mode,$(1))
$(call mb_autoexec_append_echo,$(1),Type shutdown to stop emulation.) $(call mb_autoexec_append_echo,$(1),Type shutdown to stop emulation.)
$(if $(3),$(call mb_autoexec_append_echo,$(1),Running command '$(3)')) $(if $(3),$(call mb_autoexec_append_echo,$(1),Running command: $(3)))
$(if $(3),$(call mb_autoexec_append_cmd,$(1),$(3))) $(if $(3),$(call mb_autoexec_append_cmd,$(1),$(3)))
endef endef
define mb_autoexec_open_gui40 define mb_autoexec_open_gui40
$(call _mb_autoexec_open_gui,$(1),40)
endef
define mb_autoexec_open_gui40_cmd
$(call _mb_autoexec_open_gui,$(1),40,$(2)) $(call _mb_autoexec_open_gui,$(1),40,$(2))
endef endef
define mb_autoexec_open_gui80 define mb_autoexec_open_gui80
$(call _mb_autoexec_open_gui,$(1),80)
endef
define mb_autoexec_open_gui80_cmd
$(call _mb_autoexec_open_gui,$(1),80,$(2)) $(call _mb_autoexec_open_gui,$(1),80,$(2))
endef endef

View file

@ -30,7 +30,7 @@ $(TEST_DIST_QA_MSXHUB)/%: bin/test/dist/% | $(TEST_DIST_QA_MSXHUB) $(TEST_DIST_D
.PHONY: test-dist-qa-msxhub-run .PHONY: test-dist-qa-msxhub-run
test-dist-qa-msxhub-run: | $(TEST_DIST_QA_MSXHUB_DEPS) test-dist-qa-msxhub-run: | $(TEST_DIST_QA_MSXHUB_DEPS)
$(call mb_autoexec_open_gui80_cmd,$(TEST_DIST_QA_MSXHUB),dir/w utils) $(call mb_autoexec_open_gui80,$(TEST_DIST_QA_MSXHUB),dir/w utils)
$(call mb_openmsx_dosctl,$(TEST_DIST_QA_MSXHUB),$(TEST_DIST_QA_MSXHUB_MACHINE)) $(call mb_openmsx_dosctl,$(TEST_DIST_QA_MSXHUB),$(TEST_DIST_QA_MSXHUB_MACHINE))
.PHONY: test-dist-qa-msxhub-assert .PHONY: test-dist-qa-msxhub-assert