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

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

Issue 2605793002: [android] Convert linker tests to platform mode. (Closed)
Patch Set: mikecase comment Created 3 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
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.instrumentation import instrumentation_test_instance 6 from pylib.instrumentation import instrumentation_test_instance
7 from pylib.junit import junit_test_instance 7 from pylib.junit import junit_test_instance
8 from pylib.linker import linker_test_instance
8 from pylib.monkey import monkey_test_instance 9 from pylib.monkey import monkey_test_instance
9 from pylib.local.device import local_device_environment 10 from pylib.local.device import local_device_environment
10 from pylib.local.device import local_device_gtest_run 11 from pylib.local.device import local_device_gtest_run
11 from pylib.local.device import local_device_instrumentation_test_run 12 from pylib.local.device import local_device_instrumentation_test_run
13 from pylib.local.device import local_device_linker_test_run
12 from pylib.local.device import local_device_monkey_test_run 14 from pylib.local.device import local_device_monkey_test_run
13 from pylib.local.device import local_device_perf_test_run 15 from pylib.local.device import local_device_perf_test_run
14 from pylib.local.machine import local_machine_environment 16 from pylib.local.machine import local_machine_environment
15 from pylib.local.machine import local_machine_junit_test_run 17 from pylib.local.machine import local_machine_junit_test_run
16 from pylib.perf import perf_test_instance 18 from pylib.perf import perf_test_instance
17 19
18 20
19 def _CreatePerfTestRun(args, env, test_instance): 21 def _CreatePerfTestRun(args, env, test_instance):
20 if args.print_step: 22 if args.print_step:
21 return local_device_perf_test_run.PrintStep( 23 return local_device_perf_test_run.PrintStep(
22 env, test_instance) 24 env, test_instance)
23 elif args.output_json_list: 25 elif args.output_json_list:
24 return local_device_perf_test_run.OutputJsonList( 26 return local_device_perf_test_run.OutputJsonList(
25 env, test_instance) 27 env, test_instance)
26 return local_device_perf_test_run.LocalDevicePerfTestRun( 28 return local_device_perf_test_run.LocalDevicePerfTestRun(
27 env, test_instance) 29 env, test_instance)
28 30
29 31
30 def CreateTestRun(args, env, test_instance, error_func): 32 def CreateTestRun(args, env, test_instance, error_func):
31 if isinstance(env, local_device_environment.LocalDeviceEnvironment): 33 if isinstance(env, local_device_environment.LocalDeviceEnvironment):
32 if isinstance(test_instance, gtest_test_instance.GtestTestInstance): 34 if isinstance(test_instance, gtest_test_instance.GtestTestInstance):
33 return local_device_gtest_run.LocalDeviceGtestRun(env, test_instance) 35 return local_device_gtest_run.LocalDeviceGtestRun(env, test_instance)
34 if isinstance(test_instance, 36 if isinstance(test_instance,
35 instrumentation_test_instance.InstrumentationTestInstance): 37 instrumentation_test_instance.InstrumentationTestInstance):
36 return (local_device_instrumentation_test_run 38 return (local_device_instrumentation_test_run
37 .LocalDeviceInstrumentationTestRun(env, test_instance)) 39 .LocalDeviceInstrumentationTestRun(env, test_instance))
40 if isinstance(test_instance, linker_test_instance.LinkerTestInstance):
41 return (local_device_linker_test_run
42 .LocalDeviceLinkerTestRun(env, test_instance))
38 if isinstance(test_instance, monkey_test_instance.MonkeyTestInstance): 43 if isinstance(test_instance, monkey_test_instance.MonkeyTestInstance):
39 return (local_device_monkey_test_run 44 return (local_device_monkey_test_run
40 .LocalDeviceMonkeyTestRun(env, test_instance)) 45 .LocalDeviceMonkeyTestRun(env, test_instance))
41 if isinstance(test_instance, 46 if isinstance(test_instance,
42 perf_test_instance.PerfTestInstance): 47 perf_test_instance.PerfTestInstance):
43 return _CreatePerfTestRun(args, env, test_instance) 48 return _CreatePerfTestRun(args, env, test_instance)
44 49
45 if isinstance(env, local_machine_environment.LocalMachineEnvironment): 50 if isinstance(env, local_machine_environment.LocalMachineEnvironment):
46 if isinstance(test_instance, junit_test_instance.JunitTestInstance): 51 if isinstance(test_instance, junit_test_instance.JunitTestInstance):
47 return (local_machine_junit_test_run 52 return (local_machine_junit_test_run
48 .LocalMachineJunitTestRun(env, test_instance)) 53 .LocalMachineJunitTestRun(env, test_instance))
49 54
50 error_func('Unable to create test run for %s tests in %s environment' 55 error_func('Unable to create test run for %s tests in %s environment'
51 % (str(test_instance), str(env))) 56 % (str(test_instance), str(env)))
52 57
OLDNEW
« no previous file with comments | « build/android/pylib/base/test_instance_factory.py ('k') | build/android/pylib/linker/linker_test_instance.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698