Ejemplo n.º 1
0
def writeFiles(files):
    pathmap = {}
    for path in files:
        dirp, leaf = path.rsplit('/', 1)
        pathmap.setdefault(dirp, []).append(leaf)

    for k, v in pathmap.items():
        with open(k + '/Makefile.in', 'wb') as fh:
            result = writeBuildFiles.substMakefile('parseFailures.py', v)
            result = result.encode('utf-8')
            fh.write(result)

        with open(k + '/moz.build', 'wb') as fh:
            result = writeBuildFiles.substMozbuild('parseFailures.py', [])
            result = result.encode('utf-8')
            fh.write(result)
Ejemplo n.º 2
0
def writeFiles(files):
    pathmap = {}
    for path in files:
        dirp, leaf = path.rsplit('/', 1)
        pathmap.setdefault(dirp, []).append(leaf)

    for k, v in pathmap.items():
        with open(k + '/Makefile.in', 'wb') as fh:
            result = writeBuildFiles.substMakefile('parseFailures.py', v)
            result = result.encode('utf-8')
            fh.write(result)

        with open(k + '/moz.build', 'wb') as fh:
            result = writeBuildFiles.substMozbuild('parseFailures.py', [])
            result = result.encode('utf-8')
            fh.write(result)
Ejemplo n.º 3
0
def printBuildFiles(thissrcdir, dest, directories):
    """Create Makefile.in files for each directory that contains tests we import.
    """
    print("Creating build files...")
    for d in directories:
        path = makePath(dest, d)
        print("Creating Makefile.in in %s..." % path)

        subdirs, mochitests, supportfiles = parseManifestFile(dest, d)

        files = ["test_%s" % (mochitest,) for mochitest in mochitests]
        files.extend(supportfiles)
        files.extend(f for f in os.listdir(path) if f.endswith(HEADERS_SUFFIX))

        with open(path + "/Makefile.in", "w") as fh:
            result = writeBuildFiles.substMakefile("importTestsuite.py", files)
            fh.write(result)

        print("Creating moz.build in %s..." % path)
        with open(path + "/moz.build", "w") as fh:
            result = writeBuildFiles.substMozbuild("importTestsuite.py", subdirs)
            fh.write(result)
Ejemplo n.º 4
0
def printBuildFiles(thissrcdir, dest, directories):
    """Create Makefile.in files for each directory that contains tests we import.
    """
    print("Creating build files...")
    for d in directories:
        path = makePath(dest, d)
        print("Creating Makefile.in in %s..." % path)

        subdirs, mochitests, supportfiles = parseManifestFile(dest, d)

        files = ["test_%s" % (mochitest, ) for mochitest in mochitests]
        files.extend(supportfiles)
        files.extend(f for f in os.listdir(path) if f.endswith(HEADERS_SUFFIX))

        with open(path + "/Makefile.in", "w") as fh:
            result = writeBuildFiles.substMakefile("importTestsuite.py", files)
            fh.write(result)

        print("Creating moz.build in %s..." % path)
        with open(path + "/moz.build", "w") as fh:
            result = writeBuildFiles.substMozbuild("importTestsuite.py",
                                                   subdirs)
            fh.write(result)
Ejemplo n.º 5
0
def printBuildFiles(dest, directories):
    """Create Makefile.in files for each directory that contains tests we import.
    """
    print("Creating build files...")
    for d in directories:
        path = makeDestPath(dest, d["path"])

        files = ["test_%s" % (mochitest, ) for mochitest in d["mochitests"]]
        files.extend(d["supportfiles"])

        with open(path + "/Makefile.in", "w") as fh:
            result = writeBuildFiles.substMakefile("importTestsuite.py", files)
            fh.write(result)

        with open(path + "/moz.build", "w") as fh:
            result = writeBuildFiles.substMozbuild("importTestsuite.py", [])
            fh.write(result)

        if d["reftests"]:
            with open(path + "/reftest.list", "w") as fh:
                result = writeBuildFiles.substReftestList(
                    "importTestsuite.py", d["reftests"])
                fh.write(result)
Ejemplo n.º 6
0
def printBuildFiles(dest, directories):
    """Create Makefile.in files for each directory that contains tests we import.
    """
    print("Creating build files...")
    for d in directories:
        path = makeDestPath(dest, d["path"])

        files = ["test_%s" % (mochitest, ) for mochitest in d["mochitests"]]
        files.extend(d["supportfiles"])

        with open(path + "/Makefile.in", "w") as fh:
            result = writeBuildFiles.substMakefile("importTestsuite.py", files)
            fh.write(result)

        with open(path + "/moz.build", "w") as fh:
            result = writeBuildFiles.substMozbuild("importTestsuite.py", [])
            fh.write(result)

        if d["reftests"]:
            with open(path + "/reftest.list", "w") as fh:
                result = writeBuildFiles.substReftestList("importTestsuite.py",
                    d["reftests"])
                fh.write(result)