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