diff options
author | Tobrun Van Nuland <tobrun.van.nuland@gmail.com> | 2017-09-21 07:26:24 +0200 |
---|---|---|
committer | Tobrun <tobrun@mapbox.com> | 2018-06-01 20:05:56 +0200 |
commit | be66de6fcda643872311b21ba8fd5abc8302fc3e (patch) | |
tree | 4708e4aa4a57f6ba0bfb77fa9cd03832d7006d0e /platform/android/scripts | |
parent | a721b74b87e51d17c5712fe947f56515c77defba (diff) | |
download | qtlocation-mapboxgl-be66de6fcda643872311b21ba8fd5abc8302fc3e.tar.gz |
[android] - Render tests with PixelMatch
Diffstat (limited to 'platform/android/scripts')
-rw-r--r-- | platform/android/scripts/exclude-activity-gen.json | 3 | ||||
-rw-r--r-- | platform/android/scripts/run-render-test.py | 24 |
2 files changed, 26 insertions, 1 deletions
diff --git a/platform/android/scripts/exclude-activity-gen.json b/platform/android/scripts/exclude-activity-gen.json index d7d9c16550..36d8d36e68 100644 --- a/platform/android/scripts/exclude-activity-gen.json +++ b/platform/android/scripts/exclude-activity-gen.json @@ -34,5 +34,6 @@ "ZoomFunctionSymbolLayerActivity", "SymbolGeneratorActivity", "TextureViewTransparentBackgroundActivity", - "SimpleMapActivity" + "SimpleMapActivity", + "RenderTestActivity" ] diff --git a/platform/android/scripts/run-render-test.py b/platform/android/scripts/run-render-test.py new file mode 100644 index 0000000000..83376256a4 --- /dev/null +++ b/platform/android/scripts/run-render-test.py @@ -0,0 +1,24 @@ +#!/usr/bin/python + +import os +from shutil import copyfile + +catPath = os.getcwd() + "/platform/android/build/render-test/render/" +for cat in os.listdir(catPath): + testPath = catPath + cat + "/" + for test in os.listdir(testPath): + inputPath = os.getcwd() + "/mapbox-gl-js/test/integration/render-tests/" + cat + "/" + test + outputPath = testPath + test + + expected = outputPath + "/expected.png" + actual = outputPath + "/actual.png" + output = outputPath + "/output.png" + + copyfile(inputPath + "/expected.png", expected) + copyfile(inputPath + "/style.json", outputPath + "/style.json") + pixelmatch = "node_modules/pixelmatch/bin/pixelmatch " + actual + " " + expected + " " + output + " 0.1" + + print + print "Pixel match "+ cat + " " + test + os.system(pixelmatch) +print |