Commit 1042250f by Shahbaz Youssefi Committed by Commit Bot

Allow wildcards freely in deqp expectations files

Bug: angleproject:3520 Change-Id: I1f34717e6efaf4a6371c345d892922e598e871bc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1676552Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarJonah Ryan-Davis <jonahr@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
parent c773ab98
...@@ -625,8 +625,7 @@ ...@@ -625,8 +625,7 @@
3189 VULKAN : dEQP-GLES3.functional.shaders.texture_functions.* = SKIP 3189 VULKAN : dEQP-GLES3.functional.shaders.texture_functions.* = SKIP
// Formats: // Formats:
2950 VULKAN : dEQP-GLES3.functional.fbo.completeness.renderable.renderbuffer.color0.rgba32f = FAIL 2950 VULKAN : dEQP-GLES3.functional.fbo.completeness.renderable.*.color0.rgba32f = FAIL
2950 VULKAN : dEQP-GLES3.functional.fbo.completeness.renderable.texture.color0.rgba32f = FAIL
2950 VULKAN : dEQP-GLES3.functional.fragment_out.* = SKIP 2950 VULKAN : dEQP-GLES3.functional.fragment_out.* = SKIP
// Depth/Stencil textures: // Depth/Stencil textures:
...@@ -661,19 +660,11 @@ ...@@ -661,19 +660,11 @@
3487 VULKAN : dEQP-GLES3.functional.shaders.derivate.dfdy.* = FAIL 3487 VULKAN : dEQP-GLES3.functional.shaders.derivate.dfdy.* = FAIL
// New vertex attribute formats: // New vertex attribute formats:
3193 VULKAN : dEQP-GLES3.functional.vertex_arrays.single_attribute.strides.int2_10_10_10.* = SKIP 3193 VULKAN : dEQP-GLES3.functional.vertex_arrays.single_attribute.*.int2_10_10_10.* = SKIP
3193 VULKAN : dEQP-GLES3.functional.vertex_arrays.single_attribute.normalize.unsigned_int.components* = SKIP 3193 VULKAN : dEQP-GLES3.functional.vertex_arrays.single_attribute.*.unsigned_int.components* = SKIP
3193 VULKAN : dEQP-GLES3.functional.vertex_arrays.single_attribute.normalize.int.components* = SKIP 3193 VULKAN : dEQP-GLES3.functional.vertex_arrays.single_attribute.*.int.components* = SKIP
3193 VULKAN : dEQP-GLES3.functional.vertex_arrays.single_attribute.normalize.half.components* = SKIP 3193 VULKAN : dEQP-GLES3.functional.vertex_arrays.single_attribute.*.half.components* = SKIP
3193 VULKAN : dEQP-GLES3.functional.vertex_arrays.single_attribute.normalize.usigned_int2_10_10_10.components* = SKIP 3193 VULKAN : dEQP-GLES3.functional.vertex_arrays.single_attribute.*.usigned_int2_10_10_10.components* = SKIP
3193 VULKAN : dEQP-GLES3.functional.vertex_arrays.single_attribute.normalize.int2_10_10_10.components* = SKIP
3193 VULKAN : dEQP-GLES3.functional.vertex_arrays.single_attribute.output_types.unsigned_int.components* = SKIP
3193 VULKAN : dEQP-GLES3.functional.vertex_arrays.single_attribute.output_types.int.components* = SKIP
3193 VULKAN : dEQP-GLES3.functional.vertex_arrays.single_attribute.output_types.half.components* = SKIP
3193 VULKAN : dEQP-GLES3.functional.vertex_arrays.single_attribute.output_types.usigned_int2_10_10_10.components* = SKIP
3193 VULKAN : dEQP-GLES3.functional.vertex_arrays.single_attribute.output_types.int2_10_10_10.components* = SKIP
3193 VULKAN : dEQP-GLES3.functional.vertex_arrays.single_attribute.first.int2_10_10_10* = SKIP
3193 VULKAN : dEQP-GLES3.functional.vertex_arrays.single_attribute.offset.int2_10_10_10* = SKIP
3193 VULKAN : dEQP-GLES3.functional.vertex_array_objects.all_attributes = SKIP 3193 VULKAN : dEQP-GLES3.functional.vertex_array_objects.all_attributes = SKIP
3221 VULKAN : dEQP-GLES3.functional.instanced.* = SKIP 3221 VULKAN : dEQP-GLES3.functional.instanced.* = SKIP
...@@ -725,30 +716,7 @@ ...@@ -725,30 +716,7 @@
2950 VULKAN : dEQP-GLES3.functional.fbo.invalidate.* = SKIP 2950 VULKAN : dEQP-GLES3.functional.fbo.invalidate.* = SKIP
// - Primitive restart with line loops: // - Primitive restart with line loops:
2672 VULKAN : dEQP-GLES3.functional.primitive_restart.basic.line_loop.unsigned_byte.draw_elements_instanced = SKIP 2672 VULKAN : dEQP-GLES3.functional.primitive_restart.*.line_loop.*instanced = SKIP
2672 VULKAN : dEQP-GLES3.functional.primitive_restart.basic.line_loop.unsigned_short.draw_elements_instanced = SKIP
2672 VULKAN : dEQP-GLES3.functional.primitive_restart.basic.line_loop.unsigned_int.draw_elements_instanced = SKIP
2672 VULKAN : dEQP-GLES3.functional.primitive_restart.duplicate_restarts.line_loop.unsigned_byte.draw_elements_instanced = SKIP
2672 VULKAN : dEQP-GLES3.functional.primitive_restart.duplicate_restarts.line_loop.unsigned_short.draw_elements_instanced = SKIP
2672 VULKAN : dEQP-GLES3.functional.primitive_restart.duplicate_restarts.line_loop.unsigned_int.draw_elements_instanced = SKIP
2672 VULKAN : dEQP-GLES3.functional.primitive_restart.end_restart.line_loop.unsigned_byte.draw_elements_instanced = SKIP
2672 VULKAN : dEQP-GLES3.functional.primitive_restart.end_restart.line_loop.unsigned_short.draw_elements_instanced = SKIP
2672 VULKAN : dEQP-GLES3.functional.primitive_restart.end_restart.line_loop.unsigned_int.draw_elements_instanced = SKIP
2672 VULKAN : dEQP-GLES3.functional.primitive_restart.end_restart_duplicate_restarts.line_loop.unsigned_byte.draw_elements_instanced = SKIP
2672 VULKAN : dEQP-GLES3.functional.primitive_restart.end_restart_duplicate_restarts.line_loop.unsigned_short.draw_elements_instanced = SKIP
2672 VULKAN : dEQP-GLES3.functional.primitive_restart.end_restart_duplicate_restarts.line_loop.unsigned_int.draw_elements_instanced = SKIP
2672 VULKAN : dEQP-GLES3.functional.primitive_restart.begin_restart.line_loop.unsigned_byte.draw_elements_instanced = SKIP
2672 VULKAN : dEQP-GLES3.functional.primitive_restart.begin_restart.line_loop.unsigned_short.draw_elements_instanced = SKIP
2672 VULKAN : dEQP-GLES3.functional.primitive_restart.begin_restart.line_loop.unsigned_int.draw_elements_instanced = SKIP
2672 VULKAN : dEQP-GLES3.functional.primitive_restart.begin_restart_duplicate_restarts.line_loop.unsigned_byte.draw_elements_instanced = SKIP
2672 VULKAN : dEQP-GLES3.functional.primitive_restart.begin_restart_duplicate_restarts.line_loop.unsigned_short.draw_elements_instanced = SKIP
2672 VULKAN : dEQP-GLES3.functional.primitive_restart.begin_restart_duplicate_restarts.line_loop.unsigned_int.draw_elements_instanced = SKIP
2672 VULKAN : dEQP-GLES3.functional.primitive_restart.begin_restart_end_restart.line_loop.unsigned_byte.draw_elements_instanced = SKIP
2672 VULKAN : dEQP-GLES3.functional.primitive_restart.begin_restart_end_restart.line_loop.unsigned_short.draw_elements_instanced = SKIP
2672 VULKAN : dEQP-GLES3.functional.primitive_restart.begin_restart_end_restart.line_loop.unsigned_int.draw_elements_instanced = SKIP
2672 VULKAN : dEQP-GLES3.functional.primitive_restart.begin_restart_end_restart_duplicate_restarts.line_loop.unsigned_byte.draw_elements_instanced = SKIP
2672 VULKAN : dEQP-GLES3.functional.primitive_restart.begin_restart_end_restart_duplicate_restarts.line_loop.unsigned_short.draw_elements_instanced = SKIP
2672 VULKAN : dEQP-GLES3.functional.primitive_restart.begin_restart_end_restart_duplicate_restarts.line_loop.unsigned_int.draw_elements_instanced = SKIP
// - ES3 Query Types: // - ES3 Query Types:
2950 VULKAN : dEQP-GLES3.functional.negative_api.fragment.begin_query = SKIP 2950 VULKAN : dEQP-GLES3.functional.negative_api.fragment.begin_query = SKIP
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include <stddef.h> #include <stddef.h>
#include <stdint.h> #include <stdint.h>
#include <string.h>
#include "common/angleutils.h" #include "common/angleutils.h"
#include "common/debug.h" #include "common/debug.h"
...@@ -207,19 +208,44 @@ inline Token ParseToken(const std::string &word) ...@@ -207,19 +208,44 @@ inline Token ParseToken(const std::string &word)
return kTokenWord; return kTokenWord;
} }
// reference name can have the last character as *. // reference name can have *.
inline bool NamesMatching(const std::string &ref, const std::string &testName) inline bool NamesMatching(const char *ref, const char *testName)
{ {
size_t len = ref.length(); // Find the first * in ref.
if (len == 0) const char *firstWildcard = strchr(ref, '*');
// If there are no wildcards, match the strings precisely.
if (firstWildcard == nullptr)
{
return strcmp(ref, testName) == 0;
}
// Otherwise, match up to the wildcard first.
size_t preWildcardLen = firstWildcard - ref;
if (strncmp(ref, testName, preWildcardLen) != 0)
{
return false; return false;
if (ref[len - 1] == '*') }
const char *postWildcardRef = ref + preWildcardLen + 1;
// As a small optimization, if the wildcard is the last character in ref, accept the match
// already.
if (postWildcardRef[0] == '\0')
{ {
if (testName.length() > len - 1 && ref.compare(0, len - 1, testName, 0, len - 1) == 0) return true;
}
// Try to match the wildcard with a number of characters.
for (size_t matchSize = 0; testName[matchSize] != '\0'; ++matchSize)
{
if (NamesMatching(postWildcardRef, testName + matchSize))
{
return true; return true;
return false; }
} }
return (ref == testName);
return false;
} }
} // anonymous namespace } // anonymous namespace
...@@ -278,7 +304,7 @@ int32_t GPUTestExpectationsParser::getTestExpectation(const std::string &testNam ...@@ -278,7 +304,7 @@ int32_t GPUTestExpectationsParser::getTestExpectation(const std::string &testNam
GPUTestExpectationEntry *foundEntry = nullptr; GPUTestExpectationEntry *foundEntry = nullptr;
for (size_t i = 0; i < mEntries.size(); ++i) for (size_t i = 0; i < mEntries.size(); ++i)
{ {
if (NamesMatching(mEntries[i].testName, testName)) if (NamesMatching(mEntries[i].testName.c_str(), testName.c_str()))
{ {
size_t expectationLen = mEntries[i].testName.length(); size_t expectationLen = mEntries[i].testName.length();
// The longest/most specific matching expectation overrides any others. // The longest/most specific matching expectation overrides any others.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment