/* * Copyright (C) 2017 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. */ package android.jvmti.cts; import com.android.compatibility.common.tradefed.build.CompatibilityBuildHelper; import com.android.ddmlib.testrunner.RemoteAndroidTestRunner; import com.android.tradefed.build.IBuildInfo; import com.android.tradefed.config.Option; import com.android.tradefed.device.ITestDevice; import com.android.tradefed.log.LogUtil.CLog; import com.android.tradefed.result.ITestLifeCycleReceiver; import com.android.tradefed.result.TestDescription; import com.android.tradefed.testtype.DeviceTestCase; import com.android.tradefed.testtype.IAbi; import com.android.tradefed.testtype.IAbiReceiver; import com.android.tradefed.testtype.IBuildReceiver; import com.android.tradefed.util.AbiUtils; import com.android.tradefed.util.FileUtil; import com.android.tradefed.util.ZipUtil; import java.io.File; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.concurrent.TimeUnit; import java.util.zip.ZipFile; /** * Test a JVMTI device test. * * Reads the configuration (APK and package name) out of the embedded config.properties file. Runs * the agent (expected to be packaged with the APK) into the app's /data/data directory, starts a * test run and attaches the agent. */ public class JvmtiHostTest extends DeviceTestCase implements IBuildReceiver, IAbiReceiver { private static final String RUNNER = "androidx.test.runner.AndroidJUnitRunner"; // inject these options from HostTest directly using --set-option