aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNolan Scobie <nscobie@google.com>2023-12-12 17:05:11 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-12-12 17:05:11 +0000
commitb8f2ef275c76271976633a57050df3eb7ab5467a (patch)
treebdef9842155548e4dc2b2200e9c4637cdd891db2
parent036e2ed40f010f61feed48fd72b00ca58635e0a9 (diff)
parent29e8f2bc0db60f2f361cb2401da2089d2eb3a5c7 (diff)
downloadskia-b8f2ef275c76271976633a57050df3eb7ab5467a.tar.gz
Merge "Allow any exception to pass SkQP's SkSL error tests" into android14-tests-dev am: 0d93472154 am: 53f5a424f7 am: 29e8f2bc0d
Original change: https://android-review.googlesource.com/c/platform/external/skia/+/2869019 Change-Id: I04731cf4be59af1196df43da997253d83fc9c66b Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--platform_tools/android/apps/skqp/src/main/java/org/skia/skqp/SkQPRunner.java31
1 files changed, 1 insertions, 30 deletions
diff --git a/platform_tools/android/apps/skqp/src/main/java/org/skia/skqp/SkQPRunner.java b/platform_tools/android/apps/skqp/src/main/java/org/skia/skqp/SkQPRunner.java
index c94d932686..8a322ba647 100644
--- a/platform_tools/android/apps/skqp/src/main/java/org/skia/skqp/SkQPRunner.java
+++ b/platform_tools/android/apps/skqp/src/main/java/org/skia/skqp/SkQPRunner.java
@@ -182,36 +182,7 @@ public class SkQPRunner extends Runner implements Filterable {
name(index)));
return false;
}
- catch (Exception ex) {
- // Verify that RuntimeShader actually emitted the expected error messages.
- // The list of expectations isn't necessarily exhaustive, though.
- String errorText = ex.getMessage();
- String[] block = shaderText.split(Pattern.quote("*%%*"));
- if (block.length >= 3) {
- // We only intend to support a single /%**%/ section.
- // Because we are splitting on *%%*, expectations should always be in block[1].
- String[] expectations = block[1].split("\n");
- for (String expectation : expectations) {
- if (expectation.length() == 0) {
- continue;
- }
- int errIndex = errorText.indexOf(expectation);
- // If this error wasn't reported, trigger an error.
- if (errIndex < 0) {
- String failMessage = String.format("Expected error '%s', got '%s'",
- expectation, ex.getMessage());
- SkQPRunner.Fail(desc(index), notifier, failMessage);
- Log.w(TAG, String.format("[FAIL] '%s': %s", name(index), failMessage));
- return false;
- }
- // We found the error that we expected to have. Remove that error from our
- // text, and everything preceding it as well. This ensures that we don't
- // match the same error twice, and that errors are reported in the order
- // we expect.
- errorText = errorText.substring(errIndex + expectation.length());
- }
- }
- }
+ catch (Exception ex) { } // Assume any exception is an expected SkSL error.
return true;
}
}