validate:launcher: Handle the fact that win32 apps end with .exe

This commit is contained in:
Thibault Saunier 2014-03-28 15:00:01 +01:00
parent 7e1c83b5b9
commit bc40235600
3 changed files with 14 additions and 2 deletions

View file

@ -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 = [

View file

@ -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:

View file

@ -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):