Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(270)

Side by Side Diff: build/android/pylib/uirobot/uirobot_test_instance.py

Issue 816543004: Update from https://crrev.com/308996 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 10
10 class UirobotTestInstance(test_instance.TestInstance): 11 class UirobotTestInstance(test_instance.TestInstance):
11 12
12 def __init__(self, args): 13 def __init__(self, args):
13 """Constructor. 14 """Constructor.
14 15
15 Args: 16 Args:
16 args: Command line arguments. 17 args: Command line arguments.
17 """ 18 """
18 super(UirobotTestInstance, self).__init__() 19 super(UirobotTestInstance, self).__init__()
19 self._apk_under_test = os.path.join( 20 self._apk_under_test = os.path.join(
20 constants.GetOutDirectory(), args.apk_under_test) 21 constants.GetOutDirectory(), args.apk_under_test)
21 self._minutes = args.minutes 22 self._minutes = args.minutes
23 self._package_name = apk_helper.GetPackageName(self._apk_under_test)
22 24
23 #override 25 #override
24 def TestType(self): 26 def TestType(self):
25 """Returns type of test.""" 27 """Returns type of test."""
26 return 'uirobot' 28 return 'uirobot'
27 29
28 #override 30 #override
29 def SetUp(self): 31 def SetUp(self):
30 """Setup for test.""" 32 """Setup for test."""
31 pass 33 pass
32 34
33 #override 35 #override
34 def TearDown(self): 36 def TearDown(self):
35 """Teardown for test.""" 37 """Teardown for test."""
36 pass 38 pass
37 39
38 @property 40 @property
39 def apk_under_test(self): 41 def apk_under_test(self):
40 """Returns the app to run the test on.""" 42 """Returns the app to run the test on."""
41 return self._apk_under_test 43 return self._apk_under_test
42 44
43 @property 45 @property
44 def suite(self):
45 """Returns the test suite, none for uirobot."""
46 return None
47
48 @property
49 def minutes(self): 46 def minutes(self):
50 """Returns the number of minutes to run the uirobot for.""" 47 """Returns the number of minutes to run the uirobot for."""
51 return self._minutes 48 return self._minutes
49
50 @property
51 def package_name(self):
52 """Returns the name of the package in the APK."""
53 return self._package_name
OLDNEW
« no previous file with comments | « build/android/pylib/remote/device/remote_device_uirobot_run.py ('k') | build/android/pylib/utils/device_temp_file.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698