Remove support for building art tests

We have not done this for more than 5 years, if anyone ever need this they can checkout an old version

Bug: 270021542
Bug: 185205222
Change-Id: Ic5e24d6c1dd6f7cf7b5adbb359d2a2bb8ec8db9f
diff --git a/build.gradle b/build.gradle
index a9990d7..a264787 100644
--- a/build.gradle
+++ b/build.gradle
@@ -2420,277 +2420,6 @@
     }
 }
 
-// The Art tests we use for R8 are pre-build and downloaded from Google Cloud Storage.
-//
-// To build and upload a new set of the Art tests for use with R8 follow these steps:
-//
-// First of all an Android checkout is required. Currently it must be located
-// in $HOME/android/master.
-//
-// TODO(ricow): simplify this
-//
-// Before: update the checked in art, see scripts/update-host-art.sh
-//
-// 1. Get an android checkout in $HOME/android/master and apply the patch from
-//    https://android-review.googlesource.com/#/c/294187/
-//
-// 2. run the following commands in the Android checkout directory:
-//
-//    source build/envsetup.sh
-//    lunch aosp_angler-userdebug # or lunch aosp_angler-eng
-//    m desugar
-//    m -j30 test-art-host
-//    DESUGAR=false ANDROID_COMPILE_WITH_JACK=false art/test.py --host -t 001-HelloWorld
-//
-//    Without running the test.py command the classes.jar file used by desugar in
-//    $HOME/android/master/out/host/common/obj/JAVA_LIBRARIES/core-oj-hostdex_intermediates/
-//    seems to be missing - there is probably also a make target to build it more directly
-//
-// 3. In the R8 project root directory, make sure we have a clean state before starting:
-//    tools/gradle.py downloadDeps
-//    tools/gradle.py clean
-//    rm -rf tests/art
-//
-// 4. Now build in the R8 checkout (-P hack to not generate dirs when not running this target)
-//    Make sure you have smali on your path, please use the build binary in the
-//    out/host/linux-x86/bin directory of the android checkout. Currently this is version pre 2.2.1,
-//    if that is updated the call to smali in "task "${smaliToDexTask}"(type: Exec)" below might
-//    need to change as smali got a completely new command line interface in version 2.2.1.
-//    After Android O, Jack is no longer alive, do not forget to uncomment call to buildArtTest for
-//    Jack if you build an android version using Jack.
-//
-//    PATH=$HOME/android/master/out/host/linux-x86/bin:$PATH tools/gradle.py -Pandroid_source buildArtTests
-//
-// 4a. If any failures are produced in step 4, figure out what went wrong and add an entry in
-//     skippedTests with an explanation. Rerun from step 3.
-//
-// 5. Run the tests:
-//    tools/gradle.py clean
-//    tools/test.py
-//
-// 5a. If any more tests fail, either fix the issue or add them to the failuresToTriage list (note
-//     that you need to change "_" to "-" from stdout). Rerun from step 5 if anything was added to
-//     failuresToTriage.
-//
-// 6. To upload a new version to Google Cloud Storage:
-//    cd tests
-//    upload_to_google_storage.py -a --bucket r8-deps art
-//
-// 7. Update the manifest file describing the Android repo used:
-//    repo manifest -o <r8-checkout-root>/tools/linux/aosp_master_manifest.xml -r
-
-def androidCheckoutDir = file("${System.env.HOME}/android/master")
-
-def artTestDir = file("${androidCheckoutDir}/art/test")
-
-if (project.hasProperty('android_source')) {
-    task buildArtTests {
-        outputs.upToDateWhen { false }
-        def toBeTriaged = [
-                "903-hello-tagging",
-                "904-object-allocation",
-                "905-object-free",
-                "906-iterate-heap",
-                "907-get-loaded-classes",
-                "908-gc-start-finish",
-                "954-invoke-polymorphic-verifier",
-                "955-methodhandles-smali",
-                "596-monitor-inflation",
-        ]
-        def skippedTests = toBeTriaged + [
-                // This test produces no jar.
-                "000-nop",
-                // This does not build, as it tests the error when the application exceeds more
-                // than 65536 methods
-                "089-many-methods",
-                // Requires some jack beta jar
-                "956-methodhandles",
-        ]
-
-        def skippedTestsDx = [
-                // Tests with custom build scripts, where javac is not passed the options
-                // -source 1.7 -target 1.7.
-                "462-checker-inlining-across-dex-files",
-                "556-invoke-super",
-                "569-checker-pattern-replacement",
-                // These tests use jack even when --build-with-javac-dx is specified.
-                "004-JniTest",
-                "048-reflect-v8",
-                "146-bad-interface",
-                "563-checker-invoke-super",
-                "580-checker-string-fact-intrinsics",  // java.lang.StringFactory
-                "604-hot-static-interface",
-                "957-methodhandle-transforms",
-                "958-methodhandle-emulated-stackframe",
-                "959-invoke-polymorphic-accessors",
-                "961-default-iface-resolution-gen",
-                "962-iface-static",
-                "963-default-range-smali",
-                "964-default-iface-init-gen",
-                "965-default-verify",
-                "966-default-conflict",
-                "967-default-ame",
-                "968-default-partial-compile-gen",
-                "969-iface-super",
-                "970-iface-super-resolution-gen",
-                "971-iface-super",
-                // These tests does not build with --build-with-javac-dx
-                "004-NativeAllocations", // Javac error
-                "031-class-attributes",
-                "138-duplicate-classes-check",
-                "157-void-class", // Javac error
-                "580-checker-string-factory-intrinsics",
-                "612-jit-dex-cache",
-                "613-inlining-dex-cache",
-                "900-hello-plugin",  // --experimental agents
-                "901-hello-ti-agent",  // --experimental agents
-                "902-hello-transformation",  // --experimental agents
-                "909-attach-agent",  // --experimental agents
-                "946-obsolete-throw", // -source 1.7 -target 1.7, but use lambda
-                "950-redefine-intrinsic", // -source 1.7 -target 1.7, but use method references
-                "951-threaded-obsolete", // -source 1.7 -target 1.7, but use lambda
-                "960-default-smali",  // --experimental default-methods
-                // These tests force the build to use jack
-                "953-invoke-polymorphic-compiler",
-                "958-methodhandle-stackframe",
-        ]
-
-        def artTestBuildDir = file("${projectDir}/tests/art")
-
-        if (androidCheckoutDir.exists()) {
-            dependsOn downloadDeps
-            artTestBuildDir.mkdirs()
-            artTestDir.eachDir { dir ->
-                def name = dir.getName();
-                def markerFile = dir.toPath().resolve("info.txt").toFile();
-                if (markerFile.exists() && !(name in skippedTests)) {
-                    if (!(name in skippedTestsDx)) {
-                        dependsOn buildArtTest(androidCheckoutDir, artTestBuildDir, dir);
-                    }
-                }
-            }
-        }
-        doFirst {
-            if (!androidCheckoutDir.exists()) {
-                throw new InvalidUserDataException(
-                        "This task requires an Android checkout in ${androidCheckoutDir}");
-            }
-        }
-        doLast {
-            copy {
-                from file("${androidCheckoutDir}/out/host/linux-x86/nativetest64")
-                into file("${artTestBuildDir}/lib64")
-                include 'lib*.so'
-            }
-            copy {
-                from file("${androidCheckoutDir}/out/host/linux-x86/lib64")
-                into file("${artTestBuildDir}/lib64")
-                include 'libart.so'
-                include 'libbacktrace.so'
-                include 'libbase.so'
-                include 'libc++.so'
-                include 'libcutils.so'
-                include 'liblz4.so'
-                include 'liblzma.so'
-                include 'libnativebridge.so'
-                include 'libnativeloader.so'
-                include 'libsigchain.so'
-                include 'libunwind.so'
-                include 'libziparchive.so'
-            }
-            copy {
-                from file("${androidCheckoutDir}/out/host/linux-x86/nativetest")
-                into file("${artTestBuildDir}/lib")
-                include 'lib*.so'
-            }
-            copy {
-                from file("${androidCheckoutDir}/out/host/linux-x86/lib")
-                into file("${artTestBuildDir}/lib")
-                include 'libart.so'
-                include 'libbacktrace.so'
-                include 'libbase.so'
-                include 'libc++.so'
-                include 'libcutils.so'
-                include 'liblz4.so'
-                include 'liblzma.so'
-                include 'libnativebridge.so'
-                include 'libnativeloader.so'
-                include 'libsigchain.so'
-                include 'libunwind.so'
-                include 'libziparchive.so'
-            }
-        }
-    }
-}
-
-def buildArtTest(androidCheckoutDir, artTestBuildDir, dir) {
-    def artTestDir = file("${androidCheckoutDir}/art/test")
-    def artRunTestScript = file("${artTestDir}/run-test")
-    def dxExecutable = new File("tools/linux/dx/bin/dx");
-    def dexMergerExecutable = Utils.dexMergerExecutable()
-
-    def name = dir.getName()
-    def buildTask = "build_art_test_dx_${name}"
-    def sanitizeTask = "sanitize_art_test_dx_${name}"
-    def copyCheckTask = "copy_check_art_test_dx_${name}"
-    def smaliToDexTask = "smali_to_dex_dx_${name}"
-
-    def buildInputs = fileTree(dir: dir, include: '**/*')
-    def testDir = file("${artTestBuildDir}/dx/${name}")
-    def outputJar = testDir.toPath().resolve("${name}.jar").toFile()
-    testDir.mkdirs()
-    task "$buildTask"(type: Exec) {
-        outputs.upToDateWhen { false }
-        inputs.file buildInputs
-        executable "${artRunTestScript}"
-        args "--host"
-        args "--build-only"
-        args "--build-with-javac-dx"
-        args "--output-path", "${testDir}"
-        args "${name}"
-        environment DX: "${dxExecutable.absolutePath}"
-        environment DXMERGER: "${dexMergerExecutable.absolutePath}"
-        environment ANDROID_BUILD_TOP: "${androidCheckoutDir}"
-        outputs.file outputJar
-    }
-    task "${sanitizeTask}"(type: Exec, dependsOn: buildTask) {
-        outputs.upToDateWhen { false }
-        executable "/bin/bash"
-        args "-c"
-        args "rm -rf ${testDir}/smali_*.dex ${testDir}/*-ex.dex ${testDir}/*-ex.jar" +
-                " ${testDir}/classes-ex ${testDir}/check"
-    }
-
-    task "${smaliToDexTask}"(type: Exec) {
-        // Directory that contains smali files is either smali, or smali/art
-        def smali_dir = file("${dir}/smali/art")
-        if (smali_dir.exists()) {
-            workingDir "${testDir}/smali/art"
-        } else  {
-            workingDir "${testDir}/smali"
-        }
-        executable "/bin/bash"
-        // This is the command line options for smali prior to 2.2.1, where smali got a new
-        // command line interface.
-        args "-c", "smali a *.smali"
-        // This is the command line options for smali 2.2.1 and later.
-        // args "-c", "smali -o out.dex *.smali"
-    }
-
-    task "${copyCheckTask}"(type: Copy, dependsOn: sanitizeTask) {
-        def smali_dir = file("${dir}/smali")
-        outputs.upToDateWhen { false }
-        if (smali_dir.exists()) {
-            dependsOn smaliToDexTask
-        }
-        from("${artTestDir}/${name}") {
-            include 'check'
-        }
-        into testDir
-    }
-
-    return copyCheckTask
-}
 
 task javadocD8(type: Javadoc) {
   title "D8 API"