mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 647482 - jstests looks for config/autoconf.mk in the wrong place (rs=nnethercote)
This commit is contained in:
parent
05b322465b
commit
3ffcab910e
@ -7,6 +7,14 @@ from subprocess import *
|
||||
|
||||
from tests import TestCase
|
||||
|
||||
|
||||
def split_path_into_dirs(path):
|
||||
dirs = []
|
||||
while path != "/":
|
||||
path = os.path.dirname(path)
|
||||
dirs.append(path)
|
||||
return dirs
|
||||
|
||||
class XULInfo:
|
||||
def __init__(self, abi, os, isdebug):
|
||||
self.abi = abi
|
||||
@ -29,17 +37,19 @@ class XULInfo:
|
||||
|
||||
# Our strategy is to find the autoconf.mk generated for the build and
|
||||
# read the values from there.
|
||||
|
||||
|
||||
# Find config/autoconf.mk.
|
||||
dir = jsdir
|
||||
while True:
|
||||
path = os.path.join(dir, 'config/autoconf.mk')
|
||||
if os.path.isfile(path):
|
||||
break
|
||||
if os.path.dirname(dir) == dir:
|
||||
print "Can't find config/autoconf.mk on a directory containing the JS shell (searched from %s)"%jsdir
|
||||
sys.exit(1)
|
||||
dir = os.path.dirname(dir)
|
||||
dirs = split_path_into_dirs(os.getcwd()) + split_path_into_dirs(jsdir)
|
||||
|
||||
path = None
|
||||
for dir in dirs:
|
||||
path = os.path.join(dir, 'config/autoconf.mk')
|
||||
if os.path.isfile(path):
|
||||
break
|
||||
|
||||
if path == None:
|
||||
print "Can't find config/autoconf.mk on a directory containing the JS shell (searched from %s)"%jsdir
|
||||
sys.exit(1)
|
||||
|
||||
# Read the values.
|
||||
val_re = re.compile(r'(TARGET_XPCOM_ABI|OS_TARGET|MOZ_DEBUG)\s*=\s*(.*)')
|
||||
|
Loading…
Reference in New Issue
Block a user