skia2/tools/skqp
Hal Canary b4d01a95c9 SkQP: ResourceFactory
Change-Id: Ic57a86ec115e3ace52615c0b8e9a22a915988850
Reviewed-on: https://skia-review.googlesource.com/101320
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-01-29 21:23:33 +00:00
..
jni SkQP: ResourceFactory 2018-01-29 21:23:33 +00:00
download_model SkQP: Stop requiring users to use posix shell 2018-01-24 21:11:19 +00:00
generate_gn_args SkQP: Stop requiring users to use posix shell 2018-01-24 21:11:19 +00:00
gm_knowledge.cpp SkQP: Stop requiring users to use posix shell 2018-01-24 21:11:19 +00:00
gm_knowledge.h SkQP: replace blacklist with: DoNotExecuteInExperimentalMode and NoScoreInCompatibilityTestMode 2018-01-22 20:11:57 +00:00
gm_runner.cpp SkQP: re-enable workarounds for unit tests. Also, more logging 2018-01-26 20:44:50 +00:00
gm_runner.h SkQP: replace blacklist with: DoNotExecuteInExperimentalMode and NoScoreInCompatibilityTestMode 2018-01-22 20:11:57 +00:00
inflate.py
make_apk.sh SkQP: Stop requiring users to use posix shell 2018-01-24 21:11:19 +00:00
make_gmkb.go SkQP: more slack 2018-01-26 22:07:44 +00:00
make_known_tests.sh SkQP: Cloud Scripts 2018-01-23 19:07:11 +00:00
make_model.sh SkQP: Cloud Scripts 2018-01-23 19:07:11 +00:00
README.md SkQP: ResourceFactory 2018-01-29 21:23:33 +00:00
run_skqp_exe SkQP: run_skqp_exe script 2018-01-25 16:30:22 +00:00
setup_resources SkQP: ResourceFactory 2018-01-29 21:23:33 +00:00
skqp_asset_manager.h
skqp.cpp SkQP: replace blacklist with: DoNotExecuteInExperimentalMode and NoScoreInCompatibilityTestMode 2018-01-22 20:11:57 +00:00
sysopen.py
upload_model SkQP: Stop requiring users to use posix shell 2018-01-24 21:11:19 +00:00

SkQP

How to run the SkQP tests

  1. Install Chromium's depot_tools

    git clone 'https://chromium.googlesource.com/chromium/tools/depot_tools.git'
    export PATH="${PWD}/depot_tools:${PATH}"
    
  2. Install the Android NDK.

    cd ~
    unzip ~/Downloads/android-ndk-*.zip
    ANDROID_NDK=~/android-ndk-*        # Or wherever you installed the Android NDK.
    
  3. Install the Android SDK

    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.
    

    Put adb in your PATH.

  4. Get the right version of Skia:

    git clone https://skia.googlesource.com/skia.git
    cd skia
    git checkout origin/skqp/dev  # or whatever release tag you need
    
  5. Download dependencies, the model, and configure the build. (If you want to test another architecture, replace arm with x86, x64, or arm64.)

    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
    python tools/skqp/setup_resources . out/skqp-arm
    
  6. Build, install, and run.

    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
    
  7. Monitor the output with:

    adb logcat org.skia.skqp skia "*:S"
    

    Note the test's output path on the device. It will look something like this:

    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"
    
  8. Retrieve and view the report with:

    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
    

Run as a non-APK executable

  1. Follow steps 1-5 as above.

  2. Build the SkQP program, load files on the device, and run skqp:

    rm -f out/skqp-arm/gen/binary_resources.cpp
    ninja -C out/skqp-arm skqp
    python tools/skqp/run_skqp_exe out/skqp-arm