Commit 7a026133 by Jamie Madill Committed by Commit Bot

Fix Android data dir for KHR dEQP tests.

Also includes a fix for case list paths on developer machines. Also includes a test expectation update for GLES2. Bug: angleproject:3353 Change-Id: Idb01eb8d806067739253a6676a6d2d8ee1199929 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1616853 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarYuly Novikov <ynovikov@chromium.org>
parent 70958d15
...@@ -860,9 +860,9 @@ if (build_angle_deqp_tests && !is_fuchsia) { ...@@ -860,9 +860,9 @@ if (build_angle_deqp_tests && !is_fuchsia) {
shared_library_name = "angle_deqp_lib${_api}" shared_library_name = "angle_deqp_lib${_api}"
angle_shared_library(shared_library_name) { angle_shared_library(shared_library_name) {
forward_variables_from(invoker, forward_variables_from(invoker,
"*",
[ [
"mustpass_dir", "sources",
"deps",
"data", "data",
]) ])
...@@ -904,8 +904,10 @@ if (build_angle_deqp_tests && !is_fuchsia) { ...@@ -904,8 +904,10 @@ if (build_angle_deqp_tests && !is_fuchsia) {
"deqp_support/angle_deqp_gtest.cpp", "deqp_support/angle_deqp_gtest.cpp",
] ]
data = data = [
invoker.data + [ "deqp_support/deqp_${_api}_test_expectations.txt" ] "deqp_support/deqp_${_api}_test_expectations.txt",
"${invoker.mustpass_dir}/${invoker.mustpass_name}",
]
if (is_android) { if (is_android) {
use_native_activity = true use_native_activity = true
...@@ -913,17 +915,21 @@ if (build_angle_deqp_tests && !is_fuchsia) { ...@@ -913,17 +915,21 @@ if (build_angle_deqp_tests && !is_fuchsia) {
} }
} }
set_defaults("angle_deqp_core_gtest") { _android_mustpass = "$deqp_path/android/cts/master"
# Default the master lists to the Khronos version. The EGL tests must override this. _aosp_mustpass =
mustpass_dir = "external/openglcts/data/mustpass/gles/aosp_mustpass" "$deqp_path/external/openglcts/data/mustpass/gles/aosp_mustpass/master"
} _khronos_mustpass =
"$deqp_path/external/openglcts/data/mustpass/gles/khronos_mustpass/master"
template("angle_deqp_core_gtest") { template("angle_deqp_core_gtest") {
_api = target_name
angle_deqp_gtest(target_name) { angle_deqp_gtest(target_name) {
forward_variables_from(invoker, "*") forward_variables_from(invoker, "*")
defines += [ "ANGLE_DEQP_DATA_DIR=\"data\"" ] defines += [ "ANGLE_DEQP_DATA_DIR=\"data\"" ]
mustpass_name = "${_api}-master.txt"
data = [ data = [
"$deqp_path/$mustpass_dir/master/${target_name}-master.txt",
"$deqp_path/data/", "$deqp_path/data/",
] ]
} }
...@@ -932,22 +938,25 @@ if (build_angle_deqp_tests && !is_fuchsia) { ...@@ -932,22 +938,25 @@ if (build_angle_deqp_tests && !is_fuchsia) {
angle_deqp_core_gtest("gles2") { angle_deqp_core_gtest("gles2") {
defines = [ "ANGLE_DEQP_GLES2_TESTS" ] defines = [ "ANGLE_DEQP_GLES2_TESTS" ]
sources = deqp_gles2_sources sources = deqp_gles2_sources
mustpass_dir = _aosp_mustpass
} }
angle_deqp_core_gtest("gles3") { angle_deqp_core_gtest("gles3") {
defines = [ "ANGLE_DEQP_GLES3_TESTS" ] defines = [ "ANGLE_DEQP_GLES3_TESTS" ]
sources = deqp_gles3_sources sources = deqp_gles3_sources
mustpass_dir = _aosp_mustpass
} }
angle_deqp_core_gtest("gles31") { angle_deqp_core_gtest("gles31") {
defines = [ "ANGLE_DEQP_GLES31_TESTS" ] defines = [ "ANGLE_DEQP_GLES31_TESTS" ]
sources = deqp_gles31_sources sources = deqp_gles31_sources
mustpass_dir = _aosp_mustpass
} }
angle_deqp_core_gtest("egl") { angle_deqp_core_gtest("egl") {
defines = [ "ANGLE_DEQP_EGL_TESTS" ] defines = [ "ANGLE_DEQP_EGL_TESTS" ]
sources = deqp_egl_sources sources = deqp_egl_sources
mustpass_dir = "android/cts" mustpass_dir = _android_mustpass
} }
# The CTS also includes a set of "KHR" tests that are separate from the main body of dEQP tests. # The CTS also includes a set of "KHR" tests that are separate from the main body of dEQP tests.
...@@ -1001,16 +1010,18 @@ if (build_angle_deqp_tests && !is_fuchsia) { ...@@ -1001,16 +1010,18 @@ if (build_angle_deqp_tests && !is_fuchsia) {
} }
template("angle_deqp_khr_gtest") { template("angle_deqp_khr_gtest") {
_mp = invoker.mustpass_name
angle_deqp_gtest(target_name) { angle_deqp_gtest(target_name) {
forward_variables_from(invoker, "*", [ "mustpass_name" ]) forward_variables_from(invoker, "*")
deps = [ deps = [
":angle_deqp_khr_common", ":angle_deqp_khr_common",
":angle_deqp_khr_data", ":angle_deqp_khr_data",
] ]
defines += [ "ANGLE_DEQP_DATA_DIR=\"$data_dir\"" ]
defines += [ "ANGLE_DEQP_DATA_DIR=\"$data_dir/gl_cts\"" ]
mustpass_dir = _khronos_mustpass
data = [ data = [
"$deqp_path/external/openglcts/data/mustpass/gles/khronos_mustpass/master/$_mp",
"$root_out_dir/$data_dir/gl_cts/", "$root_out_dir/$data_dir/gl_cts/",
] ]
} }
......
...@@ -56,30 +56,12 @@ std::string DrawElementsToGoogleTestName(const std::string &dEQPName) ...@@ -56,30 +56,12 @@ std::string DrawElementsToGoogleTestName(const std::string &dEQPName)
return gTestName; return gTestName;
} }
// We look for a GLES Khronos master list first. We keep the Android CTS so we can locate a version
// of egl-master.txt that has the full list of tests.
#define ANDROID_DEQP_DIR "/../../sdcard/chromium_tests_root/third_party/angle/third_party/deqp/src"
#define ANGLE_DEQP_DIR "/../../third_party/deqp/src"
#define CHROME_DEQP_DIR "/../../third_party/angle/third_party/deqp/src"
#define OPENGL_CTS_DIR "/external/openglcts/data/mustpass/gles"
const char *gCaseListSearchPaths[] = { const char *gCaseListSearchPaths[] = {
ANDROID_DEQP_DIR "/android/cts/master/", "/../../sdcard/chromium_tests_root/third_party/angle/third_party/deqp/src",
ANDROID_DEQP_DIR OPENGL_CTS_DIR "/aosp_mustpass/master/", "/../../third_party/deqp/src",
ANDROID_DEQP_DIR OPENGL_CTS_DIR "/khronos_mustpass/master/", "/../../third_party/angle/third_party/deqp/src",
ANGLE_DEQP_DIR "/android/cts/master/",
ANGLE_DEQP_DIR OPENGL_CTS_DIR "/aosp_mustpass/master/",
ANGLE_DEQP_DIR OPENGL_CTS_DIR "/khronos_mustpass/master/",
CHROME_DEQP_DIR "/android/cts/master/",
CHROME_DEQP_DIR OPENGL_CTS_DIR "/aosp_mustpass/master/",
CHROME_DEQP_DIR OPENGL_CTS_DIR "/khronos_mustpass/master/",
}; };
#undef ANDROID_DEQP_DIR
#undef ANGLE_DEQP_DIR
#undef CHROME_DEQP_DIR
#undef OPENGL_CTS_DIR
const char *gTestExpectationsSearchPaths[] = { const char *gTestExpectationsSearchPaths[] = {
"/../../src/tests/deqp_support/", "/../../src/tests/deqp_support/",
"/../../third_party/angle/src/tests/deqp_support/", "/../../third_party/angle/src/tests/deqp_support/",
...@@ -87,8 +69,16 @@ const char *gTestExpectationsSearchPaths[] = { ...@@ -87,8 +69,16 @@ const char *gTestExpectationsSearchPaths[] = {
"/../../sdcard/chromium_tests_root/third_party/angle/src/tests/deqp_support/", "/../../sdcard/chromium_tests_root/third_party/angle/src/tests/deqp_support/",
}; };
const char *gCaseListFiles[] = {"gles2-master.txt", "gles3-master.txt", "gles31-master.txt", #define OPENGL_CTS_DIR(PATH) "/external/openglcts/data/mustpass/gles/" PATH
"egl-master.txt", "gles2-khr-master.txt", "gles3-khr-master.txt"};
const char *gCaseListFiles[] = {OPENGL_CTS_DIR("aosp_mustpass/master/gles2-master.txt"),
OPENGL_CTS_DIR("aosp_mustpass/master/gles3-master.txt"),
OPENGL_CTS_DIR("aosp_mustpass/master/gles31-master.txt"),
"/android/cts/master/egl-master.txt",
OPENGL_CTS_DIR("khronos_mustpass/master/gles2-khr-master.txt"),
OPENGL_CTS_DIR("khronos_mustpass/master/gles3-khr-master.txt")};
#undef OPENGL_CTS_DIR
const char *gTestExpectationsFiles[] = { const char *gTestExpectationsFiles[] = {
"deqp_gles2_test_expectations.txt", "deqp_gles3_test_expectations.txt", "deqp_gles2_test_expectations.txt", "deqp_gles3_test_expectations.txt",
...@@ -170,10 +160,10 @@ Optional<std::string> FindFileFromPaths(const char *paths[], ...@@ -170,10 +160,10 @@ Optional<std::string> FindFileFromPaths(const char *paths[],
for (size_t pathIndex = 0; pathIndex < numPaths; ++pathIndex) for (size_t pathIndex = 0; pathIndex < numPaths; ++pathIndex)
{ {
const char *testPath = paths[pathIndex]; const char *testPath = paths[pathIndex];
std::stringstream testExpectationsPathStr; std::stringstream pathStringStream;
testExpectationsPathStr << exeDir << testPath << searchFile; pathStringStream << exeDir << testPath << searchFile;
std::string path = testExpectationsPathStr.str(); std::string path = pathStringStream.str();
std::ifstream inFile(path.c_str()); std::ifstream inFile(path.c_str());
if (!inFile.fail()) if (!inFile.fail())
{ {
......
...@@ -35,22 +35,22 @@ tcu::TestContext *g_testCtx = nullptr; ...@@ -35,22 +35,22 @@ tcu::TestContext *g_testCtx = nullptr;
tcu::TestPackageRoot *g_root = nullptr; tcu::TestPackageRoot *g_root = nullptr;
tcu::RandomOrderExecutor *g_executor = nullptr; tcu::RandomOrderExecutor *g_executor = nullptr;
const char *gDataDirHaystack[] = { const char *kDataPaths[] = {
"../../../third_party/deqp/src", ".",
"../../sdcard/chromium_tests_root",
"../../sdcard/chromium_tests_root/third_party/angle/third_party/deqp/src", "../../sdcard/chromium_tests_root/third_party/angle/third_party/deqp/src",
"../../third_party/angle/third_party/deqp/src", "../../third_party/angle/third_party/deqp/src",
"../../third_party/deqp/src", "../../third_party/deqp/src",
"../third_party/deqp/src",
".",
"third_party/deqp/src", "third_party/deqp/src",
}; };
bool FindDataDir(const char *needle, std::string *dataDirOut) bool FindDataDir(std::string *dataDirOut)
{ {
for (const char *searchDir : gDataDirHaystack) for (const char *dataPath : kDataPaths)
{ {
std::stringstream dirStream; std::stringstream dirStream;
dirStream << angle::GetExecutableDirectory() << "/" << searchDir << "/" << needle; dirStream << angle::GetExecutableDirectory() << "/" << dataPath << "/"
<< ANGLE_DEQP_DATA_DIR;
std::string candidateDataDir = dirStream.str(); std::string candidateDataDir = dirStream.str();
if (angle::IsDirectory(candidateDataDir.c_str())) if (angle::IsDirectory(candidateDataDir.c_str()))
...@@ -94,7 +94,7 @@ ANGLE_LIBTESTER_EXPORT bool deqp_libtester_init_platform(int argc, ...@@ -94,7 +94,7 @@ ANGLE_LIBTESTER_EXPORT bool deqp_libtester_init_platform(int argc,
} }
std::string deqpDataDir; std::string deqpDataDir;
if (!FindDataDir(ANGLE_DEQP_DATA_DIR, &deqpDataDir)) if (!FindDataDir(&deqpDataDir))
{ {
std::cout << "Failed to find dEQP data directory." << std::endl; std::cout << "Failed to find dEQP data directory." << std::endl;
return false; return false;
......
...@@ -37,3 +37,6 @@ ...@@ -37,3 +37,6 @@
3451 D3D9 D3D11 OPENGL GLES : KHR-GLES2.core.internalformat.texture2d.rgba_half_float_rgba16f = FAIL 3451 D3D9 D3D11 OPENGL GLES : KHR-GLES2.core.internalformat.texture2d.rgba_half_float_rgba16f = FAIL
3451 D3D9 D3D11 OPENGL GLES : KHR-GLES2.core.internalformat.texture2d.rgb_half_float_rgb16f_linear = FAIL 3451 D3D9 D3D11 OPENGL GLES : KHR-GLES2.core.internalformat.texture2d.rgb_half_float_rgb16f_linear = FAIL
3451 D3D9 D3D11 OPENGL GLES : KHR-GLES2.core.internalformat.texture2d.rgba_half_float_rgba16f_linear = FAIL 3451 D3D9 D3D11 OPENGL GLES : KHR-GLES2.core.internalformat.texture2d.rgba_half_float_rgba16f_linear = FAIL
// Depth/stencil related failures.
3457 VULKAN : KHR-GLES2.core.internalformat.texture2d.depth_stencil_unsigned_int_24_8_depth_stencil = FAIL
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
3456 VULKAN : KHR-GLES3.core.internalformat.texture2d.rgba_unsigned_byte_rgb5_a1 = SKIP 3456 VULKAN : KHR-GLES3.core.internalformat.texture2d.rgba_unsigned_byte_rgb5_a1 = SKIP
3456 VULKAN : KHR-GLES3.core.internalformat.copy_tex_image.rgb5_a1 = SKIP 3456 VULKAN : KHR-GLES3.core.internalformat.copy_tex_image.rgb5_a1 = SKIP
// Depth/stencil related failures // Depth/stencil related failures.
3457 VULKAN : KHR-GLES3.core.internalformat.texture2d.depth_stencil_unsigned_int_24_8_depth24_stencil8 = FAIL 3457 VULKAN : KHR-GLES3.core.internalformat.texture2d.depth_stencil_unsigned_int_24_8_depth24_stencil8 = FAIL
3457 VULKAN : KHR-GLES3.packed_pixels.rectangle.depth* = SKIP 3457 VULKAN : KHR-GLES3.packed_pixels.rectangle.depth* = SKIP
3457 VULKAN : KHR-GLES3.packed_pixels.pbo_rectangle.depth* = SKIP 3457 VULKAN : KHR-GLES3.packed_pixels.pbo_rectangle.depth* = SKIP
......
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