<option name="deqp-surface-type" value="window"/>
<option name="deqp-screen-rotation" value="unspecified"/>
<option name="runtime-hint" value="24m"/>
+ <option name="deqp-config-required" value="true"/>
</test>
<test class="com.drawelements.deqp.runner.DeqpTestRunner">
<option name="deqp-package" value="dEQP-GLES2"/>
<option name="deqp-surface-type" value="window"/>
<option name="deqp-screen-rotation" value="unspecified"/>
<option name="runtime-hint" value="40m"/>
+ <option name="deqp-config-required" value="true"/>
</test>
<test class="com.drawelements.deqp.runner.DeqpTestRunner">
<option name="deqp-package" value="dEQP-GLES3"/>
<option name="deqp-surface-type" value="window"/>
<option name="deqp-screen-rotation" value="unspecified"/>
<option name="runtime-hint" value="1h15m"/>
+ <option name="deqp-config-required" value="true"/>
</test>
<test class="com.drawelements.deqp.runner.DeqpTestRunner">
<option name="deqp-package" value="dEQP-GLES3"/>
<option name="deqp-surface-type" value="window"/>
<option name="deqp-screen-rotation" value="unspecified"/>
<option name="runtime-hint" value="7h30m"/>
+ <option name="deqp-config-required" value="true"/>
</test>
<test class="com.drawelements.deqp.runner.DeqpTestRunner">
<option name="deqp-package" value="dEQP-GLES31"/>
description="Surface type ('window', 'pbuffer', 'fbo'). Defaults to 'window'",
importance=Option.Importance.NEVER)
private String mSurfaceType = "window";
+ @Option(name="deqp-config-required",
+ description="Is current config required if API is supported? Defaults to false.",
+ importance=Option.Importance.NEVER)
+ private boolean mConfigRequired = false;
@Option(name = "include-filter",
description="Test include filter. '*' is zero or more letters. '.' has no special meaning.")
private List<String> mIncludeFilters = new ArrayList<>();
private final String mGlConfig;
private final String mRotation;
private final String mSurfaceType;
+ private final boolean mRequired;
- public BatchRunConfiguration(String glConfig, String rotation, String surfaceType) {
+ public BatchRunConfiguration(String glConfig, String rotation, String surfaceType, boolean required) {
mGlConfig = glConfig;
mRotation = rotation;
mSurfaceType = surfaceType;
+ mRequired = required;
}
/**
* Get string that uniquely identifies this config
*/
public String getId() {
- return String.format("{glformat=%s,rotation=%s,surfacetype=%s}",
- mGlConfig, mRotation, mSurfaceType);
+ return String.format("{glformat=%s,rotation=%s,surfacetype=%s,required=%b}",
+ mGlConfig, mRotation, mSurfaceType, mRequired);
}
/**
return mSurfaceType;
}
+ /**
+ * Is this configuration mandatory to support, if target API is supported?
+ */
+ public boolean isRequired() {
+ return mRequired;
+ }
+
@Override
public boolean equals(Object other) {
if (other == null) {
}
private static Map<TestIdentifier, Set<BatchRunConfiguration>> generateTestInstances(
- Reader testlist, String configName, String screenRotation, String surfaceType) throws FileNotFoundException {
+ Reader testlist, String configName, String screenRotation, String surfaceType, boolean required) throws FileNotFoundException {
// Note: This is specifically a LinkedHashMap to guarantee that tests are iterated
// in the insertion order.
final Map<TestIdentifier, Set<BatchRunConfiguration>> instances = new LinkedHashMap<>();
while ((testName = testlistReader.readLine()) != null) {
// Test name -> testId -> only one config -> done.
final Set<BatchRunConfiguration> testInstanceSet = new LinkedHashSet<>();
- BatchRunConfiguration config = new BatchRunConfiguration(configName, screenRotation, surfaceType);
+ BatchRunConfiguration config = new BatchRunConfiguration(configName, screenRotation, surfaceType, required);
testInstanceSet.add(config);
TestIdentifier test = pathToIdentifier(testName);
instances.put(test, testInstanceSet);
if (isSupportedRunConfiguration(batch.config)) {
executeTestRunBatch(batch);
} else {
- fakePassTestRunBatch(batch);
+ if (batch.config.isRequired()) {
+ fakeFailTestRunBatch(batch);
+ } else {
+ fakePassTestRunBatch(batch);
+ }
}
}
*/
private void fakePassTestRunBatch(TestBatch batch) {
for (TestIdentifier test : batch.tests) {
- CLog.d("Skipping test '%s' invocation in config '%s'", test.toString(),
+ CLog.d("Marking '%s' invocation in config '%s' as passed without running", test.toString(),
batch.config.getId());
mInstanceListerner.skipTest(test);
}
}
/**
+ * Fail given batch tests without running it
+ */
+ private void fakeFailTestRunBatch(TestBatch batch) {
+ for (TestIdentifier test : batch.tests) {
+ CLog.d("Marking '%s' invocation in config '%s' as failed without running", test.toString(),
+ batch.config.getId());
+ mInstanceListerner.abortTest(test, "Required config not supported");
+ }
+ }
+
+ /**
* Pass all remaining tests without running them
*/
private void fakePassTests(ITestInvocationListener listener) {
}
reader = new FileReader(testlist);
}
- mTestInstances = generateTestInstances(reader, mConfigName, mScreenRotation, mSurfaceType);
+ mTestInstances = generateTestInstances(reader, mConfigName, mScreenRotation, mSurfaceType, mConfigRequired);
mCaselistReader = null;
reader.close();
}
destination.mCaselistFile = source.mCaselistFile;
destination.mScreenRotation = source.mScreenRotation;
destination.mSurfaceType = source.mSurfaceType;
+ destination.mConfigRequired = source.mConfigRequired;
destination.mIncludeFilters = new ArrayList<>(source.mIncludeFilters);
destination.mExcludeFilters = new ArrayList<>(source.mExcludeFilters);
destination.mAbi = source.mAbi;
self.copyright = copyright
class Configuration:
- def __init__ (self, name, filters, glconfig = None, rotation = None, surfacetype = None, runtime = None):
- self.name = name
- self.glconfig = glconfig
- self.rotation = rotation
- self.surfacetype = surfacetype
- self.filters = filters
- self.expectedRuntime = runtime
+ def __init__ (self, name, filters, glconfig = None, rotation = None, surfacetype = None, required = False, runtime = None):
+ self.name = name
+ self.glconfig = glconfig
+ self.rotation = rotation
+ self.surfacetype = surfacetype
+ self.required = required
+ self.filters = filters
+ self.expectedRuntime = runtime
class Package:
def __init__ (self, module, configurations):
if config.expectedRuntime != None:
addOptionElement(testElement, "runtime-hint", config.expectedRuntime)
+ if config.required:
+ addOptionElement(testElement, "deqp-config-required", "true")
+
insertXMLHeaders(mustpass, configElement)
return configElement