Flutter Engine
The Flutter Engine
Classes | Public Member Functions | List of all members
org.skia.skqp.SkQPRunner Class Reference
Inheritance diagram for org.skia.skqp.SkQPRunner:

Classes

class  SkSLErrorTestExecutor
 
class  UnitTestExecutor
 

Public Member Functions

 SkQPRunner (Class testClass)
 
void filter (Filter filter) throws NoTestsRemainException
 
Description getDescription ()
 
void run (RunNotifier notifier)
 

Detailed Description

Definition at line 31 of file SkQPRunner.java.

Constructor & Destructor Documentation

◆ SkQPRunner()

org.skia.skqp.SkQPRunner.SkQPRunner ( Class  testClass)
inline

Definition at line 52 of file SkQPRunner.java.

52 {
53 mImpl = new SkQP();
54 Context context = InstrumentationRegistry.getTargetContext();
55 String now = (new SimpleDateFormat("yyyy-MM-dd'T'HHmmss")).format(new Date());
56 File reportPath = new File(context.getExternalFilesDir(null), "skqp_report_" + now);
57 reportPath.mkdirs();
58 mOutputDirectory = reportPath.getAbsolutePath();
59 Log.i(TAG, String.format("output written to \"%s\"", mOutputDirectory));
60
61 AssetManager assetManager = context.getResources().getAssets();
62 mImpl.nInit(assetManager, mOutputDirectory);
63
64 mUnitTestDesc = new Description[mImpl.mUnitTests.length];
65 for (int index = 0; index < mUnitTestDesc.length; ++index) {
66 mUnitTestDesc[index] = Description.createTestDescription(
67 SkQPRunner.class, "UnitTest_" + mImpl.mUnitTests[index]);
68 }
69
70 mSkSLErrorTestDesc = new Description[mImpl.mSkSLErrorTestName.length];
71 for (int index = 0; index < mSkSLErrorTestDesc.length; ++index) {
72 mSkSLErrorTestDesc[index] = Description.createTestDescription(
73 SkQPRunner.class, "SkSLErrorTest_" + mImpl.mSkSLErrorTestName[index]);
74 }
75
76 this.applyFilter(null);
77 }
Definition: skqp.h:42
SkQPRunner(Class testClass)
Definition: SkQPRunner.java:52
String[] mUnitTests
Definition: SkQP.java:21
native void nInit(AssetManager assetManager, String dataDir)
String[] mSkSLErrorTestName
Definition: SkQP.java:25
uint32_t uint32_t * format
void Log(const char *format,...) SK_PRINTF_LIKE(1
Definition: TestRunner.cpp:137

Member Function Documentation

◆ filter()

void org.skia.skqp.SkQPRunner.filter ( Filter  filter) throws NoTestsRemainException
inline

Definition at line 96 of file SkQPRunner.java.

96 {
97 this.applyFilter(filter);
98 if (mSuiteDesc.isEmpty()) {
99 throw new NoTestsRemainException();
100 }
101 }
void filter(Filter filter)
Definition: SkQPRunner.java:96

◆ getDescription()

Description org.skia.skqp.SkQPRunner.getDescription ( )
inline

Definition at line 104 of file SkQPRunner.java.

104 {
105 return mSuiteDesc;
106 }

◆ run()

void org.skia.skqp.SkQPRunner.run ( RunNotifier  notifier)
inline

Definition at line 109 of file SkQPRunner.java.

109 {
110 int testNumber = 0;
111 testNumber = runTests(notifier, new SkSLErrorTestExecutor(), testNumber);
112 testNumber = runTests(notifier, new UnitTestExecutor(), testNumber);
113
114 mImpl.nMakeReport();
115 Log.i(TAG, String.format("output written to \"%s\"", mOutputDirectory));
116 }
native void nMakeReport()

The documentation for this class was generated from the following file: