Revert "Support ART's target gtests in atest."

This reverts commit eac404b341e40bb72f8d79ee1d1a7173862b438e.

Reason for revert: Debugging test failures (b/150282462)

Change-Id: I3582eeb1f121d4850209768b3a7ae8a444f0379a
diff --git a/TEST_MAPPING b/TEST_MAPPING
index e625f78..0c53164 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -1,9 +1,6 @@
 {
   "presubmit": [
     {
-      "name": "ArtGtestsTarget"
-    },
-    {
       "name": "CtsJdwpTestCases"
     }
   ]
diff --git a/oatdump/oatdump_test.cc b/oatdump/oatdump_test.cc
index ccd2272..5a91013 100644
--- a/oatdump/oatdump_test.cc
+++ b/oatdump/oatdump_test.cc
@@ -74,7 +74,7 @@
 }
 
 TEST_F(OatDumpTest, TestSymbolize) {
-  TEST_DISABLED_FOR_TARGET();  // Can not write files inside the apex directory.
+  TEST_DISABLED_FOR_ARM_AND_ARM64();
   std::string error_msg;
   ASSERT_TRUE(Exec(kDynamic, kModeSymbolize, {}, kListOnly));
 }
diff --git a/runtime/arch/instruction_set_features_test.cc b/runtime/arch/instruction_set_features_test.cc
index 62657cf..d9b2e3f 100644
--- a/runtime/arch/instruction_set_features_test.cc
+++ b/runtime/arch/instruction_set_features_test.cc
@@ -16,7 +16,6 @@
 
 #include <array>
 
-#include "common_runtime_test.h"
 #include "instruction_set_features.h"
 
 #include <gtest/gtest.h>
@@ -40,12 +39,6 @@
 #else
 TEST(InstructionSetFeaturesTest, FeaturesFromSystemPropertyVariant) {
 #endif
-  if (kIsTargetBuild) {
-    // atest differs in build-time and run-time features.
-    TEST_DISABLED_FOR_X86();
-    TEST_DISABLED_FOR_X86_64();
-  }
-
   // Take the default set of instruction features from the build.
   std::unique_ptr<const InstructionSetFeatures> instruction_set_features(
       InstructionSetFeatures::FromCppDefines());
@@ -73,12 +66,6 @@
 #else
 TEST(InstructionSetFeaturesTest, FeaturesFromSystemPropertyString) {
 #endif
-  if (kIsTargetBuild) {
-    // atest differs in build-time and run-time features.
-    TEST_DISABLED_FOR_X86();
-    TEST_DISABLED_FOR_X86_64();
-  }
-
   // Take the default set of instruction features from the build.
   std::unique_ptr<const InstructionSetFeatures> instruction_set_features(
       InstructionSetFeatures::FromCppDefines());
diff --git a/test/Android.bp b/test/Android.bp
index a3d9808..400fc3a 100644
--- a/test/Android.bp
+++ b/test/Android.bp
@@ -915,18 +915,6 @@
         "$(location soong_zip) -o $(out) -C $(genDir)/res -D $(genDir)/res",
 }
 
-art_cc_test {
-    name: "ArtGtestsTarget",
-    data: [
-        // We need the ART testing apex, which contains all gtest binaries.
-        // Note that due to linker constraints the gtests must be in the apex.
-        ":com.android.art.testing",
-        ":art-gtest-jars",
-    ],
-    test_suites: ["device-tests"],
-    test_config: "gtests-target.xml",
-}
-
 filegroup {
     name: "art-gtest-jars",
     srcs: [
diff --git a/test/gtests-target.xml b/test/gtests-target.xml
deleted file mode 100644
index 892c047..0000000
--- a/test/gtests-target.xml
+++ /dev/null
@@ -1,182 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2020 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="ART gtests">
-    <target_preparer class="com.android.tradefed.targetprep.InstallApexModuleTargetPreparer" >
-        <option name="test-file-name" value="com.android.art.testing.apex" />
-    </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer">
-        <option name="cleanup" value="true" />
-        <option name="push-file"
-            key="art-gtest-jars-AbstractMethod.jar"
-            value="/data/nativetest64/art/art-gtest-AbstractMethod.jar"/>
-        <option name="push-file"
-            key="art-gtest-jars-AllFields.jar"
-            value="/data/nativetest64/art/art-gtest-AllFields.jar"/>
-        <option name="push-file"
-            key="art-gtest-jars-DefaultMethods.jar"
-            value="/data/nativetest64/art/art-gtest-DefaultMethods.jar"/>
-        <option name="push-file"
-            key="art-gtest-jars-DexToDexDecompiler.jar"
-            value="/data/nativetest64/art/art-gtest-DexToDexDecompiler.jar"/>
-        <option name="push-file"
-            key="art-gtest-jars-ErroneousA.jar"
-            value="/data/nativetest64/art/art-gtest-ErroneousA.jar"/>
-        <option name="push-file"
-            key="art-gtest-jars-ErroneousB.jar"
-            value="/data/nativetest64/art/art-gtest-ErroneousB.jar"/>
-        <option name="push-file"
-            key="art-gtest-jars-ErroneousInit.jar"
-            value="/data/nativetest64/art/art-gtest-ErroneousInit.jar"/>
-        <option name="push-file"
-            key="art-gtest-jars-ForClassLoaderA.jar"
-            value="/data/nativetest64/art/art-gtest-ForClassLoaderA.jar"/>
-        <option name="push-file"
-            key="art-gtest-jars-ForClassLoaderB.jar"
-            value="/data/nativetest64/art/art-gtest-ForClassLoaderB.jar"/>
-        <option name="push-file"
-            key="art-gtest-jars-ForClassLoaderC.jar"
-            value="/data/nativetest64/art/art-gtest-ForClassLoaderC.jar"/>
-        <option name="push-file"
-            key="art-gtest-jars-ForClassLoaderD.jar"
-            value="/data/nativetest64/art/art-gtest-ForClassLoaderD.jar"/>
-        <option name="push-file"
-            key="art-gtest-jars-ExceptionHandle.jar"
-            value="/data/nativetest64/art/art-gtest-ExceptionHandle.jar"/>
-        <option name="push-file"
-            key="art-gtest-jars-GetMethodSignature.jar"
-            value="/data/nativetest64/art/art-gtest-GetMethodSignature.jar"/>
-        <option name="push-file"
-            key="art-gtest-jars-HiddenApi.jar"
-            value="/data/nativetest64/art/art-gtest-HiddenApi.jar"/>
-        <option name="push-file"
-            key="art-gtest-jars-HiddenApiSignatures.jar"
-            value="/data/nativetest64/art/art-gtest-HiddenApiSignatures.jar"/>
-        <option name="push-file"
-            key="art-gtest-jars-HiddenApiStubs.jar"
-            value="/data/nativetest64/art/art-gtest-HiddenApiStubs.jar"/>
-        <option name="push-file"
-            key="art-gtest-jars-ImageLayoutA.jar"
-            value="/data/nativetest64/art/art-gtest-ImageLayoutA.jar"/>
-        <option name="push-file"
-            key="art-gtest-jars-ImageLayoutB.jar"
-            value="/data/nativetest64/art/art-gtest-ImageLayoutB.jar"/>
-        <option name="push-file"
-            key="art-gtest-jars-IMTA.jar"
-            value="/data/nativetest64/art/art-gtest-IMTA.jar"/>
-        <option name="push-file"
-            key="art-gtest-jars-IMTB.jar"
-            value="/data/nativetest64/art/art-gtest-IMTB.jar"/>
-        <option name="push-file"
-            key="art-gtest-jars-Instrumentation.jar"
-            value="/data/nativetest64/art/art-gtest-Instrumentation.jar"/>
-        <option name="push-file"
-            key="art-gtest-jars-Interfaces.jar"
-            value="/data/nativetest64/art/art-gtest-Interfaces.jar"/>
-        <option name="push-file"
-            key="art-gtest-jars-Lookup.jar"
-            value="/data/nativetest64/art/art-gtest-Lookup.jar"/>
-        <option name="push-file"
-            key="art-gtest-jars-Main.jar"
-            value="/data/nativetest64/art/art-gtest-Main.jar"/>
-        <option name="push-file"
-            key="art-gtest-jars-ManyMethods.jar"
-            value="/data/nativetest64/art/art-gtest-ManyMethods.jar"/>
-        <option name="push-file"
-            key="art-gtest-jars-MethodTypes.jar"
-            value="/data/nativetest64/art/art-gtest-MethodTypes.jar"/>
-        <option name="push-file"
-            key="art-gtest-jars-MultiDex.jar"
-            value="/data/nativetest64/art/art-gtest-MultiDex.jar"/>
-        <option name="push-file"
-            key="art-gtest-jars-MultiDexModifiedSecondary.jar"
-            value="/data/nativetest64/art/art-gtest-MultiDexModifiedSecondary.jar"/>
-        <option name="push-file"
-            key="art-gtest-jars-MyClass.jar"
-            value="/data/nativetest64/art/art-gtest-MyClass.jar"/>
-        <option name="push-file"
-            key="art-gtest-jars-MyClassNatives.jar"
-            value="/data/nativetest64/art/art-gtest-MyClassNatives.jar"/>
-        <option name="push-file"
-            key="art-gtest-jars-Nested.jar"
-            value="/data/nativetest64/art/art-gtest-Nested.jar"/>
-        <option name="push-file"
-            key="art-gtest-jars-NonStaticLeafMethods.jar"
-            value="/data/nativetest64/art/art-gtest-NonStaticLeafMethods.jar"/>
-        <option name="push-file"
-            key="art-gtest-jars-Packages.jar"
-            value="/data/nativetest64/art/art-gtest-Packages.jar"/>
-        <option name="push-file"
-            key="art-gtest-jars-ProtoCompare.jar"
-            value="/data/nativetest64/art/art-gtest-ProtoCompare.jar"/>
-        <option name="push-file"
-            key="art-gtest-jars-ProtoCompare2.jar"
-            value="/data/nativetest64/art/art-gtest-ProtoCompare2.jar"/>
-        <option name="push-file"
-            key="art-gtest-jars-ProfileTestMultiDex.jar"
-            value="/data/nativetest64/art/art-gtest-ProfileTestMultiDex.jar"/>
-        <option name="push-file"
-            key="art-gtest-jars-StaticLeafMethods.jar"
-            value="/data/nativetest64/art/art-gtest-StaticLeafMethods.jar"/>
-        <option name="push-file"
-            key="art-gtest-jars-Statics.jar"
-            value="/data/nativetest64/art/art-gtest-Statics.jar"/>
-        <option name="push-file"
-            key="art-gtest-jars-StaticsFromCode.jar"
-            value="/data/nativetest64/art/art-gtest-StaticsFromCode.jar"/>
-        <option name="push-file"
-            key="art-gtest-jars-StringLiterals.jar"
-            value="/data/nativetest64/art/art-gtest-StringLiterals.jar"/>
-        <option name="push-file"
-            key="art-gtest-jars-Transaction.jar"
-            value="/data/nativetest64/art/art-gtest-Transaction.jar"/>
-        <option name="push-file"
-            key="art-gtest-jars-XandY.jar"
-            value="/data/nativetest64/art/art-gtest-XandY.jar"/>
-        <option name="push-file"
-            key="art-gtest-jars-MainEmptyUncompressed.jar"
-            value="/data/nativetest64/art/art-gtest-MainEmptyUncompressed.jar"/>
-        <option name="push-file"
-            key="art-gtest-jars-MainEmptyUncompressedAligned.jar"
-            value="/data/nativetest64/art/art-gtest-MainEmptyUncompressedAligned.jar"/>
-        <option name="push-file"
-            key="art-gtest-jars-MainStripped.jar"
-            value="/data/nativetest64/art/art-gtest-MainStripped.jar"/>
-        <option name="push-file"
-            key="art-gtest-jars-MainUncompressedAligned.jar"
-            value="/data/nativetest64/art/art-gtest-MainUncompressedAligned.jar"/>
-        <option name="push-file"
-            key="art-gtest-jars-MultiDexUncompressedAligned.jar"
-            value="/data/nativetest64/art/art-gtest-MultiDexUncompressedAligned.jar"/>
-        <option name="push-file"
-            key="art-gtest-jars-VerifierDeps.jar"
-            value="/data/nativetest64/art/art-gtest-VerifierDeps.jar"/>
-        <option name="push-file"
-            key="art-gtest-jars-VerifierDepsMulti.jar"
-            value="/data/nativetest64/art/art-gtest-VerifierDepsMulti.jar"/>
-        <option name="push-file"
-            key="art-gtest-jars-VerifySoftFailDuringClinit.jar"
-            value="/data/nativetest64/art/art-gtest-VerifySoftFailDuringClinit.jar"/>
-    </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
-        <option name="run-command" value="cp -r /data/nativetest64 /data/nativetest" />
-    </target_preparer>
-    <test class="com.android.tradefed.testtype.GTest" >
-        <!-- TODO: These tests do not work since they need to write to /system -->
-        <option name="exclude-filter" value="HiddenApiTest.DexDomain_System*:OatFileAssistantTest.SystemFrameworkDir" />
-        <option name="native-test-timeout" value="600000" /> <!-- 10 min -->
-        <option name="native-test-device-path" value="/apex/com.android.art/bin/art" />
-    </test>
-</configuration>