diff options
author | Yunlian Jiang <yunlian@google.com> | 2013-08-02 10:42:25 -0700 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-08-02 13:05:53 -0700 |
commit | ffd98bbabbe8f7287d79e7ca111418e794fb5880 (patch) | |
tree | 326ab570323b831de4d0b739c07499fff3f5dfe8 /crosperf/label.py | |
parent | 8cf53086b1ebb5632f8f52b1644d83938c9c8cf1 (diff) | |
download | toolchain-utils-ffd98bbabbe8f7287d79e7ca111418e794fb5880.tar.gz |
crosperf: fix the label option chrome_src
This fixes the error when chrome_src is given to label.
BUG=None
TEST=run a telemetry test with chrome_src is specified.
Change-Id: I5f97c731bec3bcb42c1172490d765f8921d30dc0
Reviewed-on: https://gerrit-int.chromium.org/42197
Reviewed-by: Caroline Tice <cmtice@google.com>
Commit-Queue: Yunlian Jiang <yunlian@google.com>
Tested-by: Yunlian Jiang <yunlian@google.com>
Diffstat (limited to 'crosperf/label.py')
-rw-r--r-- | crosperf/label.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/crosperf/label.py b/crosperf/label.py index e8193529..3e8e7621 100644 --- a/crosperf/label.py +++ b/crosperf/label.py @@ -8,6 +8,7 @@ import os from utils.file_utils import FileUtils +from utils import misc class Label(object): @@ -42,7 +43,11 @@ class Label(object): self.chrome_src = os.path.join(self.chromeos_root, "chroot/var/cache/chromeos-chrome/chrome-src-internal/src") else: - chromeos_root = FileUtils().CanonicalizeChromeOSRoot(chrome_src) + chromeos_src = misc.CanonicalizePath(chrome_src) + if not chromeos_src: + raise Exception("Invalid Chrome src given for label '%s': '%s'." + % (name, chrome_src)) + self.chrome_src = chromeos_src class MockLabel(object): |