Revert "Add compatibility test for r8lib with and without dependencies"
This reverts commit 3150fc287cd42c8cd74c46e4d766e9c774fadd7c.
Reason for revert: Failing on bot - missing dependency
Change-Id: I1a8c9fb8a63a793ff2488e7394c43126e6ae8501
diff --git a/src/test/java/com/android/tools/r8/ToolHelper.java b/src/test/java/com/android/tools/r8/ToolHelper.java
index c9fe628..1a17a62 100644
--- a/src/test/java/com/android/tools/r8/ToolHelper.java
+++ b/src/test/java/com/android/tools/r8/ToolHelper.java
@@ -118,9 +118,8 @@
public static final Path R8_JAR = Paths.get(LIBS_DIR, "r8.jar");
public static final Path R8_WITH_RELOCATED_DEPS_JAR =
Paths.get(LIBS_DIR, "r8_with_relocated_deps.jar");
- public static final Path R8LIB_JAR = Paths.get(LIBS_DIR, "r8lib.jar");
- public static final Path R8LIB_EXCLUDE_DEPS_JAR = Paths.get(LIBS_DIR, "r8lib-exclude-deps.jar");
- public static final Path DEPS_NOT_RELOCATED = Paths.get(LIBS_DIR, "deps-not-relocated.jar");
+ public static final Path DEPS_NOT_RELOCATED =
+ Paths.get(LIBS_DIR, "deps_not_relocated.jar");
public enum DexVm {
ART_4_0_4_TARGET(Version.V4_0_4, Kind.TARGET),
@@ -783,10 +782,6 @@
return System.getProperty("java.specification.version").equals("9");
}
- public static boolean isTestingR8Lib() {
- return System.getProperty("java.class.path").contains("r8lib.jar");
- }
-
public static boolean artSupported() {
if (!isLinux() && !isMac() && !isWindows()) {
System.err.println("Testing on your platform is not fully supported. " +
diff --git a/src/test/java/com/android/tools/r8/cf/BootstrapCurrentEqualityTest.java b/src/test/java/com/android/tools/r8/cf/BootstrapCurrentEqualityTest.java
index 03eaa28..092d06e 100644
--- a/src/test/java/com/android/tools/r8/cf/BootstrapCurrentEqualityTest.java
+++ b/src/test/java/com/android/tools/r8/cf/BootstrapCurrentEqualityTest.java
@@ -9,7 +9,6 @@
import static org.junit.Assert.assertEquals;
import com.android.tools.r8.ArchiveClassFileProvider;
-import com.android.tools.r8.CompilationFailedException;
import com.android.tools.r8.CompilationMode;
import com.android.tools.r8.ExternalR8TestCompileResult;
import com.android.tools.r8.OutputMode;
@@ -97,34 +96,6 @@
}
@Test
- public void testR8LibCompatibility() throws IOException, CompilationFailedException {
- // Produce r81 = R8Lib(R8WithDeps) and r82 = R8LibNoDeps + Deps(R8WithDeps) and test that r81 is
- // equal to r82. This test should only run if we are testing r8lib and we expect both R8libs to
- // be built by gradle. If we are not testing with R8Lib, do not run this test.
- if (!ToolHelper.isTestingR8Lib()) {
- return;
- }
- Path runR81 =
- testForExternalR8(Backend.CF)
- .useProvidedR8(ToolHelper.R8LIB_JAR)
- .addProgramFiles(ToolHelper.R8_WITH_RELOCATED_DEPS_JAR)
- .addKeepRuleFiles(MAIN_KEEP)
- .setMode(CompilationMode.RELEASE)
- .compile()
- .outputJar();
- Path runR82 =
- testForExternalR8(Backend.CF)
- .useProvidedR8(ToolHelper.R8LIB_EXCLUDE_DEPS_JAR)
- .addR8ExternalDepsToClasspath()
- .addProgramFiles(ToolHelper.R8_WITH_RELOCATED_DEPS_JAR)
- .addKeepRuleFiles(MAIN_KEEP)
- .setMode(CompilationMode.RELEASE)
- .compile()
- .outputJar();
- assert filesAreEqual(runR81, runR82);
- }
-
- @Test
public void test() throws Exception {
Path helloJar = Paths.get(ToolHelper.EXAMPLES_BUILD_DIR, "hello" + JAR_EXTENSION);
ProcessResult runResult = ToolHelper.runJava(helloJar, "hello.Hello");
diff --git a/tools/test.py b/tools/test.py
index f4cee88..257e88c 100755
--- a/tools/test.py
+++ b/tools/test.py
@@ -123,6 +123,9 @@
if utils.is_bot():
gradle.RunGradle(['clean'])
+ # Build an R8 with dependencies for bootstrapping tests before adding test sources
+ gradle.RunGradle(['r8WithRelocatedDeps'])
+
gradle_args = ['--stacktrace']
# Set all necessary Gradle properties and options first.
if options.verbose:
@@ -179,15 +182,9 @@
exit(1)
if not options.no_r8lib:
gradle_args.append('-Pr8lib')
- # Force gradle to build a version of r8lib without dependencies for
- # BootstrapCurrentEqualityTest.
- gradle_args.append('R8LibNoDeps')
if options.r8lib_no_deps:
gradle_args.append('-Pr8lib_no_deps')
- # Build an R8 with dependencies for bootstrapping tests before adding test sources.
- gradle_args.append('r8WithRelocatedDeps')
-
# Add Gradle tasks
gradle_args.append('cleanTest')
gradle_args.append('test')