migrate net host tests to cts_v2

Change-Id: Ida3141522a536a2d33bb366fdb6b00ced907c3a4
This commit is contained in:
Nash Lincoln
2015-11-06 17:05:17 -08:00
parent 329783175a
commit 0784f04f1b
4 changed files with 34 additions and 5 deletions

View File

@@ -21,10 +21,15 @@ LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_MODULE := CtsHostsideNetworkTests
LOCAL_JAVA_LIBRARIES := cts-tradefed tradefed-prebuilt
LOCAL_JAVA_LIBRARIES := cts-tradefed_v2 compatibility-host-util tradefed-prebuilt
LOCAL_STATIC_JAVA_LIBRARIES := cts-migration-lib
LOCAL_CTS_TEST_PACKAGE := android.net.hostsidenetwork
# Tag this module as a cts_v2 test artifact
LOCAL_COMPATIBILITY_SUITE := cts_v2
include $(BUILD_CTS_HOST_JAVA_LIBRARY)
# Build the test APKs using their own makefiles

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2015 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<configuration description="Config for CTS net host test cases">
<test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
<option name="jar" value="CtsHostsideNetworkTests.jar" />
</test>
</configuration>

View File

@@ -29,4 +29,7 @@ LOCAL_PACKAGE_NAME := CtsHostsideNetworkTestsApp
LOCAL_PROGUARD_ENABLED := disabled
LOCAL_DEX_PREOPT := false
# Tag this module as a cts_v2 test artifact
LOCAL_COMPATIBILITY_SUITE := cts_v2
include $(BUILD_CTS_SUPPORT_PACKAGE)

View File

@@ -16,7 +16,7 @@
package com.android.cts.net;
import com.android.cts.tradefed.build.CtsBuildHelper;
import com.android.cts.migration.MigrationHelper;
import com.android.ddmlib.testrunner.RemoteAndroidTestRunner;
import com.android.ddmlib.testrunner.TestIdentifier;
import com.android.ddmlib.testrunner.TestResult;
@@ -39,7 +39,7 @@ public class HostsideNetworkTests extends DeviceTestCase implements IAbiReceiver
private static final String TEST_APK = "CtsHostsideNetworkTestsApp.apk";
private IAbi mAbi;
private CtsBuildHelper mCtsBuild;
private IBuildInfo mCtsBuild;
@Override
public void setAbi(IAbi abi) {
@@ -48,7 +48,7 @@ public class HostsideNetworkTests extends DeviceTestCase implements IAbiReceiver
@Override
public void setBuild(IBuildInfo buildInfo) {
mCtsBuild = CtsBuildHelper.createBuildHelper(buildInfo);
mCtsBuild = buildInfo;
}
@Override
@@ -60,7 +60,8 @@ public class HostsideNetworkTests extends DeviceTestCase implements IAbiReceiver
getDevice().uninstallPackage(TEST_PKG);
assertNull(getDevice().installPackage(mCtsBuild.getTestApp(TEST_APK), false));
assertNull(getDevice().installPackage(
MigrationHelper.getTestFile(mCtsBuild, TEST_APK), false));
}
@Override