Merge "MediaBitstreamsTest: remove unnecessary APK installs" into oc-dev
diff --git a/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/MediaBitstreamsTest.java b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/MediaBitstreamsTest.java
index 9d08606..a82b9c3 100644
--- a/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/MediaBitstreamsTest.java
+++ b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/MediaBitstreamsTest.java
@@ -345,8 +345,8 @@
ReportProcessor processor = new ProcessBitstreamsFormats();
processor.processDeviceReport(
getDevice(),
- mBuildHelper.getTestsDir(),
- getCurrentMethod(), MediaBitstreams.KEY_BITSTREAMS_FORMATS_XML);
+ getCurrentMethod(),
+ MediaBitstreams.KEY_BITSTREAMS_FORMATS_XML);
}
@Test
@@ -363,7 +363,6 @@
preparer = new SupportedBitstreamsProcessor(prefix, mDebugTargetDevice);
preparer.processDeviceReport(
device,
- mBuildHelper.getTestsDir(),
MediaBitstreams.K_TEST_GET_SUPPORTED_BITSTREAMS,
MediaBitstreams.KEY_SUPPORTED_BITSTREAMS_TXT);
Set<String> supportedBitstreams = preparer.getSupportedBitstreams();
@@ -399,8 +398,8 @@
processor = new ProcessBitstreamsValidation(bitstreams, currentMethod);
processor.processDeviceReport(
device,
- mBuildHelper.getTestsDir(),
- currentMethod, MediaBitstreams.KEY_BITSTREAMS_VALIDATION_TXT);
+ currentMethod,
+ MediaBitstreams.KEY_BITSTREAMS_VALIDATION_TXT);
bitstreams.clear();
size = 0;
n++;
diff --git a/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/ReportProcessor.java b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/ReportProcessor.java
index 8c41347..bb3daa7 100644
--- a/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/ReportProcessor.java
+++ b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/ReportProcessor.java
@@ -22,7 +22,6 @@
import com.android.tradefed.log.LogUtil.CLog;
import com.android.tradefed.result.ITestInvocationListener;
import com.android.tradefed.testtype.AndroidJUnitTest;
-import java.io.File;
import java.io.IOException;
import java.util.Collections;
import java.util.HashMap;
@@ -39,7 +38,6 @@
private final Map<String, String> mMetrics = new HashMap<>();
private String mFailureStackTrace = null;
- private static final String APP_APK = "CtsMediaBitstreamsDeviceSideTestApp.apk";
private static final String APP_CLS_NAME = "MediaBitstreamsDeviceSideTest";
private static final String APP_PKG_NAME = "android.media.cts.bitstreams.app";
@@ -123,13 +121,10 @@
}
private boolean runDeviceTest(
- ITestDevice device, File testDir, String method, String reportKey,
- int testTimeout, long shellTimeout)
+ ITestDevice device, String method, String reportKey, int testTimeout,
+ long shellTimeout)
throws DeviceNotAvailableException {
- File apkFile = new File(testDir, APP_APK);
- device.installPackage(apkFile, true, true);
-
String fullTestName = String.format("%s.%s#%s", APP_PKG_NAME, APP_CLS_NAME, method);
AndroidJUnitTest instrTest = new AndroidJUnitTest();
instrTest.setDevice(device);
@@ -159,11 +154,11 @@
}
void processDeviceReport(
- ITestDevice device, File testDir, String method, String reportKey)
+ ITestDevice device, String method, String reportKey)
throws DeviceNotAvailableException, IOException {
try {
setUp(device);
- while (!runDeviceTest(device, testDir, method, reportKey, 0, 0)) {
+ while (!runDeviceTest(device, method, reportKey, 0, 0)) {
if (!recover(device, mMetrics.get(reportKey))) {
return;
}