validate:launcher: Use GST_VALIDATE_SCENARIO envvar to set scenarios
authorThibault Saunier <thibault.saunier@collabora.com>
Fri, 27 Feb 2015 13:18:04 +0000 (13:18 +0000)
committerThibault Saunier <tsaunier@gnome.org>
Fri, 10 Apr 2015 14:53:40 +0000 (16:53 +0200)
Summary:
Instead of concidering all apps will have a --set-scenario argument
which is not going to be the case as soon as we run the tests through
LD_PRELOAD

Reviewers: Mathieu_Du

Differential Revision: http://phabricator.freedesktop.org/D70

validate/launcher/baseclasses.py

index 8c17c2d..511a1b6 100644 (file)
@@ -462,8 +462,12 @@ class GstValidateTest(Test):
             self.add_env_variable("GST_VALIDATE_SCENARIOS_PATH",
                                   os.environ["GST_VALIDATE_SCENARIOS_PATH"])
         if self.scenario is not None:
-            self.add_arguments("--set-scenario",
-                               self.scenario.get_execution_name())
+            os.environ["GST_VALIDATE_SCENARIO"] = self.scenario.get_execution_name()
+            self.add_env_variable("GST_VALIDATE_SCENARIO",
+                                  os.environ["GST_VALIDATE_SCENARIO"])
+
+        if "LD_PRELOAD" in os.environ:
+            self.add_env_variable("LD_PRELOAD", os.environ["LD_PRELOAD"])
 
     def get_extra_log_content(self, extralog):
         value = Test.get_extra_log_content(self, extralog)