Replace core-junit with legacy-test

m -j32 checkbuild cts droid
adb reboot bootloader
fastboot flashall -w
cts-tradefed run cts -m CtsLibcoreTestCases

Bug: 30188076
Test: As above
Change-Id: I2d49cb3c451cb265d026f9a700a61b3fc0d2ed82
diff --git a/core/config.mk b/core/config.mk
index 677d210..f9d6e7e 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -696,7 +696,7 @@
 
 # allow overriding default Java libraries on a per-target basis
 ifeq ($(TARGET_DEFAULT_JAVA_LIBRARIES),)
-  TARGET_DEFAULT_JAVA_LIBRARIES := core-oj core-libart core-junit ext framework okhttp
+  TARGET_DEFAULT_JAVA_LIBRARIES := core-oj core-libart legacy-test ext framework okhttp
 endif
 
 # Flags for DEX2OAT
diff --git a/core/pdk_config.mk b/core/pdk_config.mk
index c0aaacd..8c986d6 100644
--- a/core/pdk_config.mk
+++ b/core/pdk_config.mk
@@ -17,7 +17,7 @@
   target/common/obj/JAVA_LIBRARIES/conscrypt_intermediates \
   target/common/obj/JAVA_LIBRARIES/core-oj_intermediates \
   target/common/obj/JAVA_LIBRARIES/core-libart_intermediates \
-  target/common/obj/JAVA_LIBRARIES/core-junit_intermediates \
+  target/common/obj/JAVA_LIBRARIES/legacy-test_intermediates \
   target/common/obj/JAVA_LIBRARIES/ext_intermediates \
   target/common/obj/JAVA_LIBRARIES/framework_intermediates \
   target/common/obj/JAVA_LIBRARIES/ims-common_intermediates \
diff --git a/target/product/core_minimal.mk b/target/product/core_minimal.mk
index 04dc015..63c516a 100644
--- a/target/product/core_minimal.mk
+++ b/target/product/core_minimal.mk
@@ -95,7 +95,7 @@
     core-libart \
     conscrypt \
     okhttp \
-    core-junit \
+    legacy-test \
     bouncycastle \
     ext \
     framework \
diff --git a/target/product/core_tiny.mk b/target/product/core_tiny.mk
index ea70454..ef8794d 100644
--- a/target/product/core_tiny.mk
+++ b/target/product/core_tiny.mk
@@ -89,7 +89,7 @@
     core-libart \
     conscrypt \
     okhttp \
-    core-junit \
+    legacy-test \
     bouncycastle \
     ext \
     framework \
diff --git a/target/product/runtime_libart.mk b/target/product/runtime_libart.mk
index fb75bff..3dd505f 100644
--- a/target/product/runtime_libart.mk
+++ b/target/product/runtime_libart.mk
@@ -28,7 +28,7 @@
 
 # Additional mixins to the boot classpath.
 PRODUCT_PACKAGES += \
-    core-junit \
+    legacy-test \
 
 # Why are we pulling in ext, which is frameworks/base, depending on tagsoup and nist-sip?
 PRODUCT_PACKAGES += \