aboutsummaryrefslogtreecommitdiff
path: root/crosperf/experiment_file.py
diff options
context:
space:
mode:
authorcmtice <cmtice@google.com>2014-04-04 13:15:06 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-04-12 01:38:00 +0000
commit43f1a45c8dddfc4ff8c9dfcd87070811abf936dd (patch)
tree9cdccb994ca717abe80eaab7c7246693280df3b2 /crosperf/experiment_file.py
parentc454cee542ca459ef9bd87c9f72e81c822caf1e5 (diff)
downloadtoolchain-utils-43f1a45c8dddfc4ff8c9dfcd87070811abf936dd.tar.gz
Download official & trybot images; treat as local images for tests.
Currently we cannot get md5sums for official & trybot images, which causes multiple problems: Crosperf re-images the DUT every time it runs a test for an image, even if the image is already on the DUT; if crosperf is running an experiment with multiple official or trybot images, it can get confused about which results belong to which image; caching does not work properly without md5sums. To fix all of these problems, this CL changes Crosperf to download the official or trybot images into the /tmp directory in the chroot, and from there it can treat them as local images (getting md5sums etc). In order to download them, it first has to translate the xbuddy syntax (which can contain aliases such as 'lumpy/dev-latest') into the actual image name (e.g. lumpy-release/R36-5727.0.0). This translation is done by a new script, translate_xbuddy.py, which must be run from the toolchain-utils directory inside the chroot. BUG=356279,356474,356476 TEST=Tested with official and trybot images, using both correct designations and xbuddy aliases; tested with the image missing from the chroot and with it already in /tmp; tested with and without caching. Also tested with the experiment file included in the 3 bugs. Change-Id: I917b5520604b7d4851db2c8123165e81b866da2b Reviewed-on: https://chrome-internal-review.googlesource.com/159465 Reviewed-by: Yunlian Jiang <yunlian@google.com> Commit-Queue: Caroline Tice <cmtice@google.com> Tested-by: Caroline Tice <cmtice@google.com>
Diffstat (limited to 'crosperf/experiment_file.py')
-rw-r--r--crosperf/experiment_file.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/crosperf/experiment_file.py b/crosperf/experiment_file.py
index 0a3c3b98..3cb46dcc 100644
--- a/crosperf/experiment_file.py
+++ b/crosperf/experiment_file.py
@@ -153,8 +153,12 @@ class ExperimentFile(object):
if real_file != field.GetString():
res += "\t#actual_image: %s\n" % real_file
if field.name == "build":
+ chromeos_root_field = settings.fields["chromeos_root"]
+ if chromeos_root_field:
+ chromeos_root = chromeos_root_field.GetString()
value = field.GetString()
- xbuddy_path = settings.GetXbuddyPath (value, board)
+ xbuddy_path = settings.GetXbuddyPath (value, board, chromeos_root,
+ "quiet")
res += "\t#actual_image: %s\n" % xbuddy_path
res += "}\n\n"