commit | 70782b757f6d6b8f39ec9dee2db1f76a5534ec00 | [log] [tgz] |
---|---|---|
author | John Stiles <johnstiles@google.com> | Fri Mar 18 14:24:34 2022 +0000 |
committer | Derek Sollenberger <djsollen@google.com> | Tue Mar 22 17:56:43 2022 +0000 |
tree | f85ae275a6e5150aef287327c4f2554b2440bebf | |
parent | 50517e07bea76af2a0a3009638ae0400afdb8227 [diff] |
Refactor SkQPTestRunner to support running SkSL error tests. Previously, when we wanted to run multiple test types, we cloned the outer testing loop and had a bunch of duplicated logic for translating test results into TestRunner success/failure. This worked, but maintaining duplicate code can be a chore (see http://cs/h/skia/skia/+/c5d130aac064cd10a04a9b8d1b9e64f9df1e91b5:platform_tools/android/apps/skqp/src/main/java/org/skia/skqp/SkQPRunner.java?l=102 ) Instead of going back to that approach, I've factored out the logic for individual tests into a bare-bones "TestExecutor" interface. The outer work loop takes a TestExecutor and iterates over every test in it. Unit tests and SkSL error tests can each implement this interface as needed. For this CL, actual SkSL error test handling is not yet implemented, so the SkSL tests will all be listed as passing (in 0-1 milliseconds). In a followup CL, SkSLErrorTestExecutor#run will be implemented to match the behavior of the C++ SkSL error tests. Bug: skia:13042 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/522101 Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com> Change-Id: I4c596133bd3aec9edbe26ab215a1944871ca46eb Reviewed-on: https://skia-review.googlesource.com/c/skia/+/523182 Reviewed-by: John Stiles <johnstiles@google.com>