Bug 647482 (followup): Fix jstests for directory structure used by SM builds, by actually searching the current path (r=dmandelin)

This commit is contained in:
Paul Biggar 2011-04-17 17:45:42 +01:00
parent 4ff4d86aa2
commit 6d679dc92a

View File

@ -9,7 +9,7 @@ from tests import TestCase
def split_path_into_dirs(path): def split_path_into_dirs(path):
dirs = [] dirs = [path]
while path != "/": while path != "/":
path = os.path.dirname(path) path = os.path.dirname(path)
dirs.append(path) dirs.append(path)
@ -43,8 +43,9 @@ class XULInfo:
path = None path = None
for dir in dirs: for dir in dirs:
path = os.path.join(dir, 'config/autoconf.mk') _path = os.path.join(dir, 'config/autoconf.mk')
if os.path.isfile(path): if os.path.isfile(_path):
path = _path
break break
if path == None: if path == None: