Commit cbab2750 by Edward Lemur Committed by Commit Bot

DEPS.chromium: Sync dEQP to ANGLE (not Chromium) third_party.

Bug: 782846 Change-Id: I88af578dfd27fb69751138d9b263a148da9ecf23 Reviewed-on: https://chromium-review.googlesource.com/1081113Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarYuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent a0cfa873
......@@ -29,7 +29,7 @@ vars = {
}
deps = {
'src/third_party/deqp/src':
'src/third_party/angle/third_party/deqp/src':
Var('android_git') + '/platform/external/deqp@' + Var('deqp_revision'),
'src/third_party/angle/third_party/glslang/src':
......
......@@ -520,23 +520,26 @@ if (build_angle_gles1_conform_tests) {
# TODO(jmadill): Other platforms.
if (build_angle_deqp_tests) {
deqp_gypi = exec_script("//build/gypi_to_gn.py",
[
rebase_path("deqp.gypi"),
"--replace=<(angle_path)=.",
"--replace=<(deqp_path)=//third_party/deqp/src",
],
"scope",
[ "deqp.gypi" ])
deqp_gypi =
exec_script("//build/gypi_to_gn.py",
[
rebase_path("deqp.gypi"),
"--replace=<(angle_path)=.",
"--replace=<(deqp_path)=$angle_root/third_party/deqp/src",
],
"scope",
[ "deqp.gypi" ])
config("angle_deqp_support") {
include_dirs = rebase_path(deqp_gypi.deqp_include_dirs, ".", "../..")
if (is_win && !is_clang) {
include_dirs += [ "../deqp/src/framework/platform/win32" ]
include_dirs +=
[ "$angle_root/third_party/deqp/src/framework/platform/win32" ]
cflags = deqp_gypi.deqp_win_cflags
}
if (is_android) {
include_dirs += [ "../../../deqp/src/framework/platform/android" ]
include_dirs +=
[ "$angle_root/third_party/deqp/src/framework/platform/android" ]
}
defines = deqp_gypi.deqp_defines
defines += [ "_MBCS" ]
......@@ -746,8 +749,8 @@ if (build_angle_deqp_tests) {
data = [
"deqp_support/deqp_${api_name}_test_expectations.txt",
"../../../deqp/src/android/cts/master/${api_name}-master.txt",
"../../../deqp/src/data/",
"$angle_root/third_party/deqp/src/android/cts/master/${api_name}-master.txt",
"$angle_root/third_party/deqp/src/data/",
]
if (is_linux && !is_component_build) {
......
......@@ -34,12 +34,11 @@ std::string DrawElementsToGoogleTestName(const std::string &dEQPName)
return gTestName;
}
#if defined(ANGLE_PLATFORM_ANDROID)
const char *gCaseListRelativePath =
"/../../sdcard/chromium_tests_root/third_party/deqp/src/android/cts/master/";
#else
const char *gCaseListRelativePath = "/../../third_party/deqp/src/android/cts/master/";
#endif
const char *gCaseListSearchPaths[] = {
"/../../third_party/deqp/src/android/cts/master/",
"/../../third_party/angle/third_party/deqp/src/android/cts/master/",
"/../../sdcard/chromium_tests_root/third_party/angle/third_party/deqp/src/android/cts/master/",
};
const char *gTestExpectationsSearchPaths[] = {
"/../../src/tests/deqp_support/", "/../../third_party/angle/src/tests/deqp_support/",
......@@ -119,12 +118,16 @@ void Die()
exit(EXIT_FAILURE);
}
Optional<std::string> FindTestExpectationsPath(const std::string &exeDir, size_t testModuleIndex)
Optional<std::string> FindFileFromPaths(const char *paths[],
size_t numPaths,
const std::string &exeDir,
const std::string &searchFile)
{
for (const char *testPath : gTestExpectationsSearchPaths)
for (size_t pathIndex = 0; pathIndex < numPaths; ++pathIndex)
{
const char *testPath = paths[pathIndex];
std::stringstream testExpectationsPathStr;
testExpectationsPathStr << exeDir << testPath << gTestExpectationsFiles[testModuleIndex];
testExpectationsPathStr << exeDir << testPath << searchFile;
std::string path = testExpectationsPathStr.str();
std::ifstream inFile(path.c_str());
......@@ -138,6 +141,18 @@ Optional<std::string> FindTestExpectationsPath(const std::string &exeDir, size_t
return Optional<std::string>::Invalid();
}
Optional<std::string> FindCaseListPath(const std::string &exeDir, size_t testModuleIndex)
{
return FindFileFromPaths(gCaseListSearchPaths, ArraySize(gCaseListSearchPaths), exeDir,
gCaseListFiles[testModuleIndex]);
}
Optional<std::string> FindTestExpectationsPath(const std::string &exeDir, size_t testModuleIndex)
{
return FindFileFromPaths(gTestExpectationsSearchPaths, ArraySize(gTestExpectationsSearchPaths),
exeDir, gTestExpectationsFiles[testModuleIndex]);
}
class dEQPCaseList
{
public:
......@@ -194,9 +209,12 @@ void dEQPCaseList::initialize()
std::string exeDir = angle::GetExecutableDirectory();
std::stringstream caseListPathStr;
caseListPathStr << exeDir << gCaseListRelativePath << gCaseListFiles[mTestModuleIndex];
std::string caseListPath = caseListPathStr.str();
Optional<std::string> caseListPath = FindCaseListPath(exeDir, mTestModuleIndex);
if (!caseListPath.valid())
{
std::cerr << "Failed to find case list file." << std::endl;
Die();
}
Optional<std::string> testExpectationsPath = FindTestExpectationsPath(exeDir, mTestModuleIndex);
if (!testExpectationsPath.valid())
......@@ -233,7 +251,7 @@ void dEQPCaseList::initialize()
mTestConfig.set_api(GetDefaultAPIInfo()->second);
}
std::ifstream caseListStream(caseListPath);
std::ifstream caseListStream(caseListPath.value());
if (caseListStream.fail())
{
std::cerr << "Failed to load the case list." << std::endl;
......
......@@ -45,14 +45,13 @@ tcu::TestPackageRoot *g_root = nullptr;
tcu::RandomOrderExecutor *g_executor = nullptr;
const char *g_dEQPDataSearchDirs[] = {
"data",
"third_party/deqp/data",
"../../../third_party/deqp/src/data",
"../../sdcard/chromium_tests_root/third_party/angle/third_party/deqp/src/data",
"../../third_party/angle/third_party/deqp/src/data",
"../../third_party/deqp/src/data",
"../third_party/deqp/src/data",
"deqp_support/data",
"data",
"third_party/deqp/src/data",
"../../third_party/deqp/src/data",
"../../../third_party/deqp/src/data",
"../../sdcard/chromium_tests_root/third_party/deqp/src/data",
};
// TODO(jmadill): upstream to dEQP?
......
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