Renamed tcl scritps.
All checks were successful
Run test asserts / Test-Asserts (push) Successful in -10s

This commit is contained in:
Willem Cazander 2024-06-30 13:52:33 +02:00
parent c9b78d57c4
commit ab02b54175
5 changed files with 74 additions and 74 deletions

View file

@ -17,7 +17,7 @@ define mb_autoexec_append_rem
$(call mb_autoexec_append_cmd,$(1),rem $(2))
endef
define mb_autoexec_append_show_gui
$(call mb_autoexec_append_cmd,$(1),omsxctl boot_mode_show_gui)
$(call mb_autoexec_append_cmd,$(1),omsxctl headless_show_gui)
endef
define mb_autoexec_append_stop_fail
$(call mb_autoexec_append_cmd,$(1),omsxctl fail_after 0)
@ -30,10 +30,10 @@ define mb_autoexec_append_joyporta_mouse
$(call mb_autoexec_append_cmd,$(1),omsxctl plug joyporta mouse)
endef
define mb_autoexec_append_save_screenshot
$(call mb_autoexec_append_cmd,$(1),omsxctl save_flight_screenshot $(2))
$(call mb_autoexec_append_cmd,$(1),omsxctl night_flight_save_screenshot $(2))
endef
define mb_autoexec_append_save_video
$(call mb_autoexec_append_cmd,$(1),omsxctl save_flight_video $(2))
$(call mb_autoexec_append_cmd,$(1),omsxctl night_flight_save_video $(2))
endef
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)))

View file

@ -21,9 +21,9 @@ define mb_openmsx_setup
$(if $(wildcard $(1)-omsx/share/scripts),,$(call mb_mkdir,$(1)-omsx/share/scripts))
$(if $(wildcard $(1)-omsx/share/scripts/boot_exec.tcl),,$(call mb_copy,$(PATH_MSXBUILD_REAL)/lib/openmsx/share/scripts/boot_exec.tcl,$(1)-omsx/share/scripts))
$(if $(wildcard $(1)-omsx/share/scripts/boot_hdd.tcl),,$(call mb_copy,$(PATH_MSXBUILD_REAL)/lib/openmsx/share/scripts/boot_hdd.tcl,$(1)-omsx/share/scripts))
$(if $(wildcard $(1)-omsx/share/scripts/boot_mode.tcl),,$(call mb_copy,$(PATH_MSXBUILD_REAL)/lib/openmsx/share/scripts/boot_mode.tcl,$(1)-omsx/share/scripts))
$(if $(wildcard $(1)-omsx/share/scripts/fail_after.tcl),,$(call mb_copy,$(PATH_MSXBUILD_REAL)/lib/openmsx/share/scripts/fail_after.tcl,$(1)-omsx/share/scripts))
$(if $(wildcard $(1)-omsx/share/scripts/save_flight.tcl),,$(call mb_copy,$(PATH_MSXBUILD_REAL)/lib/openmsx/share/scripts/save_flight.tcl,$(1)-omsx/share/scripts))
$(if $(wildcard $(1)-omsx/share/scripts/headless.tcl),,$(call mb_copy,$(PATH_MSXBUILD_REAL)/lib/openmsx/share/scripts/headless.tcl,$(1)-omsx/share/scripts))
$(if $(wildcard $(1)-omsx/share/scripts/night_flight.tcl),,$(call mb_copy,$(PATH_MSXBUILD_REAL)/lib/openmsx/share/scripts/night_flight.tcl,$(1)-omsx/share/scripts))
$(if $(wildcard $(1)-omsx/share/scripts/omsxctl.tcl),,$(call mb_msxhub_file,$(1)-omsx/share/scripts,OMSXCTL/1.0-1/get/OMSXCTL/omsxctl.tcl))
$(if $(wildcard $(1)-omsx/share/extensions),,$(call mb_mkdir,$(1)-omsx/share/extensions))
$(if $(wildcard $(1)-omsx/share/extensions/ide-nextor.xml),,$(call mb_copy,$(PATH_MSXBUILD_REAL)/lib/openmsx/share/extensions/ide-nextor.xml,$(1)-omsx/share/extensions))
@ -43,9 +43,9 @@ define _mb_openmsx_run
HEADLESS=$(MB_OPENMSX_HEADLESS) \
RENDERER=$(MB_OPENMSX_RENDERER) \
THROTTLE=$(MB_OPENMSX_THROTTLE) \
SAVE_FLIGHT_PREFIX=$(MB_FLIGHT_PREFIX) \
SAVE_FLIGHT_SEPERATOR=$(MB_FLIGHT_SEPERATOR) \
SAVE_FLIGHT_RECORD_FLAG=$(MB_FLIGHT_RECORD_FLAG) \
NF_PREFIX=$(MB_FLIGHT_PREFIX) \
NF_SEPERATOR=$(MB_FLIGHT_SEPERATOR) \
NF_RECORD_FLAG=$(MB_FLIGHT_RECORD_FLAG) \
OPENMSX_HOME="$(1)-omsx" \
$(PATH_OPENMSX)/openmsx \
-machine $(2) \

View file

@ -1,10 +1,10 @@
# boot_mode -- Controls the boot mode config of openMSX from environment variables.
# headless -- Controls the boot mode config of openMSX from environment variables.
#
# Typically used in automation tools which run openMSX without human interaction.
#
# Adds the following command to openMSX;
#
# 'boot_mode_show_gui'
# 'headless_show_gui'
# Enables the renderer and throttle from the inside.
#
# Supported environment variables by this script;
@ -27,7 +27,7 @@
set boot_env_renderer_type 0
proc boot_mode_show_gui {} {
proc headless_show_gui {} {
global renderer
global throttle
global boot_env_renderer_type

View file

@ -0,0 +1,63 @@
# night_flight -- Setup the travel for night flight black box recorder for build pipelines.
#
# Adds the following command to openMSX;
#
# 'night_flight_save_screenshot'
# Takes an screenshot with optional prefix parameter.
#
# 'night_flight_save_video'
# Starts video recording with optional prefix parameter.
#
# Supported environment variables by this script;
#
# NF_PREFIX=msxbuild
# Gives screenshots and videos an prefix; msxbuild0001.avi
#
# NF_SEPERATOR=-
# Gives screenshots and videos an seperator; openmsx-0001.png
#
# NF_RECORD_FLAG=-doublesize
# Flag given to the video record command.
#
set night_flight_prefix flight
set night_flight_seperator -
set night_flight_record_flag ""
proc night_flight_save_screenshot {{prefix_id 0}} {
global night_flight_prefix
global night_flight_seperator
if {$prefix_id != 0} {
set file_prefix "$prefix_id$night_flight_seperator"
} else {
set file_prefix "$night_flight_prefix$night_flight_seperator"
}
screenshot -prefix $file_prefix
return "Flight screenshot saved"
}
proc night_flight_save_video {{prefix_id 0}} {
global night_flight_prefix
global night_flight_seperator
global night_flight_record_flag
if {$prefix_id != 0} {
set file_prefix "$prefix_id$night_flight_seperator"
} else {
set file_prefix "$night_flight_prefix$night_flight_seperator"
}
after quit "record stop"
after time 1 "record start $night_flight_record_flag -prefix $file_prefix"
return "Flight video started"
}
if {[info exists ::env(NF_PREFIX)] && ([string trim $::env(NF_PREFIX)] != "")} {
set night_flight_prefix [string trim $::env(NF_PREFIX)]
}
if {[info exists ::env(NF_SEPERATOR)] && ([string trim $::env(NF_SEPERATOR)] != "")} {
set night_flight_seperator [string trim $::env(NF_SEPERATOR)]
}
if {[info exists ::env(NF_RECORD_FLAG)] && ([string trim $::env(NF_RECORD_FLAG)] != "")} {
set night_flight_record_flag [string trim $::env(NF_RECORD_FLAG)]
}

View file

@ -1,63 +0,0 @@
# safe_flight -- Setup the black box flight recorder for build pipelines.
#
# Adds the following command to openMSX;
#
# 'save_flight_screenshot'
# Takes an screenshot with optional prefix parameter.
#
# 'save_flight_video'
# Starts video recording with optional prefix parameter.
#
# Supported environment variables by this script;
#
# SAVE_FLIGHT_PREFIX=msxbuild
# Gives screenshots and videos an prefix; msxbuild0001.avi
#
# SAVE_FLIGHT_SEPERATOR=-
# Gives screenshots and videos an seperator; openmsx-0001.png
#
# SAVE_FLIGHT_RECORD_FLAG=-doublesize
# Flag given to the video record command.
#
set save_flight_prefix flight
set save_flight_seperator -
set save_flight_record_flag ""
proc save_flight_screenshot {{prefix_id 0}} {
global save_flight_prefix
global save_flight_seperator
if {$prefix_id != 0} {
set file_prefix "$prefix_id$save_flight_seperator"
} else {
set file_prefix "$save_flight_prefix$save_flight_seperator"
}
screenshot -prefix $file_prefix
return "Flight screenshot saved"
}
proc save_flight_video {{prefix_id 0}} {
global save_flight_prefix
global save_flight_seperator
global save_flight_record_flag
if {$prefix_id != 0} {
set file_prefix "$prefix_id$save_flight_seperator"
} else {
set file_prefix "$save_flight_prefix$save_flight_seperator"
}
after quit "record stop"
after time 1 "record start $save_flight_record_flag -prefix $file_prefix"
return "Flight video started"
}
if {[info exists ::env(SAVE_FLIGHT_PREFIX)] && ([string trim $::env(SAVE_FLIGHT_PREFIX)] != "")} {
set save_flight_prefix [string trim $::env(SAVE_FLIGHT_PREFIX)]
}
if {[info exists ::env(SAVE_FLIGHT_SEPERATOR)] && ([string trim $::env(SAVE_FLIGHT_SEPERATOR)] != "")} {
set save_flight_seperator [string trim $::env(SAVE_FLIGHT_SEPERATOR)]
}
if {[info exists ::env(SAVE_FLIGHT_RECORD_FLAG)] && ([string trim $::env(SAVE_FLIGHT_RECORD_FLAG)] != "")} {
set save_flight_record_flag [string trim $::env(SAVE_FLIGHT_RECORD_FLAG)]
}