def create(self, state): from manifest import manifest state.manifest_path = os.path.join(state.metadata_path, "MANIFEST.json") # Conservatively always rebuild the manifest when doing a sync state.old_manifest = manifest.load(state.tests_path, state.manifest_path) state.test_manifest = manifest.Manifest(None, "/")
def load_manifest(self, tests_path, metadata_path, url_base="/"): manifest_path = os.path.join(metadata_path, "MANIFEST.json") if not os.path.exists(manifest_path) or self.force_manifest_update: self.update_manifest(manifest_path, tests_path, url_base) manifest_file = manifest.load(tests_path, manifest_path) if manifest_file.url_base != url_base: self.logger.info("Updating url_base in manifest from %s to %s" % (manifest_file.url_base, url_base)) manifest_file.url_base = url_base manifest.write(manifest_file, manifest_path) return manifest_file
def load_manifest(self, tests_path, metadata_path, url_base="/"): manifest_path = os.path.join(metadata_path, "MANIFEST.json") if (not os.path.exists(manifest_path) or self.force_manifest_update): self.update_manifest(manifest_path, tests_path, url_base) manifest_file = manifest.load(tests_path, manifest_path) if manifest_file.url_base != url_base: self.logger.info("Updating url_base in manifest from %s to %s" % (manifest_file.url_base, url_base)) manifest_file.url_base = url_base manifest.write(manifest_file, manifest_path) return manifest_file
def load_manifest(self, tests_path, manifest_path, url_base="/", **kwargs): if (not os.path.exists(manifest_path) or self.force_manifest_update): self.update_manifest(manifest_path, tests_path, url_base, download=self.manifest_download) manifest_file = manifest.load(tests_path, manifest_path, types=self.types, meta_filters=self.meta_filters) if manifest_file.url_base != url_base: self.logger.info("Updating url_base in manifest from %s to %s" % (manifest_file.url_base, url_base)) manifest_file.url_base = url_base manifest.write(manifest_file, manifest_path) return manifest_file
def main(request, response): path = os.path.join(root, "MANIFEST.json") manifest_file = None try: manifest_file = manifest.load(root, path) except manifest.ManifestVersionMismatch: pass if manifest_file is None: manifest_file = manifest.Manifest("/") update.update(root, manifest_file) manifest.write(manifest_file, path) return [("Content-Type", "application/json")], json.dumps({"url": "/MANIFEST.json"})
def main(request, response): path = os.path.join(root, "MANIFEST.json") manifest_file = None try: manifest_file = manifest.load(root, path) except manifest.ManifestVersionMismatch: pass if manifest_file is None: manifest_file = manifest.Manifest("/") update.update(root, manifest_file) manifest.write(manifest_file, path) return [("Content-Type", "application/json") ], json.dumps({"url": "/MANIFEST.json"})
def create(self, state): from manifest import manifest state.manifest_path = os.path.join(state.metadata_path, "MANIFEST.json") # Conservatively always rebuild the manifest when doing a sync state.old_manifest = manifest.load(state.tests_path, state.manifest_path) state.test_manifest = manifest.Manifest(None, "/")