Bug 1091270 - Move isURL out of automationutils; r=jgriffin
This commit is contained in:
@@ -13,7 +13,6 @@ import signal
|
|||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
import tempfile
|
import tempfile
|
||||||
from urlparse import urlparse
|
|
||||||
import zipfile
|
import zipfile
|
||||||
import mozinfo
|
import mozinfo
|
||||||
|
|
||||||
@@ -21,7 +20,6 @@ __all__ = [
|
|||||||
"ZipFileReader",
|
"ZipFileReader",
|
||||||
"addCommonOptions",
|
"addCommonOptions",
|
||||||
"dumpLeakLog",
|
"dumpLeakLog",
|
||||||
"isURL",
|
|
||||||
"processLeakLog",
|
"processLeakLog",
|
||||||
'KeyValueParseError',
|
'KeyValueParseError',
|
||||||
'parseKeyValue',
|
'parseKeyValue',
|
||||||
@@ -107,11 +105,6 @@ class ZipFileReader(object):
|
|||||||
for name in self._zipfile.namelist():
|
for name in self._zipfile.namelist():
|
||||||
self._extractname(name, path)
|
self._extractname(name, path)
|
||||||
|
|
||||||
def isURL(thing):
|
|
||||||
"""Return True if |thing| looks like a URL."""
|
|
||||||
# We want to download URLs like http://... but not Windows paths like c:\...
|
|
||||||
return len(urlparse(thing).scheme) >= 2
|
|
||||||
|
|
||||||
# Python does not provide strsignal() even in the very latest 3.x.
|
# Python does not provide strsignal() even in the very latest 3.x.
|
||||||
# This is a reasonable fake.
|
# This is a reasonable fake.
|
||||||
def strsig(n):
|
def strsig(n):
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ Runs the reftest test harness.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
|
from urlparse import urlparse
|
||||||
import collections
|
import collections
|
||||||
import multiprocessing
|
import multiprocessing
|
||||||
import os
|
import os
|
||||||
@@ -24,7 +25,6 @@ from automationutils import (
|
|||||||
addCommonOptions,
|
addCommonOptions,
|
||||||
dumpScreen,
|
dumpScreen,
|
||||||
environment,
|
environment,
|
||||||
isURL,
|
|
||||||
processLeakLog
|
processLeakLog
|
||||||
)
|
)
|
||||||
import mozcrash
|
import mozcrash
|
||||||
@@ -786,7 +786,7 @@ Are you executing $objdir/_tests/reftest/runreftest.py?""" \
|
|||||||
if options.xrePath is None:
|
if options.xrePath is None:
|
||||||
options.xrePath = os.path.dirname(options.app)
|
options.xrePath = os.path.dirname(options.app)
|
||||||
|
|
||||||
if options.symbolsPath and not isURL(options.symbolsPath):
|
if options.symbolsPath and len(urlparse(options.symbolsPath).scheme) < 2:
|
||||||
options.symbolsPath = reftest.getFullPath(options.symbolsPath)
|
options.symbolsPath = reftest.getFullPath(options.symbolsPath)
|
||||||
options.utilityPath = reftest.getFullPath(options.utilityPath)
|
options.utilityPath = reftest.getFullPath(options.utilityPath)
|
||||||
|
|
||||||
|
|||||||
@@ -2,13 +2,14 @@
|
|||||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
|
from urlparse import urlparse
|
||||||
import mozinfo
|
import mozinfo
|
||||||
import moznetwork
|
import moznetwork
|
||||||
import optparse
|
import optparse
|
||||||
import os
|
import os
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
from automationutils import addCommonOptions, isURL
|
from automationutils import addCommonOptions
|
||||||
from mozprofile import DEFAULT_PORTS
|
from mozprofile import DEFAULT_PORTS
|
||||||
|
|
||||||
here = os.path.abspath(os.path.dirname(__file__))
|
here = os.path.abspath(os.path.dirname(__file__))
|
||||||
@@ -504,7 +505,7 @@ class MochitestOptions(optparse.OptionParser):
|
|||||||
if options.certPath:
|
if options.certPath:
|
||||||
options.certPath = mochitest.getFullPath(options.certPath)
|
options.certPath = mochitest.getFullPath(options.certPath)
|
||||||
|
|
||||||
if options.symbolsPath and not isURL(options.symbolsPath):
|
if options.symbolsPath and len(urlparse(options.symbolsPath).scheme) < 2:
|
||||||
options.symbolsPath = mochitest.getFullPath(options.symbolsPath)
|
options.symbolsPath = mochitest.getFullPath(options.symbolsPath)
|
||||||
|
|
||||||
# Set server information on the options object
|
# Set server information on the options object
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import sys
|
|||||||
SCRIPT_DIR = os.path.abspath(os.path.realpath(os.path.dirname(__file__)))
|
SCRIPT_DIR = os.path.abspath(os.path.realpath(os.path.dirname(__file__)))
|
||||||
sys.path.insert(0, SCRIPT_DIR);
|
sys.path.insert(0, SCRIPT_DIR);
|
||||||
|
|
||||||
|
from urlparse import urlparse
|
||||||
import ctypes
|
import ctypes
|
||||||
import glob
|
import glob
|
||||||
import json
|
import json
|
||||||
@@ -35,7 +36,6 @@ import bisection
|
|||||||
|
|
||||||
from automationutils import (
|
from automationutils import (
|
||||||
environment,
|
environment,
|
||||||
isURL,
|
|
||||||
KeyValueParseError,
|
KeyValueParseError,
|
||||||
parseKeyValue,
|
parseKeyValue,
|
||||||
processLeakLog,
|
processLeakLog,
|
||||||
@@ -2125,7 +2125,7 @@ def main():
|
|||||||
|
|
||||||
options.utilityPath = mochitest.getFullPath(options.utilityPath)
|
options.utilityPath = mochitest.getFullPath(options.utilityPath)
|
||||||
options.certPath = mochitest.getFullPath(options.certPath)
|
options.certPath = mochitest.getFullPath(options.certPath)
|
||||||
if options.symbolsPath and not isURL(options.symbolsPath):
|
if options.symbolsPath and len(urlparse(options.symbolsPath).scheme) < 2:
|
||||||
options.symbolsPath = mochitest.getFullPath(options.symbolsPath)
|
options.symbolsPath = mochitest.getFullPath(options.symbolsPath)
|
||||||
|
|
||||||
return_code = mochitest.runTests(options)
|
return_code = mochitest.runTests(options)
|
||||||
|
|||||||
Reference in New Issue
Block a user