1 How SkQP Generates Render Test Models 2 ===================================== 3 4 We will, at regular intervals, generate new models from the [master branch of 5 Skia][1]. Here is how that process works: 6 7 0. Choose a commit to make the branch from 8 9 COMMIT=origin/master 10 11 1. Get the positively triaged results from Gold: 12 13 cd SKIA_SOURCE_DIRECTORY 14 git fetch origin 15 git checkout "$COMMIT" 16 python tools/skqp/get_gold_results.py "${COMMIT}~10" "$COMMIT" 17 18 This will produce a file `meta_YYYMMMDDD_HHHMMMSS_COMMIT_COMMIT.json` in 19 the current directory. 20 21 2. From a checkout of Skia's master branch, execute: 22 23 cd SKIA_SOURCE_DIRECTORY 24 git checkout "$COMMIT" 25 tools/skqp/cut_release META_JSON_FILE 26 27 This will create the following files: 28 29 platform_tools/android/apps/skqp/src/main/assets/files.checksum 30 platform_tools/android/apps/skqp/src/main/assets/skqp/rendertests.txt 31 platform_tools/android/apps/skqp/src/main/assets/skqp/unittests.txt 32 33 These three files can be commited to Skia to create a new commit. Make 34 `origin/skqp/dev` a parent of this commit (without merging it in), and 35 push this new commit to `origin/skqp/dev`: 36 37 tools/skqp/branch_skqp_dev.sh 38 39 Review and submit the change: 40 41 git push origin HEAD:refs/for/skqp/dev 42 bin/sysopen https://review.skia.org/$(bin/gerrit-number HEAD) 43 44 (Optional) Make a SkQP APK. 45 46 tools/skqp/docker_build_universal_apk.sh 47 48 (Optional) Test the SkQP APK: 49 50 adb uninstall org.skia.skqp 51 tools/skqp/test_apk.sh LOCATION/skqp-universal-debug.apk 52 53 (Once changes land) Upload the SkQP APK. 54 55 tools/skqp/upload_apk LOCATION/skqp-universal-debug.apk 56 57 58 `tools/skqp/cut_release` 59 ------------------------ 60 61 This tool will call `make_gmkb.go` to generate the `m{ax,in}.png` files for 62 each render test. Additionaly, a `models.txt` file enumerates all of the 63 models. 64 65 Then it calls `jitter_gms` to see which render tests pass the jitter test. 66 `jitter_gms` respects the `bad_gms.txt` file by ignoring the render tests 67 enumerated in that file. Tests which pass the jitter test are enumerated in 68 the file `good.txt`, those that fail in the `bad.txt` file. 69 70 Next, the `skqp/rendertests.txt` file is created. This file lists the render 71 tests that will be executed by SkQP. These are the union of the tests 72 enumerated in the `good.txt` and `bad.txt` files. If the render test is found 73 in the `models.txt` file and the `good.txt` file, its per-test threshold is set 74 to 0 (a later CL can manually change this, if needed). Otherwise, the 75 threshold is set to -1; this indicated that the rendertest will be executed (to 76 verify that the driver will not crash), but the output will not be compared 77 against the model. Unnecessary models will be removed. 78 79 Next, all of the files that represent the models are uploaded to cloud storage. 80 A single checksum hash is kept in the `files.checksum` file. This is enough 81 to re-download those files later, but we don't have to fill the git repository 82 with a lot of binary data. 83 84 Finally, a list of the current gpu unit tests is created and stored in 85 `skqp/unittests.txt`. 86 87 [1]: https://skia.googlesource.com/skia/+log/master "Skia Master Branch" 88 [2]: https://gold.skia.org/search "Skia Gold Search" 89