Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions impeller/golden_tests/golden_playground_test_mac.cc
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,19 @@ std::string GetGoldenFilename() {

bool SaveScreenshot(std::unique_ptr<testing::Screenshot> screenshot) {
if (!screenshot || !screenshot->GetBytes()) {
FML_LOG(ERROR) << "Failed to collect screenshot for test " << GetTestName();
return false;
}
std::string test_name = GetTestName();
std::string filename = GetGoldenFilename();
testing::GoldenDigest::Instance()->AddImage(
test_name, filename, screenshot->GetWidth(), screenshot->GetHeight());
return screenshot->WriteToPNG(
testing::WorkingDirectory::Instance()->GetFilenamePath(filename));
if (!screenshot->WriteToPNG(
testing::WorkingDirectory::Instance()->GetFilenamePath(filename))) {
FML_LOG(ERROR) << "Failed to write screenshot to " << filename;
return false;
}
return true;
}

bool ShouldTestHaveVulkanValidations() {
Expand Down