diff options
author | Tobrun Van Nuland <tobrun.van.nuland@gmail.com> | 2017-09-21 07:26:24 +0200 |
---|---|---|
committer | tobrun <tobrun.van.nuland@gmail.com> | 2018-06-01 18:49:16 +0200 |
commit | 3f04f13d4c190abd128b9a65ae38545984869e55 (patch) | |
tree | 7e25cf413b3175244c9834a50bdeab41a8441c4f /platform/android/scripts/run-render-test.py | |
parent | a5a86615b55516427a78109943a2286f5e44a0d4 (diff) | |
download | qtlocation-mapboxgl-upstream/tvn-render-test.tar.gz |
[android] - Render tests with PixelMatchupstream/tvn-render-test
Diffstat (limited to 'platform/android/scripts/run-render-test.py')
-rw-r--r-- | platform/android/scripts/run-render-test.py | 24 |
1 files changed, 24 insertions, 0 deletions
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 |