mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 810617 - Pass browser app directory to xpcshell test harness. r=ted
This commit is contained in:
parent
d75ca73e40
commit
69b84bb4b7
@ -39,6 +39,10 @@ def build_dict(env=os.environ):
|
||||
# Widget toolkit, just pass the value directly through.
|
||||
d["toolkit"] = env["MOZ_WIDGET_TOOLKIT"]
|
||||
|
||||
# Application name
|
||||
if 'MOZ_APP_NAME' in env:
|
||||
d["appname"] = env["MOZ_APP_NAME"]
|
||||
|
||||
# processor
|
||||
p = env["TARGET_CPU"]
|
||||
# for universal mac builds, put in a special value
|
||||
|
@ -8938,6 +8938,7 @@ MOZ_DEBUG=${MOZ_DEBUG} \
|
||||
MOZ_WIDGET_TOOLKIT=${MOZ_WIDGET_TOOLKIT} \
|
||||
UNIVERSAL_BINARY=${UNIVERSAL_BINARY} \
|
||||
MOZ_CRASHREPORTER=${MOZ_CRASHREPORTER} \
|
||||
MOZ_APP_NAME=${MOZ_APP_NAME} \
|
||||
MOZ_PER_WINDOW_PRIVATE_BROWSING=${MOZ_PER_WINDOW_PRIVATE_BROWSING} \
|
||||
$PYTHON ${_topsrcdir}/config/writemozinfo.py ./mozinfo.json.tmp
|
||||
if cmp -s ./mozinfo.json.tmp ./mozinfo.json; then
|
||||
|
@ -730,6 +730,14 @@ class XPCShellTests(object):
|
||||
self.mozInfo = parse_json(open(mozInfoFile).read())
|
||||
mozinfo.update(self.mozInfo)
|
||||
|
||||
# The appDirKey is a optional entry in either the default or individual test
|
||||
# sections that defines a relative application directory for test runs. If
|
||||
# defined we pass 'grePath/$appDirKey' for the -a parameter of the xpcshell
|
||||
# test harness.
|
||||
appDirKey = None
|
||||
if "appname" in self.mozInfo:
|
||||
appDirKey = self.mozInfo["appname"] + "-appdir"
|
||||
|
||||
# We have to do this before we build the test list so we know whether or
|
||||
# not to run tests that depend on having the node spdy server
|
||||
self.trySetupNode()
|
||||
@ -777,6 +785,15 @@ class XPCShellTests(object):
|
||||
# Check for known-fail tests
|
||||
expected = test['expected'] == 'pass'
|
||||
|
||||
# By default self.appPath will equal the gre dir. If specified in the
|
||||
# xpcshell.ini file, set a different app dir for this test.
|
||||
if appDirKey != None and appDirKey in test:
|
||||
relAppDir = test[appDirKey]
|
||||
relAppDir = os.path.join(self.xrePath, relAppDir)
|
||||
self.appPath = os.path.abspath(relAppDir)
|
||||
else:
|
||||
self.appPath = None
|
||||
|
||||
testdir = os.path.dirname(name)
|
||||
self.buildXpcsCmd(testdir)
|
||||
testHeadFiles, testTailFiles = self.getHeadAndTailFiles(test)
|
||||
|
Loading…
Reference in New Issue
Block a user