CTS: JVMTI AOSP compatibility shim
Compatibility issues.
Bug: 32072923
Test: m cts
Merged-In: Ieb1d31c09e642d719929e4369dc8b4d316842b4a
Change-Id: I8ea70aeec30c3c43ca55637f47528c48bc2e3ae2
diff --git a/hostsidetests/jvmti/base/host/src/android/jvmti/cts/JvmtiHostTest.java b/hostsidetests/jvmti/base/host/src/android/jvmti/cts/JvmtiHostTest.java
index 326ff96..f2119c6 100644
--- a/hostsidetests/jvmti/base/host/src/android/jvmti/cts/JvmtiHostTest.java
+++ b/hostsidetests/jvmti/base/host/src/android/jvmti/cts/JvmtiHostTest.java
@@ -132,13 +132,22 @@
}
}
+ File getTestFile(String filename) throws java.io.FileNotFoundException {
+ File testFile = new File(mBuildHelper.getTestsDir(), filename);
+ if (!testFile.exists()) {
+ throw new java.io.FileNotFoundException(String.format(
+ "Compatibility test file %s does not exist", filename));
+ }
+ return testFile;
+ }
+
String installLibToDataData(String dataData, String library) throws Exception {
ZipFile zf = null;
File tmpFile = null;
try {
String libInDataData = dataData + "/" + library;
- File apkFile = mBuildHelper.getTestFile(mApk);
+ File apkFile = getTestFile(mApk);
zf = new ZipFile(apkFile);
String libPathInApk = "lib/" + mAbi.getName() + "/" + library;
diff --git a/hostsidetests/jvmti/base/host/src/android/jvmti/cts/JvmtiPreparer.java b/hostsidetests/jvmti/base/host/src/android/jvmti/cts/JvmtiPreparer.java
index 1577ab3..2039b7b 100644
--- a/hostsidetests/jvmti/base/host/src/android/jvmti/cts/JvmtiPreparer.java
+++ b/hostsidetests/jvmti/base/host/src/android/jvmti/cts/JvmtiPreparer.java
@@ -32,9 +32,9 @@
}
@Override
- protected File getLocalPathForFilename(IBuildInfo arg0, String arg1, ITestDevice arg2)
+ protected File getLocalPathForFilename(IBuildInfo arg0, String arg1)
throws TargetSetupError {
storedApkName = arg1;
- return super.getLocalPathForFilename(arg0, arg1, arg2);
+ return super.getLocalPathForFilename(arg0, arg1);
}
}