Post Check Build (#984)
Some checks are pending
Build RetroDECK / Build_RetroDECK (push) Waiting to run
Build RetroDECK / GitHub-publish (push) Blocked by required conditions
Build RetroDECK / Automated_Tests (push) Blocked by required conditions

* Fix features.json, add srm launcher

* Logging

* Set correct logging levels

* Bob makes it nexy year already!

* full splash screen dates

* Alpha version of post build check

* Bob makes a comeback, by adding a cli argument
This commit is contained in:
MonkeyX 2024-12-11 20:47:50 +00:00 committed by GitHub
parent a11e1bbf39
commit 24ed79a228
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 83 additions and 9 deletions

View file

@ -0,0 +1,55 @@
#!/bin/bash
# todo create launch test commands ie mame -help, ruffle --version
# Log file
LOG_FILE="$HOME/check.log"
# Clear previous log
> "$LOG_FILE"
# Extract launch commands and CLI arguments using jq
mapfile -t commands < <(jq -r '.emulator | to_entries[] | [.value.launch, .value."cli-arg"] | @tsv' /app/retrodeck/config/retrodeck/reference_lists//features.json)
# Timeout duration in seconds
TIMEOUT=3
# Function to run command with timeout
run_and_check() {
local cmd="$1"
local cli_arg="${2:-}"
local full_cmd="${cmd}${cli_arg:+ $cli_arg}"
# Verify command exists
if ! command -v "$cmd" &> /dev/null; then
echo "✗ Command not found: $cmd (Exit Code: 127)" | tee -a "$LOG_FILE"
return 127
fi
# Run command with timeout
timeout -s TERM $TIMEOUT $full_cmd
local exit_code=$?
# Log the results
echo "Command: $full_cmd, Exit Code: $exit_code" | tee -a "$LOG_FILE"
case $exit_code in
0)
echo "$full_cmd completed successfully" | tee -a "$LOG_FILE"
;;
124)
echo "$full_cmd terminated after $TIMEOUT seconds" | tee -a "$LOG_FILE"
;;
137)
echo "$full_cmd killed" | tee -a "$LOG_FILE"
;;
*)
echo "$full_cmd failed" | tee -a "$LOG_FILE"
;;
esac
return $exit_code
}
# Execute commands
for entry in "${commands[@]}"; do
# Split the TSV entry into command and CLI arg
IFS=$'\t' read -r cmd cli_arg <<< "$entry"
# Run the command with optional CLI argument
run_and_check "$cmd" "$cli_arg"
done

View file

@ -835,6 +835,7 @@
"name": "RetroArch",
"url": "https://retrodeck.readthedocs.io/en/latest/wiki_emulator_guides/retroarch/retroarch-guide/",
"launch": "retroarch",
"cli-arg": "--version",
"system": "retroarch",
"properties": [
{
@ -1006,7 +1007,8 @@
"system": [
"arcade"
],
"launch": "mame"
"launch": "mame",
"cli-arg": "-help"
},
"citra": {
"description": "Citra Nintendo 3DS Emulator (via Ponzu)",
@ -1015,6 +1017,7 @@
"system": "n3ds",
"ponzu": true,
"launch": "citra-qt",
"cli-arg": "-version",
"properties": [
{
"abxy_button": true,
@ -1027,14 +1030,16 @@
"name": "Ruffle",
"url": "https://retrodeck.readthedocs.io/en/latest/wiki_about/what-is-retrodeck/",
"system": "flash",
"launch": "ruffle-rdwrapper.sh"
"launch": "ruffle-rdwrapper.sh",
"cli-arg": ""
},
"melonds": {
"description": "MelonDS Nintendo DS Emulator",
"name": "melonds",
"url": "https://retrodeck.readthedocs.io/en/latest/wiki_emulator_guides/melonds/melonds-guide/",
"system": "nds",
"launch": "melonDS"
"launch": "melonDS",
"cli-arg": "--help"
},
"pcsx2": {
"name": "pcsx2",
@ -1042,6 +1047,7 @@
"url": "https://retrodeck.readthedocs.io/en/latest/wiki_emulator_guides/pcsx2/pcsx2-guide/",
"system": "ps2",
"launch": "pcsx2-qt",
"cli-arg": "-version",
"properties": [
{
"ask_to_exit": true,
@ -1054,6 +1060,7 @@
"description": "PlayStation Emulator",
"url": "https://retrodeck.readthedocs.io/en/latest/wiki_emulator_guides/duckstation/duckstation-guide/",
"launch": "duckstation-qt",
"cli-arg": "-version",
"system": "psx",
"properties": [
{
@ -1067,6 +1074,7 @@
"description": "PPSSPP: PlayStation Portable Emulator",
"url": "https://retrodeck.readthedocs.io/en/latest/wiki_emulator_guides/ppsspp/ppsspp-guide/",
"launch": "PPSSPPSDL",
"cli-arg": "--version",
"system": "psp",
"properties": [
{
@ -1080,7 +1088,8 @@
"description": "Vita3K PSVita Emulator",
"url": "https://retrodeck.readthedocs.io/en/latest/wiki_emulator_guides/vita3k/vita3k-guide/",
"system": "psvita",
"launch": "Vita3K"
"launch": "Vita3K",
"cli-arg": ""
},
"rpcs3": {
"name": "RPCS3",
@ -1088,6 +1097,7 @@
"url": "https://retrodeck.readthedocs.io/en/latest/wiki_emulator_guides/rpcs3/rpcs3-guide/",
"system": "ps3",
"launch": "rpcs3",
"cli-arg": "--version",
"launch-override": "cd $(dirname $game) && rpcs3 $game",
"properties": [
{
@ -1100,13 +1110,15 @@
"description": "Ryujinx Nintendo Switch Emulator",
"url": "https://retrodeck.readthedocs.io/en/latest/wiki_emulator_guides/ryujinx/ryujinx-guide/",
"system": "switch",
"launch": "Ryujinx.sh"
"launch": "Ryujinx.sh",
"cli-arg": ""
},
"yuzu": {
"name": "Yuzu (via Ponzu)",
"description": "Yuzu Nintendo Switch Emulator (via Ponzu)",
"url": "https://retrodeck.readthedocs.io/en/latest/wiki_about/what-is-retrodeck/",
"launch": "Yuzu",
"cli-arg": "",
"system": "switch",
"ponzu": true,
"abxy_button": true
@ -1116,6 +1128,7 @@
"description": "Dolphin Wii and GameCube Emulator",
"url": "https://retrodeck.readthedocs.io/en/latest/wiki_emulator_guides/dolphin-primehack/dolphin-primehack-guide/",
"launch": "dolphin-emu-wrapper",
"cli-arg": "--version",
"system": [
"gc",
"wii"
@ -1135,6 +1148,7 @@
"description": "A fork of Dolphiin to enhance Metroid Prime experience",
"url": "https://retrodeck.readthedocs.io/en/latest/wiki_emulator_guides/dolphin-primehack/dolphin-primehack-guide/",
"launch": "primehack-wrapper",
"cli-arg": "--version",
"system": [
"wii"
],
@ -1151,6 +1165,7 @@
"url": "https://retrodeck.readthedocs.io/en/latest/wiki_emulator_guides/cemu/cemu-guide/",
"system": "wiiu",
"launch": "Cemu-wrapper",
"cli-arg": "--version",
"properties": [
{
"abxy_button": true,
@ -1163,25 +1178,29 @@
"name": "xemu",
"url": "https://retrodeck.readthedocs.io/en/latest/wiki_emulator_guides/xemu/xemu-guide/",
"system": "xbox",
"launch": "xemu"
"launch": "xemu",
"cli-arg": "--version"
},
"es-de": {
"description": "ES-DE Emulation Frontend",
"name": "ES-DE",
"url": "https://retrodeck.readthedocs.io/en/latest/wiki_es_de/esde-guide/.",
"launch": "es-de"
"launch": "es-de",
"cli-arg": "--version"
},
"steam-rom-manager": {
"description": "Steam ROM Manager (used to sync RetroDECK favorites with Steam)",
"name": "Steam ROM Manager",
"launch": "steam-rom-manager"
"launch": "steam-rom-manager",
"cli-arg": "--version"
},
"portmaster": {
"description": "PortMaster",
"name": "PortMaster",
"url": "https://retrodeck.readthedocs.io/en/latest/wiki_about/what-is-retrodeck/",
"system": "portmaster",
"launch": "PortMaster"
"launch": "PortMaster",
"cli-arg": ""
}
}
}