Commit 6ddb7768 by Jamie Madill Committed by Commit Bot

Remove angle:: prefix in angle_deqp_gtest.

Refactor and cleanup only. Bug: angleproject:3353 Change-Id: I2a01ddf71ba44b8f1a1fc2c4ccbac9edc7c80174 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1613893Reviewed-by: 's avatarCourtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: 's avatarYuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent b4ca09ac
...@@ -37,7 +37,7 @@ constexpr char kInfoTag[] = "*RESULT"; ...@@ -37,7 +37,7 @@ constexpr char kInfoTag[] = "*RESULT";
std::vector<std::string> gUnexpectedFailed; std::vector<std::string> gUnexpectedFailed;
std::vector<std::string> gUnexpectedPasses; std::vector<std::string> gUnexpectedPasses;
void HandlePlatformError(angle::PlatformMethods *platform, const char *errorMessage) void HandlePlatformError(PlatformMethods *platform, const char *errorMessage)
{ {
if (!gExpectError) if (!gExpectError)
{ {
...@@ -90,15 +90,12 @@ const char *gTestExpectationsFiles[] = { ...@@ -90,15 +90,12 @@ const char *gTestExpectationsFiles[] = {
"deqp_egl_test_expectations.txt", "deqp_egl_test_expectations.txt",
}; };
using APIInfo = std::pair<const char *, angle::GPUTestConfig::API>; using APIInfo = std::pair<const char *, GPUTestConfig::API>;
const APIInfo gEGLDisplayAPIs[] = { const APIInfo gEGLDisplayAPIs[] = {
{"angle-d3d9", angle::GPUTestConfig::kAPID3D9}, {"angle-d3d9", GPUTestConfig::kAPID3D9}, {"angle-d3d11", GPUTestConfig::kAPID3D11},
{"angle-d3d11", angle::GPUTestConfig::kAPID3D11}, {"angle-gl", GPUTestConfig::kAPIGLDesktop}, {"angle-gles", GPUTestConfig::kAPIGLES},
{"angle-gl", angle::GPUTestConfig::kAPIGLDesktop}, {"angle-null", GPUTestConfig::kAPIUnknown}, {"angle-vulkan", GPUTestConfig::kAPIVulkan},
{"angle-gles", angle::GPUTestConfig::kAPIGLES},
{"angle-null", angle::GPUTestConfig::kAPIUnknown},
{"angle-vulkan", angle::GPUTestConfig::kAPIVulkan},
}; };
const char *gdEQPEGLString = "--deqp-egl-display-type="; const char *gdEQPEGLString = "--deqp-egl-display-type=";
...@@ -227,7 +224,7 @@ class dEQPCaseList ...@@ -227,7 +224,7 @@ class dEQPCaseList
private: private:
std::vector<CaseInfo> mCaseInfoList; std::vector<CaseInfo> mCaseInfoList;
angle::GPUTestExpectationsParser mTestExpectationsParser; GPUTestExpectationsParser mTestExpectationsParser;
size_t mTestModuleIndex; size_t mTestModuleIndex;
bool mInitialized = false; bool mInitialized = false;
}; };
...@@ -243,7 +240,7 @@ void dEQPCaseList::initialize() ...@@ -243,7 +240,7 @@ void dEQPCaseList::initialize()
mInitialized = true; mInitialized = true;
std::string exeDir = angle::GetExecutableDirectory(); std::string exeDir = GetExecutableDirectory();
Optional<std::string> caseListPath = FindCaseListPath(exeDir, mTestModuleIndex); Optional<std::string> caseListPath = FindCaseListPath(exeDir, mTestModuleIndex);
if (!caseListPath.valid()) if (!caseListPath.valid())
...@@ -259,14 +256,14 @@ void dEQPCaseList::initialize() ...@@ -259,14 +256,14 @@ void dEQPCaseList::initialize()
Die(); Die();
} }
angle::GPUTestConfig::API api = GetDefaultAPIInfo()->second; GPUTestConfig::API api = GetDefaultAPIInfo()->second;
// Set the API from the command line, or using the default platform API. // Set the API from the command line, or using the default platform API.
if (gInitAPI) if (gInitAPI)
{ {
api = gInitAPI->second; api = gInitAPI->second;
} }
angle::GPUTestConfig testConfig = angle::GPUTestConfig(api); GPUTestConfig testConfig = GPUTestConfig(api);
if (!mTestExpectationsParser.loadTestExpectationsFromFile(testConfig, if (!mTestExpectationsParser.loadTestExpectationsFromFile(testConfig,
testExpectationsPath.value())) testExpectationsPath.value()))
...@@ -293,7 +290,7 @@ void dEQPCaseList::initialize() ...@@ -293,7 +290,7 @@ void dEQPCaseList::initialize()
std::string inString; std::string inString;
std::getline(caseListStream, inString); std::getline(caseListStream, inString);
std::string dEQPName = angle::TrimString(inString, angle::kWhitespaceASCII); std::string dEQPName = TrimString(inString, kWhitespaceASCII);
if (dEQPName.empty()) if (dEQPName.empty())
continue; continue;
std::string gTestName = DrawElementsToGoogleTestName(dEQPName); std::string gTestName = DrawElementsToGoogleTestName(dEQPName);
...@@ -359,14 +356,14 @@ class dEQPTest : public testing::TestWithParam<size_t> ...@@ -359,14 +356,14 @@ class dEQPTest : public testing::TestWithParam<size_t>
// crashed tests we track how many tests we "tried" to run. // crashed tests we track how many tests we "tried" to run.
sTestCount++; sTestCount++;
if (caseInfo.mExpectation == angle::GPUTestExpectationsParser::kGpuTestSkip) if (caseInfo.mExpectation == GPUTestExpectationsParser::kGpuTestSkip)
{ {
sSkippedTestCount++; sSkippedTestCount++;
std::cout << "Test skipped.\n"; std::cout << "Test skipped.\n";
return; return;
} }
gExpectError = (caseInfo.mExpectation != angle::GPUTestExpectationsParser::kGpuTestPass); gExpectError = (caseInfo.mExpectation != GPUTestExpectationsParser::kGpuTestPass);
TestResult result = deqp_libtester_run(caseInfo.mDEQPName.c_str()); TestResult result = deqp_libtester_run(caseInfo.mDEQPName.c_str());
bool testSucceeded = countTestResultAndReturnSuccess(result); bool testSucceeded = countTestResultAndReturnSuccess(result);
...@@ -378,7 +375,7 @@ class dEQPTest : public testing::TestWithParam<size_t> ...@@ -378,7 +375,7 @@ class dEQPTest : public testing::TestWithParam<size_t>
gGlobalError = false; gGlobalError = false;
} }
if (caseInfo.mExpectation == angle::GPUTestExpectationsParser::kGpuTestPass) if (caseInfo.mExpectation == GPUTestExpectationsParser::kGpuTestPass)
{ {
EXPECT_TRUE(testSucceeded); EXPECT_TRUE(testSucceeded);
......
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