Ejemplo n.º 1
0
def printBuildFiles(dest, directories):
    """Create a mochitest.ini that all the contains tests we import.
    """
    print("Creating manifest...")
    all_mochitests = set()
    all_support = set()

    for d in directories:
        path = makeDestPath(dest, d["path"])

        all_mochitests |= set('%s/test_%s' % (d['path'], mochitest)
            for mochitest in d['mochitests'])
        all_support |= set('%s/%s' % (d['path'], p) for p in d['supportfiles'])

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

    manifest_path = dest + '/mochitest.ini'
    with open(manifest_path, 'w') as fh:
        result = writeBuildFiles.substManifest('importTestsuite.py',
            all_mochitests, all_support)
        fh.write(result)
    subprocess.check_call(["hg", "add", manifest_path])
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 + '/mochitest.ini', 'w') as fh:
            result = writeBuildFiles.substManifest('parseFailures.py', v, [])
            fh.write(result)
Ejemplo n.º 3
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 + '/mochitest.ini', 'w') as fh:
            result = writeBuildFiles.substManifest('parseFailures.py', v, [])
            fh.write(result)