# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import filecmp import os import shutil from collections import defaultdict from pathlib import Path
from mozperftest.layers import Layer from mozperftest.utils import NoPerfMetricsError, temp_dir
def copy_tree_update(src_path, dst_path): for src_file in src_path.rglob("*"):
dst_file = dst_path / src_file.relative_to(src_path) if src_file.is_dir() andnot dst_file.exists():
dst_file.mkdir(parents=True) elifnot dst_file.exists() ornot filecmp.cmp(
src_file, dst_file, shallow=False
):
dst_file.parent.mkdir(parents=True, exist_ok=True)
shutil.copy2(src_file, dst_file)
class XPCShellTestError(Exception): pass
class XPCShellData: def open_data(self, data): return { "name": "xpcshell", "subtest": data["name"], "data": [
{"file": "xpcshell", "value": value, "xaxis": xaxis} for xaxis, value in enumerate(data["values"])
],
}
def transform(self, data): return data
merge = transform
class XPCShell(Layer): """Runs an xpcshell test."""
name = "xpcshell"
activated = True
arguments = { "cycles": {"type": int, "default": 13, "help": "Number of full cycles"}, "binary": { "type": str, "default": None, "help": ( "xpcshell binary path. If not provided, " "looks for it in the source tree."
),
}, "mozinfo": { "type": str, "default": None, "help": ( "mozinfo binary path. If not provided, looks for it in the obj tree."
),
}, "xre-path": {"type": str, "default": None, "help": "XRE path."}, "nodejs": {"type": str, "default": None, "help": "nodejs binary path."},
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.