Ejemplo n.º 1
0
    def _process_reftest_manifest(self, context, flavor, manifest_path):
        manifest_path = mozpath.normpath(manifest_path)
        manifest_full_path = mozpath.normpath(
            mozpath.join(context.srcdir, manifest_path))
        manifest_reldir = mozpath.dirname(
            mozpath.relpath(manifest_full_path, context.config.topsrcdir))

        manifest = reftest.ReftestManifest()
        manifest.load(manifest_full_path)

        # reftest manifests don't come from manifest parser. But they are
        # similar enough that we can use the same emitted objects. Note
        # that we don't perform any installs for reftests.
        obj = TestManifest(context,
                           manifest_full_path,
                           manifest,
                           flavor=flavor,
                           install_prefix='%s/' % flavor,
                           relpath=mozpath.join(
                               manifest_reldir,
                               mozpath.basename(manifest_path)))

        for test in sorted(manifest.files):
            obj.tests.append({
                'path': test,
                'here': mozpath.dirname(test),
                'manifest': manifest_full_path,
                'name': mozpath.basename(test),
                'head': '',
                'tail': '',
                'support-files': '',
                'subsuite': '',
            })

        yield obj
Ejemplo n.º 2
0
def read_reftest_manifest(context, manifest_path):
    import reftest

    path = manifest_path.full_path
    manifest = reftest.ReftestManifest(finder=context._finder)
    manifest.load(path)
    return manifest
Ejemplo n.º 3
0
    def _load_reftest_manifest(self, mpath):
        import reftest
        manifest = reftest.ReftestManifest(finder=self.finder)
        manifest.load(mpath)

        for test in sorted(manifest.tests):
            test['manifest_relpath'] = test['manifest'][len(self.topsrcdir)+1:]
            yield test
Ejemplo n.º 4
0
    def _load_reftest_manifest(self, mpath):
        import reftest

        manifest = reftest.ReftestManifest(finder=self.finder)
        manifest.load(mpath)

        for test in sorted(manifest.tests, key=lambda x: x.get("path")):
            test["manifest_relpath"] = test["manifest"][len(self.topsrcdir) + 1 :]
            yield test
Ejemplo n.º 5
0
def read_reftest_manifest(context, manifest_path):
    import reftest
    path = mozpath.normpath(mozpath.join(context.srcdir, manifest_path))
    manifest = reftest.ReftestManifest(finder=context._finder)
    manifest.load(path)
    return manifest