[prev in list] [next in list] [prev in thread] [next in thread]
List: gstreamer-cvs
Subject: gst-devtools: validate:launcher: Handle the fact that win32 apps end with .exe
From: tsaunier () kemper ! freedesktop ! org (Thibault Saunier)
Date: 2014-03-31 11:34:59
Message-ID: 20140331113459.EB285761C1 () kemper ! freedesktop ! org
[Download RAW message or body]
Module: gst-devtools
Branch: master
Commit: bc402356002c9ff00927b5c09c407d7f50522fa8
URL: http://cgit.freedesktop.org/gstreamer/gst-devtools/commit/?id=bc402356002c9ff00927b5c09c407d7f50522fa8
Author: Thibault Saunier <tsaunier@gnome.org>
Date: Fri Mar 28 15:00:01 2014 +0100
validate:launcher: Handle the fact that win32 apps end with .exe
---
validate/tools/launcher/apps/ges-launch.py | 4 ++++
validate/tools/launcher/baseclasses.py | 5 ++++-
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):
_______________________________________________
gstreamer-commits mailing list
gstreamer-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/gstreamer-commits
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic