From be66de6fcda643872311b21ba8fd5abc8302fc3e Mon Sep 17 00:00:00 2001 From: Tobrun Van Nuland Date: Thu, 21 Sep 2017 07:26:24 +0200 Subject: [android] - Render tests with PixelMatch --- Makefile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index c2daa617b4..8ba8084412 100644 --- a/Makefile +++ b/Makefile @@ -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 -- cgit v1.2.1