Commit 0f7a2330 by Jonah Ryan-Davis Committed by Commit Bot

Modify test result output from dEQP tests for visualization script.

Test results will now be prepended with [TESTSTATS], and there are two new outputs added for unexpected passes and unexpected failures. Bug: angleproject:3369 Change-Id: Iec4dafe695531dcf56d496083036ccf1e286ead7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1571388 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 057b76e1
......@@ -31,6 +31,8 @@ namespace
bool gGlobalError = false;
bool gExpectError = false;
constexpr char kInfoTag[] = "*RESULT";
// Stored as globals to work around a Clang bug. http://crbug.com/951458
std::vector<std::string> gUnexpectedFailed;
std::vector<std::string> gUnexpectedPasses;
......@@ -145,6 +147,11 @@ const APIInfo *GetDefaultAPIInfo()
return defaultInfo;
}
std::string GetTestStatLine(const std::string &key, const std::string &value)
{
return std::string(kInfoTag) + ": " + key + ": " + value + "\n";
}
// During the CaseList initialization we cannot use the GTEST FAIL macro to quit the program because
// the initialization is called outside of tests the first time.
void Die()
......@@ -414,16 +421,18 @@ class dEQPTest : public testing::TestWithParam<size_t>
sTestCount - (sPassedTestCount + sFailedTestCount + sNotSupportedTestCount +
sTestExceptionCount + sSkippedTestCount);
std::cout << "Total: " << sTestCount << " tests.\n";
std::cout << "Passed: " << sPassedTestCount << " tests.\n";
std::cout << "Failed: " << sFailedTestCount << " tests.\n";
std::cout << "Skipped: " << sSkippedTestCount << " tests.\n";
std::cout << "Not Supported: " << sNotSupportedTestCount << " tests.\n";
std::cout << "Exception: " << sTestExceptionCount << " tests.\n";
std::cout << "Crashed: " << crashedCount << " tests.\n";
std::cout << GetTestStatLine("Total", std::to_string(sTestCount));
std::cout << GetTestStatLine("Passed", std::to_string(sPassedTestCount));
std::cout << GetTestStatLine("Failed", std::to_string(sFailedTestCount));
std::cout << GetTestStatLine("Skipped", std::to_string(sSkippedTestCount));
std::cout << GetTestStatLine("Not Supported", std::to_string(sNotSupportedTestCount));
std::cout << GetTestStatLine("Exception", std::to_string(sTestExceptionCount));
std::cout << GetTestStatLine("Crashed", std::to_string(crashedCount));
if (!gUnexpectedPasses.empty())
{
std::cout << GetTestStatLine("Unexpected Passed",
std::to_string(gUnexpectedPasses.size()));
std::cout << "\nSome tests unexpectedly passed:\n";
for (const std::string &testName : gUnexpectedPasses)
{
......@@ -433,6 +442,8 @@ class dEQPTest : public testing::TestWithParam<size_t>
if (!gUnexpectedFailed.empty())
{
std::cout << GetTestStatLine("Unexpected Failed",
std::to_string(gUnexpectedFailed.size()));
std::cout << "\nSome tests unexpectedly failed:\n";
for (const std::string &testName : gUnexpectedFailed)
{
......
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