diff options
author | cmtice <cmtice@google.com> | 2014-06-04 14:19:19 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-06-05 04:15:51 +0000 |
commit | 1505b6ac10710044361cd65c7890014cb43e9930 (patch) | |
tree | 63ca8b4ca971be84d7a7603b977c698477ac1f9a /crosperf/label.py | |
parent | 2a370f7af34f6b126e80ef55891b9bff6a2858bb (diff) | |
download | toolchain-utils-1505b6ac10710044361cd65c7890014cb43e9930.tar.gz |
Update and expand machine_manager_unittest.
Expand machine_manager_unittest.py to test all functions in
machine_manager.py. Modify MachineManager class to optionally take a
command_executer and logger as arguments; also to make command executer
and logger class member attributes (rather than external objects), to
simplify testing.
BUG=None
TEST=Ran unittest to make sure it works; ran all the other unittests; ran
several 'real' crosperf runs to verify that the changes didn't break
crosperf.
Change-Id: I29798457cb1f7572cb339722b572b9d95b21b989
Reviewed-on: https://chrome-internal-review.googlesource.com/165256
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/label.py')
-rw-r--r-- | crosperf/label.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/crosperf/label.py b/crosperf/label.py index 91f6e97e..78fc1314 100644 --- a/crosperf/label.py +++ b/crosperf/label.py @@ -82,3 +82,14 @@ class MockLabel(object): self.chromeos_root = chromeos_root self.image_args = image_args self.chrome_src = chrome_src + self.image_type = self._GetImageType(chromeos_image) + + def _GetImageType(self, chromeos_image): + image_type = None + if chromeos_image.find("xbuddy://") < 0: + image_type = "local" + elif chromeos_image.find("trybot") >= 0: + image_type = "trybot" + else: + image_type = "official" + return image_type |