Metal render tests pixel differences (#1896)

This commit is contained in:
Alex Cristici
2023-11-29 18:32:34 +02:00
committed by GitHub
parent fa9712cd8f
commit f16aae6c66
19 changed files with 50 additions and 1 deletions

View File

@@ -10,11 +10,16 @@ filegroup(
"expectations/platform-ios/**", # iOS only
],
allow_empty = False,
) + [
) + select({
"//:metal_renderer": glob(["expectations/platform-ios-metal/**"]), # iOS Metal only
"//conditions:default": [],
}) + [
"cache-metrics.db",
"cache-style.db",
"ios-render-test-runner-metrics.json", # iOS only
"ios-render-test-runner-style.json", # iOS only
"ios-metal-render-test-runner-metrics.json", # iOS Metal only
"ios-metal-render-test-runner-style.json", # iOS Metal only
"linux-gcc8-release-metrics.json",
"linux-gcc8-release-style.json",
],

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 375 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@@ -0,0 +1,14 @@
{
"base_test_path": "tests",
"cache_path": "cache-metrics.db",
"expectation_paths": [
"expectations/platform-ios",
"expectations/platform-ios-metal"
],
"ignore_paths": [
"ignores/platform-all.json",
"ignores/platform-macos.json",
"ignores/platform-ios.json"
],
"metric_path": "ios-render-test-runner"
}

View File

@@ -0,0 +1,18 @@
{
"base_test_path": "integration",
"cache_path": "cache-style.db",
"expectation_paths": [
"expectations/platform-ios",
"expectations/platform-ios-metal"
],
"ignore_paths": [
"ignores/platform-all.json",
"ignores/platform-macos.json",
"ignores/platform-ios.json"
],
"metric_path": "ios-render-test-runner",
"probes": [
"probeGFX",
"probeNetwork"
]
}

View File

@@ -64,8 +64,13 @@
if (path) {
std::string basePath = std::string([path UTF8String]);
self.testStatus = self.runner->startTest(basePath) ? YES : NO;
#if MLN_RENDER_BACKEND_METAL
self.styleResultPath = [path stringByAppendingPathComponent:@"/ios-metal-render-test-runner-style.html"];
self.metricResultPath = [path stringByAppendingPathComponent:@"/ios-metal-render-test-runner-metrics.html"];
#else
self.styleResultPath = [path stringByAppendingPathComponent:@"/ios-render-test-runner-style.html"];
self.metricResultPath = [path stringByAppendingPathComponent:@"/ios-render-test-runner-metrics.html"];
#endif
BOOL fileFound = [fileManager fileExistsAtPath: self.styleResultPath];
if (fileFound == NO) {

View File

@@ -32,8 +32,13 @@ bool TestRunner::startTest(const std::string& manifestBasePath) {
bool status = false;
try {
#if MLN_RENDER_BACKEND_METAL
status = runTestWithManifest(manifestBasePath + "/ios-metal-render-test-runner-style.json");
status = runTestWithManifest(manifestBasePath + "/ios-metal-render-test-runner-metrics.json") && status;
#else
status = runTestWithManifest(manifestBasePath + "/ios-render-test-runner-style.json");
status = runTestWithManifest(manifestBasePath + "/ios-render-test-runner-metrics.json") && status;
#endif
} catch (...) {
mbgl::Log::Info(mbgl::Event::General, "Failed with exception");
}

View File

@@ -20,5 +20,7 @@ cp -r metrics/tests $BASE_DIR/test-data/
cp -r metrics/ios-render-test-runner $BASE_DIR/test-data/
cp -r metrics/ios-render-test-runner-style.json $BASE_DIR/test-data/
cp -r metrics/ios-render-test-runner-metrics.json $BASE_DIR/test-data/
cp -r metrics/ios-metal-render-test-runner-style.json $BASE_DIR/test-data/
cp -r metrics/ios-metal-render-test-runner-metrics.json $BASE_DIR/test-data/
cp -r metrics/cache-metrics.db $BASE_DIR/test-data/
cp -r metrics/cache-style.db $BASE_DIR/test-data/