--- /dev/null
+{
+ "name": "JSTests",
+ "run_count": 5,
+ "run_count_android_arm": 3,
+ "run_count_android_arm64": 3,
+ "units": "score",
+ "total": true,
+ "resources": ["base.js"],
+ "tests": [
+ {
+ "name": "Classes",
+ "path": ["Classes"],
+ "main": "run.js",
+ "resources": ["super.js"],
+ "flags": ["--harmony-classes"],
+ "results_regexp": "^%s\\-Classes\\(Score\\): (.+)$",
+ "tests": [
+ {"name": "Super"}
+ ]
+ },
+ {
+ "name": "Collections",
+ "path": ["Collections"],
+ "main": "run.js",
+ "resources": [
+ "common.js",
+ "map.js",
+ "run.js",
+ "set.js",
+ "weakmap.js",
+ "weakset.js"
+ ],
+ "results_regexp": "^%s\\-Collections\\(Score\\): (.+)$",
+ "tests": [
+ {"name": "Map-Smi"},
+ {"name": "Map-String"},
+ {"name": "Map-Object"},
+ {"name": "Map-Iteration"},
+ {"name": "Set-Smi"},
+ {"name": "Set-String"},
+ {"name": "Set-Object"},
+ {"name": "Set-Iteration"},
+ {"name": "WeakMap"},
+ {"name": "WeakSet"}
+ ]
+ },
+ {
+ "name": "Iterators",
+ "path": ["Iterators"],
+ "main": "run.js",
+ "resources": ["forof.js"],
+ "results_regexp": "^%s\\-Iterators\\(Score\\): (.+)$",
+ "tests": [
+ {"name": "ForOf"}
+ ]
+ },
+ {
+ "name": "Strings",
+ "path": ["Strings"],
+ "main": "run.js",
+ "resources": ["harmony-string.js"],
+ "flags": ["--harmony-strings"],
+ "results_regexp": "^%s\\-Strings\\(Score\\): (.+)$",
+ "tests": [
+ {"name": "StringFunctions"}
+ ]
+ }
+ ]
+}
self.graphs = parent.graphs[:] + [suite["name"]]
self.flags = parent.flags[:] + suite.get("flags", [])
self.test_flags = parent.test_flags[:] + suite.get("test_flags", [])
- self.resources = parent.resources[:] + suite.get("resources", [])
+
+ # Values independent of parent node.
+ self.resources = suite.get("resources", [])
# Descrete values (with parent defaults).
self.binary = suite.get("binary", parent.binary)
cwd=AndroidPlatform.DEVICE_DIR,
)
- def _PushFile(self, host_dir, file_name):
+ def _PushFile(self, host_dir, file_name, target_rel="."):
file_on_host = os.path.join(host_dir, file_name)
- file_on_device = AndroidPlatform.DEVICE_DIR + file_name
+ file_on_device = os.path.join(
+ AndroidPlatform.DEVICE_DIR, target_rel, file_name)
# Only push files not yet pushed in one execution.
if file_on_host in self.pushed:
def PreTests(self, node, path):
suite_dir = os.path.abspath(os.path.dirname(path))
if node.path:
- bench_dir = os.path.join(suite_dir,
- os.path.normpath(os.path.join(*node.path)))
+ bench_rel = os.path.normpath(os.path.join(*node.path))
+ bench_abs = os.path.join(suite_dir, bench_rel)
else:
- bench_dir = suite_dir
+ bench_rel = "."
+ bench_abs = suite_dir
self._PushFile(self.shell_dir, node.binary)
if isinstance(node, Runnable):
- self._PushFile(bench_dir, node.main)
+ self._PushFile(bench_abs, node.main, bench_rel)
for resource in node.resources:
- self._PushFile(bench_dir, resource)
+ self._PushFile(bench_abs, resource, bench_rel)
def Run(self, runnable, count):
cache = cache_control.CacheControl(self.device)
cache.DropRamCaches()
binary_on_device = AndroidPlatform.DEVICE_DIR + runnable.binary
cmd = [binary_on_device] + runnable.GetCommandFlags()
+
+ # Relative path to benchmark directory.
+ if runnable.path:
+ bench_rel = os.path.normpath(os.path.join(*runnable.path))
+ else:
+ bench_rel = "."
+
try:
output = self.device.RunShellCommand(
cmd,
- cwd=AndroidPlatform.DEVICE_DIR,
+ cwd=os.path.join(AndroidPlatform.DEVICE_DIR, bench_rel),
timeout=runnable.timeout,
retries=0,
)