Set failing status for new debug tests on older runtimes. The exact cause of these failures needs to be investigated further. Bug: 67671771 Bug: 67671565 Change-Id: I5fee2051c8f8fe362af94dbcd03045994fd0605e
diff --git a/src/test/java/com/android/tools/r8/debug/BlockReorderingTest.java b/src/test/java/com/android/tools/r8/debug/BlockReorderingTest.java index 7081921..0ef731f 100644 --- a/src/test/java/com/android/tools/r8/debug/BlockReorderingTest.java +++ b/src/test/java/com/android/tools/r8/debug/BlockReorderingTest.java
@@ -3,6 +3,9 @@ // 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 org.junit.Assume; import org.junit.BeforeClass; import org.junit.Test; @@ -23,6 +26,9 @@ @Test public void testConditionalReturn() throws Throwable { + Assume.assumeTrue( + "Older runtimes incorrectly step out of function: b/67671565", + ToolHelper.getDexVm().isNewerThan(DexVm.ART_6_0_1_TARGET)); final String method = "conditionalReturn"; runDebugTest(CLASS, breakpoint(CLASS, method), @@ -31,13 +37,16 @@ checkLine(FILE, 13), run(), checkLine(FILE, 8), stepOver(), - checkLine(FILE, 9), stepOver(), - checkLine(FILE, 13), + checkLine(FILE, 9), + checkLine(FILE, 13), // TODO(): Art 5.1.1 and 6.0.1 return to main here. run()); } @Test public void testInvertConditionalReturn() throws Throwable { + Assume.assumeTrue( + "Older runtimes incorrectly step out of function: b/67671565", + ToolHelper.getDexVm().isNewerThan(DexVm.ART_6_0_1_TARGET)); final String method = "invertConditionalReturn"; runDebugTest(CLASS, breakpoint(CLASS, method), @@ -53,6 +62,9 @@ @Test public void testFallthroughReturn() throws Throwable { + Assume.assumeTrue( + "Older runtimes incorrectly step out of function: b/67671565", + ToolHelper.getDexVm().isNewerThan(DexVm.ART_6_0_1_TARGET)); final String method = "fallthroughReturn"; runDebugTest(CLASS, breakpoint(CLASS, method),
diff --git a/src/test/java/com/android/tools/r8/debug/FinallyBlockTest.java b/src/test/java/com/android/tools/r8/debug/FinallyBlockTest.java index 83a0486..dfccf4a 100644 --- a/src/test/java/com/android/tools/r8/debug/FinallyBlockTest.java +++ b/src/test/java/com/android/tools/r8/debug/FinallyBlockTest.java
@@ -3,6 +3,9 @@ // 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 org.junit.Assume; import org.junit.Test; /** Test single stepping behaviour of synchronized blocks. */ @@ -13,6 +16,9 @@ @Test public void testEmptyBlock() throws Throwable { + Assume.assumeTrue( + "Older runtimes incorrectly step out of function: b/67671565", + ToolHelper.getDexVm().isNewerThan(DexVm.ART_6_0_1_TARGET)); final String method = "finallyBlock"; runDebugTest(CLASS, breakpoint(CLASS, method),
diff --git a/src/test/java/com/android/tools/r8/debug/SynchronizedBlockTest.java b/src/test/java/com/android/tools/r8/debug/SynchronizedBlockTest.java index fa6aa47..f6ec7b1 100644 --- a/src/test/java/com/android/tools/r8/debug/SynchronizedBlockTest.java +++ b/src/test/java/com/android/tools/r8/debug/SynchronizedBlockTest.java
@@ -3,6 +3,11 @@ // BSD-style license that can be found in the LICENSE file. package com.android.tools.r8.debug; +import static org.hamcrest.core.IsNot.not; + +import com.android.tools.r8.ToolHelper; +import com.android.tools.r8.ToolHelper.DexVm; +import org.junit.Assume; import org.junit.Test; /** @@ -71,6 +76,9 @@ @Test public void testThrowingBlock() throws Throwable { + Assume.assumeThat( + "Connection timeout on 6.0.1 runtime. b/67671771", + ToolHelper.getDexVm().getVersion(), not(DexVm.ART_6_0_1_TARGET.getVersion())); final String method = "throwingBlock"; runDebugTest(CLASS, breakpoint(CLASS, method),