blob: 5ba46aa20c8dd98a0ce5edcc614c56a6f6a6fcf2 [file] [log] [blame]
Brett Chabot6420e9b2010-03-31 11:21:16 -07001/*
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
18import com.android.tradefed.device.WaitDeviceRecovery;
Brett Chabotfeeb2142010-04-16 16:22:52 -070019import com.android.tradefed.log.FileLogger;
Brett Chabot6420e9b2010-03-31 11:21:16 -070020import com.android.tradefed.result.XmlResultReporter;
21import com.android.tradefed.targetsetup.StubBuildProvider;
22import com.android.tradefed.targetsetup.StubTargetPreparer;
23import com.android.tradefed.testtype.testdefs.XmlDefsTest;
24
25/**
Brett Chabotfeeb2142010-04-16 16:22:52 -070026 * A {@link IConfiguration} for running instrumentation tests contained in test_def.xml files.
Brett Chabot6420e9b2010-03-31 11:21:16 -070027 * <p/>
Brett Chabotfeeb2142010-04-16 16:22:52 -070028 * Uses a file logger and XML result reporter.
Brett Chabot6420e9b2010-03-31 11:21:16 -070029 */
30class TestDefConfiguration extends AbstractConfiguration {
31
32 /**
33 * Creates a {@link TestDefConfiguration}, and all its associated delegate objects.
34 *
35 * @throws ConfigurationException
36 */
37 TestDefConfiguration() throws ConfigurationException {
38 super();
39 addObject(BUILD_PROVIDER_NAME, new StubBuildProvider());
40 addObject(DEVICE_RECOVERY_NAME, new WaitDeviceRecovery());
41 addObject(TARGET_PREPARER_NAME, new StubTargetPreparer());
42 addObject(TEST_NAME, new XmlDefsTest());
Brett Chabotfeeb2142010-04-16 16:22:52 -070043 addObject(LOGGER_NAME, new FileLogger());
Brett Chabot6420e9b2010-03-31 11:21:16 -070044 addObject(RESULT_REPORTER_NAME, new XmlResultReporter());
45 }
46}