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