mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-10-07 19:03:29 +00:00
List failed tests in autocompare.
This commit is contained in:
parent
e72a06503e
commit
c96ea1d226
@ -347,14 +347,37 @@ int main(int argc, const char* argv[])
|
||||
if (screenshotFilename != 0)
|
||||
headlessHost->SetComparisonScreenshot(screenshotFilename);
|
||||
|
||||
std::vector<std::string> failedTests;
|
||||
std::vector<std::string> passedTests;
|
||||
for (size_t i = 0; i < testFilenames.size(); ++i)
|
||||
{
|
||||
coreParameter.fileToStart = testFilenames[i];
|
||||
if (autoCompare)
|
||||
printf("%s:\n", coreParameter.fileToStart.c_str());
|
||||
bool passed = RunAutoTest(headlessHost, coreParameter, autoCompare, timeout);
|
||||
if (autoCompare && passed)
|
||||
printf(" %s - passed!\n", GetTestName(coreParameter).c_str());
|
||||
if (autoCompare)
|
||||
{
|
||||
std::string testName = GetTestName(coreParameter);
|
||||
if (passed)
|
||||
{
|
||||
passedTests.push_back(testName);
|
||||
printf(" %s - passed!\n", testName.c_str());
|
||||
}
|
||||
else
|
||||
failedTests.push_back(testName);
|
||||
}
|
||||
}
|
||||
|
||||
if (autoCompare)
|
||||
{
|
||||
printf("%d tests passed, %d tests failed.\n", (int)passedTests.size(), (int)failedTests.size());
|
||||
if (!failedTests.empty())
|
||||
{
|
||||
printf("Failed tests:\n");
|
||||
for (int i = 0; i < failedTests.size(); ++i) {
|
||||
printf(" %s", failedTests[i].c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
delete host;
|
||||
|
Loading…
Reference in New Issue
Block a user