From cbf7f975d320f4e7c8ce5b833d62ad9221f9a555 Mon Sep 17 00:00:00 2001 From: Marc Di Luzio Date: Thu, 7 Feb 2019 17:04:24 +0000 Subject: [PATCH] Add basic framework to do some script tests --- daemon/gamemode-tests.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/daemon/gamemode-tests.c b/daemon/gamemode-tests.c index 995921e..5622020 100644 --- a/daemon/gamemode-tests.c +++ b/daemon/gamemode-tests.c @@ -310,7 +310,26 @@ static int game_mode_run_feature_tests(void) } /* Do custom scripts run? */ - /* TODO */ + int scriptstatus = 0; + { + /* Grab the scripts */ + char scripts[CONFIG_LIST_MAX][CONFIG_VALUE_MAX]; + memset(scripts, 0, sizeof(scripts)); + config_get_gamemode_start_scripts(config, scripts); + + if (scripts[0][0] != '\0') { + /* Print out the scripts to run */ + LOG_MSG("Custom scripts:\n"); + + int i = 0; + while (*scripts[i] != '\0' && i < CONFIG_LIST_MAX) + LOG_MSG("%s\n", scripts[i]); + } + + /* TODO: Somehow verify these get run + * Possibly by watching if the the binary part gets run? + */ + } /* Does the screensaver get inhibited? */ /* TODO */