OLD | NEW |
(Empty) | |
| 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 |
| 3 # found in the LICENSE file. |
| 4 |
| 5 import os |
| 6 |
| 7 from pylib import constants |
| 8 from pylib.base import test_instance |
| 9 |
| 10 class UirobotTestInstance(test_instance.TestInstance): |
| 11 |
| 12 def __init__(self, args): |
| 13 """Constructor. |
| 14 |
| 15 Args: |
| 16 args: Command line arguments. |
| 17 """ |
| 18 super(UirobotTestInstance, self).__init__() |
| 19 self._apk_under_test = os.path.join( |
| 20 constants.GetOutDirectory(), args.apk_under_test) |
| 21 self._minutes = args.minutes |
| 22 |
| 23 #override |
| 24 def TestType(self): |
| 25 """Returns type of test.""" |
| 26 return 'uirobot' |
| 27 |
| 28 #override |
| 29 def SetUp(self): |
| 30 """Setup for test.""" |
| 31 pass |
| 32 |
| 33 #override |
| 34 def TearDown(self): |
| 35 """Teardown for test.""" |
| 36 pass |
| 37 |
| 38 @property |
| 39 def apk_under_test(self): |
| 40 """Returns the app to run the test on.""" |
| 41 return self._apk_under_test |
| 42 |
| 43 @property |
| 44 def suite(self): |
| 45 """Returns the test suite, none for uirobot.""" |
| 46 return None |
| 47 |
| 48 @property |
| 49 def minutes(self): |
| 50 """Returns the number of minutes to run the uirobot for.""" |
| 51 return self._minutes |
OLD | NEW |