blob: d3fce25bf4ad07c4965a1f7838b94b33a8680476 [file] [log] [blame]
Brett Chabot74121d82010-01-28 20:14:27 -08001/*
2 * Copyright (C) 2010 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16package com.android.tradefed.config;
17
Brett Chabot1b808f22010-03-16 11:17:12 -070018import com.android.tradefed.device.WaitDeviceRecovery;
Brett Chabot74121d82010-01-28 20:14:27 -080019import com.android.tradefed.log.StdoutLogger;
20import com.android.tradefed.result.TextResultReporter;
21import com.android.tradefed.targetsetup.StubBuildProvider;
22import com.android.tradefed.targetsetup.StubTargetPreparer;
23import com.android.tradefed.testtype.InstrumentationTest;
24
25/**
Brett Chabotccdf3272010-02-27 18:59:03 -080026 * A configuration for simply running an Android instrumentation test.
Brett Chabot74121d82010-01-28 20:14:27 -080027 *
28 * Returns stub no-op objects for most delegates, except
29 * - uses a stdout logger and result reporter
30 * - and a instrumentation test
31 */
Brett Chabotccdf3272010-02-27 18:59:03 -080032class InstrumentConfiguration extends AbstractConfiguration {
Brett Chabot74121d82010-01-28 20:14:27 -080033
34 /**
Brett Chabotccdf3272010-02-27 18:59:03 -080035 * Creates a {@link InstrumentConfiguration}, and all its associated delegate objects.
Brett Chabot74121d82010-01-28 20:14:27 -080036 */
Brett Chabotccdf3272010-02-27 18:59:03 -080037 InstrumentConfiguration() {
Brett Chabot74121d82010-01-28 20:14:27 -080038 super();
39 addObject(BUILD_PROVIDER_NAME, new StubBuildProvider());
Brett Chabot1b808f22010-03-16 11:17:12 -070040 addObject(DEVICE_RECOVERY_NAME, new WaitDeviceRecovery());
Brett Chabot74121d82010-01-28 20:14:27 -080041 addObject(TARGET_PREPARER_NAME, new StubTargetPreparer());
42 addObject(TEST_NAME, new InstrumentationTest());
43 addObject(LOGGER_NAME, new StdoutLogger());
44 addObject(RESULT_REPORTER_NAME, new TextResultReporter());
45 }
Brett Chabot74121d82010-01-28 20:14:27 -080046}