diff options
Diffstat (limited to 'tools/skqp/README.md')
-rw-r--r-- | tools/skqp/README.md | 102 |
1 files changed, 50 insertions, 52 deletions
diff --git a/tools/skqp/README.md b/tools/skqp/README.md index 7e56411fd4..cf745364db 100644 --- a/tools/skqp/README.md +++ b/tools/skqp/README.md @@ -2,80 +2,78 @@ SkQP ==== -**Motivation**: Test an Android device's GPU and OpenGLES & Vulkan drivers with -Skia and Skia's existing unit & rendering tests. +How to run the SkQP tests +------------------------- -How To Use SkQP on your Android device: +1. Install Chromium's depot\_tools -1. To build SkQP you need to install the - [Android NDK](https://developer.android.com/ndk/). + git clone 'https://chromium.googlesource.com/chromium/tools/depot_tools.git' + export PATH="${PWD}/depot_tools:${PATH}" -2. [Checkout depot\_tools and Skia](https://skia.org/user/download), - then go to Skia's source directory: +2. Install the [Android NDK](https://developer.android.com/ndk/downloads/). - export PATH="${DEPOT_TOOLS_PATH}:$PATH" - cd $SKIA_SOURCE_DIRECTORY + cd ~ + unzip ~/Downloads/android-ndk-*.zip + ANDROID_NDK=~/android-ndk-r16b # Or wherever you installed the Android NDK. -3. Configure and build Skia for your device's architecture: +3. Install the [Android SDK](https://developer.android.com/studio/#command-tools) - arch='arm64' # Also valid: 'arm', 'x68', 'x64' - android_ndk="${HOME}/android-ndk" # Or wherever you installed the NDK. - - tools/skqp/generate_gn_args.sh out/${arch}-rel "$android_ndk" $arch - tools/git-sync-deps - bin/gn gen out/${arch}-rel - ninja -C out/${arch}-rel skqp_lib - -4. Download meta.json from [https://goo.gl/jBw3Dd](https://goo.gl/jBw3Dd) . - This is the data used to build the validation model. + mkdir ~/android-sdk + ( cd ~/android-sdk; unzip ~/Downloads/sdk-tools-*.zip ) + yes | ~/android-sdk/tools/bin/sdkmanager --licenses + export ANDROID_HOME=~/android-sdk # Or wherever you installed the Android SDK. -5. Generate the validation model data: +4. Get the right version of Skia: - tools/skqp/make_model.sh ~/Downloads/meta.json + git clone https://skia.googlesource.com/skia.git + cd skia + git checkout origin/skqp-dev # or whatever release tag you need -Run as an executable --------------------- +5. Download dependencies, the model, and configure the build. -1. Build the SkQP program, load files on the device, and run skqp: + python tools/skqp/download_model + python tools/git-sync-deps + python tools/skqp/generate_gn_args out/skqp-arm "$ANDROID_NDK" arm + bin/gn gen out/skqp-arm - ninja -C out/${arch}-rel skqp - adb shell "cd /data/local/tmp; rm -rf skqp_assets report" - adb push platform_tools/android/apps/skqp/src/main/assets \ - /data/local/tmp/skqp_assets - adb push out/${arch}-rel/skqp /data/local/tmp/ - adb shell "cd /data/local/tmp; ./skqp skqp_assets report" +6. Build, install, and run. -2. Get the error report if there are errors: + platform_tools/android/bin/android_build_app -C out/skqp-arm skqp + adb install -r out/skqp-arm/skqp.apk + adb logcat -c + adb shell am instrument -w org.skia.skqp/android.support.test.runner.AndroidJUnitRunner - adb pull /data/local/tmp/report /tmp/ - tools/skqp/sysopen.py /tmp/report/report.html +7. Monitor the output with: -Run as an APK -------------- + adb logcat org.skia.skqp skia "*:S" -0. Install the [Android SDK](https://developer.android.com/studio/#command-tools). + Note the test's output path on the device. It will look something like this: - mkdir ~/android-sdk - ( cd ~/android-sdk; unzip ~/Downloads/sdk-tools-*.zip ) - yes | ~/android-sdk/tools/bin/sdkmanager --licenses - export ANDROID_HOME=~/android-sdk + 01-23 15:22:12.688 27158 27173 I org.skia.skqp: + output written to "/storage/emulated/0/Android/data/org.skia.skqp/files/output" -1. Build the skqp.apk, load it on the device, and run the tests +8. Retrieve and view the report with: - platform_tools/android/bin/android_build_app -C out/${arch}-rel skqp - adb install -r out/${arch}-rel/skqp.apk - adb logcat -c - adb shell am instrument -w \ - org.skia.skqp/android.support.test.runner.AndroidJUnitRunner + OUTPUT_LOCATION="/storage/emulated/0/Android/data/org.skia.skqp/files/output" + adb pull $OUTPUT_LOCATION /tmp/ + tools/skqp/sysopen.py /tmp/output/skqp_report/report.html -2. Find out where the report went (and look for Skia errors): +Run as an executable +-------------------- - adb logcat -d org.skia.skqp skia "*:S" +1. Follow steps 1-5 as above. -3. Retrieve and view the report if there are any errors: +2. Build the SkQP program, load files on the device, and run skqp: - adb pull /storage/emulated/0/Android/data/org.skia.skqp/files/output /tmp/ - tools/skqp/sysopen.py /tmp/output/skqp_report/report.html + ninja -C out/skqp-arm skqp + adb shell "cd /data/local/tmp; rm -rf skqp_assets report" + adb push platform_tools/android/apps/skqp/src/main/assets \ + /data/local/tmp/skqp_assets + adb push out/skqp-arm/skqp /data/local/tmp/ + adb shell "cd /data/local/tmp; ./skqp skqp_assets report" +2. Get and view the error report: + adb pull /data/local/tmp/report /tmp/ + tools/skqp/sysopen.py /tmp/report/report.html |