diff options
author | Tamas Kenez <tamaskenez@google.com> | 2017-10-24 07:46:48 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-10-24 07:46:48 +0000 |
commit | 014da0fd08327e64b5e69ac4e6e07455853489ad (patch) | |
tree | b05fdc0d4ce259d77f7f759c4c553c41137af01f | |
parent | 19964a052b6ba6cec56d6aaa4bd50a712d8c76aa (diff) | |
parent | 22526dc438212856c6dd239e5dd60a53bd8abbc1 (diff) | |
download | r8-014da0fd08327e64b5e69ac4e6e07455853489ad.tar.gz |
Merge "JDWP/MinificationTest: fix ClassLoader issue with Dalvik (4.4.4)"
-rw-r--r-- | src/test/java/com/android/tools/r8/debug/MinificationTest.java | 40 |
1 files changed, 27 insertions, 13 deletions
diff --git a/src/test/java/com/android/tools/r8/debug/MinificationTest.java b/src/test/java/com/android/tools/r8/debug/MinificationTest.java index a29562a78..6a297cde7 100644 --- a/src/test/java/com/android/tools/r8/debug/MinificationTest.java +++ b/src/test/java/com/android/tools/r8/debug/MinificationTest.java @@ -3,9 +3,14 @@ // BSD-style license that can be found in the LICENSE file. package com.android.tools.r8.debug; +import com.android.tools.r8.ToolHelper; +import com.android.tools.r8.ToolHelper.DexVm; +import com.android.tools.r8.debug.DebugTestBase.JUnit3Wrapper.Command; import com.google.common.collect.ImmutableList; +import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; +import java.util.List; import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; @@ -63,19 +68,28 @@ public class MinificationTest extends DebugTestBase { final String innerClassName = minifiedNames ? "a" : "Minified$Inner"; final String innerMethodName = minifiedNames ? "a" : "innerTest"; final String innerSignature = "()I"; - runDebugTestR8( - className, - breakpoint(className, methodName, signature), - run(), - checkMethod(className, methodName, signature), - checkLine(SOURCE_FILE, 14), - stepOver(), - checkMethod(className, methodName, signature), - checkLine(SOURCE_FILE, 15), - stepInto(), - checkMethod(innerClassName, innerMethodName, innerSignature), - checkLine(SOURCE_FILE, 8), - run()); + List<Command> commands = + new ArrayList<>( + Arrays.asList( + breakpoint(className, methodName, signature), + run(), + checkMethod(className, methodName, signature), + checkLine(SOURCE_FILE, 14), + stepOver(), + checkMethod(className, methodName, signature), + checkLine(SOURCE_FILE, 15), + stepInto())); + // Dalvik first enters ClassLoader, step over it. + // See also b/67225390. + if (ToolHelper.getDexVm() == DexVm.ART_4_4_4_HOST) { + commands.add(stepOver()); + } + commands.addAll( + Arrays.asList( + checkMethod(innerClassName, innerMethodName, innerSignature), + checkLine(SOURCE_FILE, 8), + run())); + runDebugTestR8(className, commands); } @Test |