MCPcopy Create free account
hub / github.com/GPUOpen-Tools/GPU-Reshape / ParseWaitForScreenshot

Method ParseWaitForScreenshot

Source/Test/Automation/Source/Parser.cpp:202–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

200}
201
202bool Parser::ParseWaitForScreenshot(const nlohmann::json &json, ComRef<ITestPass>& out) {
203 if (!json.contains("Path")) {
204 Log(registry, "Expected image path");
205 return false;
206 }
207
208 // Get threshold
209 int64_t threshold = json.value("Threshold", 4ll);
210
211 // Negate value / default if requested
212 if (json.value("Negated", false)) {
213 threshold = -threshold;
214 }
215
216 // Create pass
217 out = registry->New<WaitForScreenshotPass>(
218 ExpandPath(json["Path"].get<std::string>()).string(),
219 threshold
220 );
221 return true;
222}
223
224bool Parser::ParseWaitForPipelines(const nlohmann::json &json, ComRef<ITestPass> &out) {
225 out = registry->New<WaitForPipelinesPass>();

Callers

nothing calls this directly

Calls 2

ExpandPathFunction · 0.85
LogFunction · 0.50

Tested by

no test coverage detected