diff options
author | Thibault Saunier <tsaunier@gnome.org> | 2014-03-28 15:00:01 +0100 |
---|---|---|
committer | Thibault Saunier <tsaunier@gnome.org> | 2014-03-28 15:00:01 +0100 |
commit | bc402356002c9ff00927b5c09c407d7f50522fa8 (patch) | |
tree | 8b5f70b38ba55bdf2ab38c7b7b61d82f024d98ae | |
parent | 7e1c83b5b948844ff81bb7e8100d349f7d05908d (diff) |
validate:launcher: Handle the fact that win32 apps end with .exe
-rw-r--r-- | validate/tools/launcher/apps/ges-launch.py | 4 | ||||
-rw-r--r-- | validate/tools/launcher/baseclasses.py | 5 | ||||
-rw-r--r-- | validate/tools/launcher/utils.py | 7 |
3 files changed, 14 insertions, 2 deletions
diff --git a/validate/tools/launcher/apps/ges-launch.py b/validate/tools/launcher/apps/ges-launch.py index cda2c25..b84835d 100644 --- a/validate/tools/launcher/apps/ges-launch.py +++ b/validate/tools/launcher/apps/ges-launch.py @@ -18,6 +18,7 @@ # Boston, MA 02110-1301, USA. import os +import sys import urlparse import subprocess import utils @@ -26,7 +27,10 @@ import xml.etree.ElementTree as ET from baseclasses import GstValidateTest, TestsManager, ScenarioManager GES_DURATION_TOLERANCE = utils.GST_SECOND / 2 + GES_LAUNCH_COMMAND = "ges-launch-1.0" +if "win32" in sys.platform: + GES_LAUNCH_COMMAND += ".exe" GES_ENCODING_TARGET_COMBINATIONS = [ diff --git a/validate/tools/launcher/baseclasses.py b/validate/tools/launcher/baseclasses.py index 7b79bd2..3138764 100644 --- a/validate/tools/launcher/baseclasses.py +++ b/validate/tools/launcher/baseclasses.py @@ -20,6 +20,7 @@ """ Class representing tests and test managers. """ import os +import sys import re import time import utils @@ -632,10 +633,12 @@ class Scenario(object): for prop, value in props: setattr(self, prop, value) -class ScenarioManager(object): +class ScenarioManager(Loggable): _instance = None all_scenarios = [] GST_VALIDATE_COMMAND = "gst-validate-1.0" + if "win32" in sys.platform: + GST_VALIDATE_COMMAND += ".exe" def __new__(cls, *args, **kwargs): if not cls._instance: diff --git a/validate/tools/launcher/utils.py b/validate/tools/launcher/utils.py index 2bb7578..e406eaf 100644 --- a/validate/tools/launcher/utils.py +++ b/validate/tools/launcher/utils.py @@ -18,6 +18,7 @@ # Boston, MA 02110-1301, USA. """ Some utilies. """ +import sys import os import re import urllib @@ -131,7 +132,11 @@ def path2url(path): def url2path(url): - return urlparse.urlparse(url).path + path = urlparse.urlparse(url).path + if "win32" in sys.platform: + if path[0] == '/': + return path[1:] # We need to remove the first '/' on windows + return path def isuri(string): |