}
one_actions_scenario_max:
{
- GST_ERROR ("You can not set several actions scenario (you can "
- "have set various confi scenario though, meaning you have to set"
- " 'scenario, is-config=true' in the scenario file, and all actions"
- " should be executable at parsing time)");
+ GST_ERROR ("You can set at most only one action scenario. "
+ "You can have several config scenarios though (a config scenario's "
+ "file must have is-config=true, and all its actions must be executable "
+ "at parsing time).");
ret = FALSE;
goto done;
#endif
GError *err = NULL;
- const gchar *scenario = NULL;
+ const gchar *scenario = NULL, *configs = NULL;
gboolean want_help = FALSE;
gboolean list_scenarios = FALSE;
{"set-scenario", '\0', 0, G_OPTION_ARG_STRING, &scenario,
"Let you set a scenario, it will override the GST_VALIDATE_SCENARIO "
"environment variable", NULL},
+ {"set-configs", '\0', 0, G_OPTION_ARG_STRING, &configs,
+ "Let you set a config scenario, the scenario needs to be set as 'config"
+ "' you can specify a list of scenario separated by ':'"
+ " it will override the GST_VALIDATE_SCENARIO environment variable,",
+ NULL},
{"eos-on-shutdown", 'e', 0, G_OPTION_ARG_NONE, &eos_on_shutdown,
"If an EOS event should be sent to the pipeline if an interrupt is "
"received, instead of forcing the pipeline to stop. Sending an EOS "
g_option_context_free (ctx);
- if (scenario)
- g_setenv ("GST_VALIDATE_SCENARIO", scenario, TRUE);
+ if (scenario || configs) {
+ gchar *scenarios;
+
+ if (scenario)
+ scenarios = g_strjoin (":", scenario, configs, NULL);
+ else
+ scenarios = g_strdup (configs);
+
+ g_setenv ("GST_VALIDATE_SCENARIO", scenarios, TRUE);
+ g_free (scenarios);
+ }
if (list_scenarios)
gst_validate_list_scenarios ();
main (int argc, gchar ** argv)
{
GError *err = NULL;
- const gchar *scenario = NULL;
+ const gchar *scenario = NULL, *configs = NULL;
gboolean list_scenarios = FALSE;
#ifdef G_OS_UNIX
guint signal_watch_id;
"environment variable", NULL},
{"list-scenarios", 'l', 0, G_OPTION_ARG_NONE, &list_scenarios,
"List the avalaible scenarios that can be run", NULL},
+ {"set-configs", '\0', 0, G_OPTION_ARG_STRING, &configs,
+ "Let you set a config scenario, the scenario needs to be set as 'config"
+ "' you can specify a list of scenario separated by ':'"
+ " it will override the GST_VALIDATE_SCENARIO environment variable,",
+ NULL},
{NULL}
};
GOptionContext *ctx;
exit (1);
}
- if (scenario) {
- g_setenv ("GST_VALIDATE_SCENARIO", scenario, TRUE);
+ if (scenario || configs) {
+ gchar *scenarios;
+
+ if (scenario)
+ scenarios = g_strjoin (":", scenario, configs, NULL);
+ else
+ scenarios = g_strdup (configs);
+
+ g_setenv ("GST_VALIDATE_SCENARIO", scenarios, TRUE);
+ g_free (scenarios);
}
gst_init (&argc, &argv);