summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Hervey <edward@centricular.com>2016-07-04 16:16:25 +0200
committerEdward Hervey <bilboed@bilboed.com>2016-07-04 16:19:09 +0200
commit1e1475d352eb2decb8892f5f58ad463ea5db2e95 (patch)
tree5779e8de66f28f0628dcc394f0d688b15f7ac4eb
parent0502e6bf5b10d21950d4586b06a89d7be0670fe3 (diff)
validate: Fix usage for non-standard http server port
Translate the various stream_info URI from the standard port to the specified port Make the port option an integer option
-rw-r--r--validate/launcher/apps/gstvalidate.py8
-rw-r--r--validate/launcher/main.py2
2 files changed, 8 insertions, 2 deletions
diff --git a/validate/launcher/apps/gstvalidate.py b/validate/launcher/apps/gstvalidate.py
index cd338c0a96..0e1cae324e 100644
--- a/validate/launcher/apps/gstvalidate.py
+++ b/validate/launcher/apps/gstvalidate.py
@@ -624,6 +624,11 @@ not been tested and explicitely activated if you set use --wanted-tests ALL""")
if uri is None:
uri = media_descriptor.get_uri()
+ # Adjust local http uri
+ if self.options.http_server_port != 8079 and \
+ uri.startswith("http://127.0.0.1:8079/"):
+ uri = uri.replace("http://127.0.0.1:8079/",
+ "http://127.0.0.1:%r/" % self.options.http_server_port, 1)
media_descriptor.set_protocol(urlparse.urlparse(uri).scheme)
for caps2, prot in GST_VALIDATE_CAPS_TO_PROTOCOL:
if caps2 == caps:
@@ -715,7 +720,8 @@ not been tested and explicitely activated if you set use --wanted-tests ALL""")
uri = test.media_descriptor.get_uri()
if protocol in [Protocols.HTTP, Protocols.HLS, Protocols.DASH] and \
- "127.0.0.1:%s" % (self.options.http_server_port) in uri:
+ "127.0.0.1:%s" % (self.options.http_server_port) in uri or \
+ "127.0.0.1:8079" in uri:
return True
return False
diff --git a/validate/launcher/main.py b/validate/launcher/main.py
index be5a38d0f2..7b747a4ebd 100644
--- a/validate/launcher/main.py
+++ b/validate/launcher/main.py
@@ -472,7 +472,7 @@ Note that all testsuite should be inside python modules, so the directory should
"Handle the HTTP server to be created")
http_server_group.add_argument(
"--http-server-port", dest="http_server_port",
- help="Port on which to run the http server on localhost")
+ help="Port on which to run the http server on localhost", type=int)
http_server_group.add_argument(
"--http-bandwith-limitation", dest="http_bandwith",
help="The artificial bandwith limitation to introduce to the local server (in Bytes/sec) (default: 1 MBps)")