mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 811068 - Copy ^headers^ file in importTestsuite.py; r=jhammel (DONTBUILD)
This commit is contained in:
parent
c98cf5e62c
commit
388b38de0f
@ -20,6 +20,8 @@ import sys
|
|||||||
import parseManifest
|
import parseManifest
|
||||||
import writeMakefile
|
import writeMakefile
|
||||||
|
|
||||||
|
HEADERS_SUFFIX = "^headers^"
|
||||||
|
|
||||||
def parseManifestFile(dest, dir):
|
def parseManifestFile(dest, dir):
|
||||||
subdirs, mochitests, _, __, supportfiles = parseManifest.parseManifestFile("hg-%s/%s/MANIFEST" % (dest, dir))
|
subdirs, mochitests, _, __, supportfiles = parseManifest.parseManifestFile("hg-%s/%s/MANIFEST" % (dest, dir))
|
||||||
return subdirs, mochitests, supportfiles
|
return subdirs, mochitests, supportfiles
|
||||||
@ -54,6 +56,13 @@ def makePath(a, b):
|
|||||||
return a
|
return a
|
||||||
return "%s/%s" % (a, b)
|
return "%s/%s" % (a, b)
|
||||||
|
|
||||||
|
def copyTest(source, dest):
|
||||||
|
"""Copy the file at source to dest, as well as any ^headers^ file associated
|
||||||
|
with it."""
|
||||||
|
shutil.copy(source, dest)
|
||||||
|
if os.path.exists(source + HEADERS_SUFFIX):
|
||||||
|
shutil.copy(source + HEADERS_SUFFIX, dest + HEADERS_SUFFIX)
|
||||||
|
|
||||||
def copy(thissrcdir, dest, directories):
|
def copy(thissrcdir, dest, directories):
|
||||||
"""Copy mochitests and support files from the external HG directory to their
|
"""Copy mochitests and support files from the external HG directory to their
|
||||||
place in mozilla-central.
|
place in mozilla-central.
|
||||||
@ -66,9 +75,9 @@ def copy(thissrcdir, dest, directories):
|
|||||||
os.makedirs(destdir)
|
os.makedirs(destdir)
|
||||||
|
|
||||||
for mochitest in mochitests:
|
for mochitest in mochitests:
|
||||||
shutil.copy("%s/%s" % (sourcedir, mochitest), "%s/test_%s" % (destdir, mochitest))
|
copyTest("%s/%s" % (sourcedir, mochitest), "%s/test_%s" % (destdir, mochitest))
|
||||||
for support in supportfiles:
|
for support in supportfiles:
|
||||||
shutil.copy("%s/%s" % (sourcedir, support), "%s/%s" % (destdir, support))
|
copyTest("%s/%s" % (sourcedir, support), "%s/%s" % (destdir, support))
|
||||||
|
|
||||||
if len(subdirs):
|
if len(subdirs):
|
||||||
if d:
|
if d:
|
||||||
@ -102,6 +111,7 @@ def printMakefiles(thissrcdir, dest, directories):
|
|||||||
|
|
||||||
files = ["test_%s" % (mochitest, ) for mochitest in mochitests]
|
files = ["test_%s" % (mochitest, ) for mochitest in mochitests]
|
||||||
files.extend(supportfiles)
|
files.extend(supportfiles)
|
||||||
|
files.extend(f for f in os.listdir(path) if f.endswith(HEADERS_SUFFIX))
|
||||||
|
|
||||||
result = writeMakefile.substMakefile("importTestsuite.py", subdirs, files)
|
result = writeMakefile.substMakefile("importTestsuite.py", subdirs, files)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user