aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2017-06-22 07:10:31 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2017-06-22 07:10:31 +0000
commit6d89ea629c4820229cc3c50762bdb5603c365088 (patch)
treeb62e13629f8222fe8942b7096ad051fea0e32021
parent07115b3acb37253a6f404b2c0b85ca608065c4ca (diff)
parentc304e037429e79e45d0b9625ad7955e96411b3aa (diff)
downloadtradefederation-6d89ea629c4820229cc3c50762bdb5603c365088.tar.gz
release-request-767e2998-9243-43e0-b656-1acb30ac5115-for-git_oc-release-4124637 snap-temp-L74200000076595014
Change-Id: Ic8125b71bd49a66e2b7278d66077df54172e260b
-rw-r--r--src/com/android/tradefed/invoker/ITestInvocation.java21
-rw-r--r--src/com/android/tradefed/invoker/TestInvocation.java17
-rw-r--r--tests/src/com/android/tradefed/command/CommandSchedulerFuncTest.java28
3 files changed, 8 insertions, 58 deletions
diff --git a/src/com/android/tradefed/invoker/ITestInvocation.java b/src/com/android/tradefed/invoker/ITestInvocation.java
index d2d29c1a3..0214071cc 100644
--- a/src/com/android/tradefed/invoker/ITestInvocation.java
+++ b/src/com/android/tradefed/invoker/ITestInvocation.java
@@ -18,7 +18,6 @@ package com.android.tradefed.invoker;
import com.android.tradefed.config.IConfiguration;
import com.android.tradefed.device.DeviceNotAvailableException;
-import com.android.tradefed.device.ITestDevice;
import com.android.tradefed.result.ITestInvocationListener;
/**
@@ -28,26 +27,6 @@ public interface ITestInvocation {
/**
* Perform the test invocation.
- * FIXME: Remove when fully moved to new interface.
- *
- * @param device the {@link ITestDevice} to perform tests.
- * @param config the {@link IConfiguration} of this test run.
- * @param rescheduler the {@link IRescheduler}, for rescheduling portions of the invocation for
- * execution on another resource(s)
- * @param extraListeners {@link ITestInvocationListener}s to notify, in addition to those in
- * <var>config</var>
- * @throws DeviceNotAvailableException if communication with device was lost
- * @throws Throwable
- * @deprecated Use {@link #invoke(IInvocationContext, IConfiguration, IRescheduler,
- * ITestInvocationListener...)} instead.
- */
- @Deprecated
- public void invoke(ITestDevice device, IConfiguration config, IRescheduler rescheduler,
- ITestInvocationListener... extraListeners) throws DeviceNotAvailableException,
- Throwable;
-
- /**
- * Perform the test invocation.
*
* @param metadata the {@link IInvocationContext} to perform tests.
* @param config the {@link IConfiguration} of this test run.
diff --git a/src/com/android/tradefed/invoker/TestInvocation.java b/src/com/android/tradefed/invoker/TestInvocation.java
index f08cbbb3a..2d42caac0 100644
--- a/src/com/android/tradefed/invoker/TestInvocation.java
+++ b/src/com/android/tradefed/invoker/TestInvocation.java
@@ -22,7 +22,6 @@ import com.android.tradefed.build.IBuildInfo;
import com.android.tradefed.build.IBuildProvider;
import com.android.tradefed.build.IDeviceBuildProvider;
import com.android.tradefed.command.CommandRunner.ExitCode;
-import com.android.tradefed.config.ConfigurationDef;
import com.android.tradefed.config.GlobalConfiguration;
import com.android.tradefed.config.IConfiguration;
import com.android.tradefed.config.IDeviceConfiguration;
@@ -153,22 +152,6 @@ public class TestInvocation implements ITestInvocation {
}
/**
- * {@inheritDoc}
- * @deprecated use {@link #invoke(IInvocationContext, IConfiguration, IRescheduler,
- ITestInvocationListener[])} instead.
- */
- @Override
- @Deprecated
- public void invoke(ITestDevice device, IConfiguration config, IRescheduler rescheduler,
- ITestInvocationListener... extraListeners)
- throws DeviceNotAvailableException, Throwable {
- IInvocationContext context = new InvocationContext();
- context.setConfigurationDescriptor(config.getConfigurationDescription());
- context.addAllocatedDevice(ConfigurationDef.DEFAULT_DEVICE_NAME, device);
- invoke(context, config, rescheduler, extraListeners);
- }
-
- /**
* Attempt to shard the configuration into sub-configurations, to be re-scheduled to run on
* multiple resources in parallel.
*
diff --git a/tests/src/com/android/tradefed/command/CommandSchedulerFuncTest.java b/tests/src/com/android/tradefed/command/CommandSchedulerFuncTest.java
index f05f2ab61..0ad2d9993 100644
--- a/tests/src/com/android/tradefed/command/CommandSchedulerFuncTest.java
+++ b/tests/src/com/android/tradefed/command/CommandSchedulerFuncTest.java
@@ -199,9 +199,11 @@ public class CommandSchedulerFuncTest extends TestCase {
public boolean runInterrupted = false;
public boolean printedStop = false;
- @Deprecated
@Override
- public void invoke(ITestDevice device, IConfiguration config, IRescheduler rescheduler,
+ public void invoke(
+ IInvocationContext metadata,
+ IConfiguration config,
+ IRescheduler rescheduler,
ITestInvocationListener... listeners)
throws DeviceNotAvailableException {
try {
@@ -239,14 +241,6 @@ public class CommandSchedulerFuncTest extends TestCase {
}
@Override
- public void invoke(
- IInvocationContext metadata, IConfiguration config, IRescheduler rescheduler,
- ITestInvocationListener... extraListeners)
- throws DeviceNotAvailableException, Throwable {
- invoke(metadata.getDevices().get(0), config, rescheduler, extraListeners);
- }
-
- @Override
public void notifyInvocationStopped() {
printedStop = true;
}
@@ -467,9 +461,11 @@ public class CommandSchedulerFuncTest extends TestCase {
mIteration = iteration;
}
- @Deprecated
@Override
- public void invoke(ITestDevice device, IConfiguration config, IRescheduler rescheduler,
+ public void invoke(
+ IInvocationContext metadata,
+ IConfiguration config,
+ IRescheduler rescheduler,
ITestInvocationListener... listeners)
throws DeviceNotAvailableException {
try {
@@ -492,14 +488,6 @@ public class CommandSchedulerFuncTest extends TestCase {
}
}
}
-
- @Override
- public void invoke(
- IInvocationContext metadata, IConfiguration config, IRescheduler rescheduler,
- ITestInvocationListener... extraListeners)
- throws DeviceNotAvailableException, Throwable {
- invoke(metadata.getDevices().get(0), config, rescheduler, extraListeners);
- }
}
/**