OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import os | 5 import os |
6 | 6 |
7 from pylib import constants | 7 from pylib import constants |
8 from pylib.base import test_instance | 8 from pylib.base import test_instance |
9 from pylib.utils import apk_helper | 9 from pylib.utils import apk_helper |
10 | 10 |
11 class UirobotTestInstance(test_instance.TestInstance): | 11 class UirobotTestInstance(test_instance.TestInstance): |
12 | 12 |
13 def __init__(self, args): | 13 def __init__(self, args): |
14 """Constructor. | 14 """Constructor. |
15 | 15 |
16 Args: | 16 Args: |
17 args: Command line arguments. | 17 args: Command line arguments. |
18 """ | 18 """ |
19 super(UirobotTestInstance, self).__init__() | 19 super(UirobotTestInstance, self).__init__() |
20 self._apk_under_test = os.path.join( | 20 self._apk_under_test = os.path.join( |
21 constants.GetOutDirectory(), args.apk_under_test) | 21 constants.GetOutDirectory(), args.app_under_test) |
22 self._minutes = args.minutes | 22 self._minutes = args.minutes |
23 self._package_name = apk_helper.GetPackageName(self._apk_under_test) | 23 self._package_name = apk_helper.GetPackageName(self._apk_under_test) |
24 self._suite = 'Android Uirobot' | 24 self._suite = 'Android Uirobot' |
25 | 25 |
26 #override | 26 #override |
27 def TestType(self): | 27 def TestType(self): |
28 """Returns type of test.""" | 28 """Returns type of test.""" |
29 return 'uirobot' | 29 return 'uirobot' |
30 | 30 |
31 #override | 31 #override |
(...skipping 17 matching lines...) Expand all Loading... |
49 return self._minutes | 49 return self._minutes |
50 | 50 |
51 @property | 51 @property |
52 def package_name(self): | 52 def package_name(self): |
53 """Returns the name of the package in the APK.""" | 53 """Returns the name of the package in the APK.""" |
54 return self._package_name | 54 return self._package_name |
55 | 55 |
56 @property | 56 @property |
57 def suite(self): | 57 def suite(self): |
58 return self._suite | 58 return self._suite |
OLD | NEW |