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 /Makefile | |
parent | a721b74b87e51d17c5712fe947f56515c77defba (diff) | |
download | qtlocation-mapboxgl-be66de6fcda643872311b21ba8fd5abc8302fc3e.tar.gz |
[android] - Render tests with PixelMatch
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -588,6 +588,22 @@ run-android-ui-test-$1-%: platform/android/gradle/configuration.gradle android-ndk-stack-$1: platform/android/gradle/configuration.gradle adb logcat | ndk-stack -sym platform/android/MapboxGLAndroidSDK/build/intermediates/cmake/debug/obj/$2/ +# Run render tests with pixelmatch +.PHONY: run-android-render-test-$1 +run-android-render-test-$1: $(BUILD_DEPS) platform/android/gradle/configuration.gradle + -adb uninstall com.mapbox.mapboxsdk.testapp 2> /dev/null + # delete old test results + rm -rf platform/android/build/render-test/mapbox/ + # copy test definitions to test app assets folder, clear old ones first + rm -rf platform/android/MapboxGLAndroidSDKTestApp/src/main/assets/integration + cp -r mapbox-gl-js/test/integration platform/android/MapboxGLAndroidSDKTestApp/src/main/assets + # run RenderTest.java to generate static map images + cd platform/android && $(MBGL_ANDROID_GRADLE) -Pmapbox.abis=$2 :MapboxGLAndroidSDKTestApp:connectedAndroidTest -Pandroid.testInstrumentationRunnerArguments.class="com.mapbox.mapboxsdk.testapp.render.RenderTest" + # pull generated images from the device + adb pull "`adb shell 'printenv EXTERNAL_STORAGE' | tr -d '\r'`/mapbox/render" platform/android/build/render-test + # copy expected result and run pixelmatch + python platform/android/scripts/run-render-test.py + endef # Explodes the arguments into individual variables |