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

Side by Side Diff: build/android/pylib/base/test_run_factory.py

Issue 832493005: Add Instrumentation test support to remote device (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months 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
« no previous file with comments | « no previous file | build/android/pylib/instrumentation/instrumentation_test_instance.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 from pylib.gtest import gtest_test_instance 5 from pylib.gtest import gtest_test_instance
6 from pylib.gtest import local_device_gtest_run 6 from pylib.gtest import local_device_gtest_run
7 from pylib.instrumentation import instrumentation_test_instance 7 from pylib.instrumentation import instrumentation_test_instance
8 from pylib.local.device import local_device_environment 8 from pylib.local.device import local_device_environment
9 from pylib.local.device import local_device_instrumentation_test_run 9 from pylib.local.device import local_device_instrumentation_test_run
10 from pylib.remote.device import remote_device_environment 10 from pylib.remote.device import remote_device_environment
11 from pylib.remote.device import remote_device_gtest_run 11 from pylib.remote.device import remote_device_gtest_run
12 from pylib.remote.device import remote_device_uirobot_run 12 from pylib.remote.device import remote_device_instrumentation_test_run
13 from pylib.remote.device import remote_device_uirobot_test_run
13 from pylib.uirobot import uirobot_test_instance 14 from pylib.uirobot import uirobot_test_instance
14 15
15 16
16 def CreateTestRun(_args, env, test_instance, error_func): 17 def CreateTestRun(_args, env, test_instance, error_func):
17 if isinstance(env, local_device_environment.LocalDeviceEnvironment): 18 if isinstance(env, local_device_environment.LocalDeviceEnvironment):
18 if isinstance(test_instance, gtest_test_instance.GtestTestInstance): 19 if isinstance(test_instance, gtest_test_instance.GtestTestInstance):
19 return local_device_gtest_run.LocalDeviceGtestRun(env, test_instance) 20 return local_device_gtest_run.LocalDeviceGtestRun(env, test_instance)
20 if isinstance(test_instance, 21 if isinstance(test_instance,
21 instrumentation_test_instance.InstrumentationTestInstance): 22 instrumentation_test_instance.InstrumentationTestInstance):
22 return (local_device_instrumentation_test_run 23 return (local_device_instrumentation_test_run
23 .LocalDeviceInstrumentationTestRun(env, test_instance)) 24 .LocalDeviceInstrumentationTestRun(env, test_instance))
24 25
25 if isinstance(env, remote_device_environment.RemoteDeviceEnvironment): 26 if isinstance(env, remote_device_environment.RemoteDeviceEnvironment):
26 if isinstance(test_instance, gtest_test_instance.GtestTestInstance): 27 if isinstance(test_instance, gtest_test_instance.GtestTestInstance):
27 return remote_device_gtest_run.RemoteDeviceGtestRun(env, test_instance) 28 return remote_device_gtest_run.RemoteDeviceGtestTestRun(
28 # TODO(rnephew): Add remote_device instrumentation test runs. 29 env, test_instance)
30 if isinstance(test_instance,
31 instrumentation_test_instance.InstrumentationTestInstance):
32 return (remote_device_instrumentation_test_run
33 .RemoteDeviceInstrumentationTestRun(env, test_instance))
29 if isinstance(test_instance, uirobot_test_instance.UirobotTestInstance): 34 if isinstance(test_instance, uirobot_test_instance.UirobotTestInstance):
30 return remote_device_uirobot_run.RemoteDeviceUirobotRun( 35 return remote_device_uirobot_test_run.RemoteDeviceUirobotTestRun(
31 env, test_instance) 36 env, test_instance)
32 37
33 38
34 error_func('Unable to create test run for %s tests in %s environment' 39 error_func('Unable to create test run for %s tests in %s environment'
35 % (str(test_instance), str(env))) 40 % (str(test_instance), str(env)))
36 41
OLDNEW
« no previous file with comments | « no previous file | build/android/pylib/instrumentation/instrumentation_test_instance.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698