Commit f7891766 by Gert Wollny Committed by Commit Bot

Capture/Replay: write context serializations on failure

With this data available as JSON text files further analysis can be executed to drill down to what the actual difference is. Bug: angleproject:5715 Change-Id: I7012668ff9617f6232a6bbe1798a02d8c795321d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2821534 Commit-Queue: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: 's avatarCody Northrop <cnorthrop@google.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 71786e94
......@@ -141,6 +141,17 @@ class CaptureReplayTests
swap();
if (!isEqual)
{
std::ostringstream replayName;
replayName << testTraceInfo.testName << "_ContextReplayed" << frame << ".json";
std::ofstream debugReplay(replayName.str());
debugReplay << reinterpret_cast<const char *>(bytes) << "\n";
std::ostringstream captureName;
captureName << testTraceInfo.testName << "_ContextCaptured" << frame << ".json";
std::ofstream debugCapture(captureName.str());
debugCapture << mTraceLibrary->getSerializedContextState(frame) << "\n";
cleanupTest();
return -1;
}
......
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