skia2/infra/bots/recipes
Kevin Lubick a0ba612bb2 [PathKit] Adding test infrastructure to support Gold output
To get the gold images out of the browser tests, this adds
testReporter.js and pathkit_aggregator.go.  testReporter bundles
up the output as a base64 encoded PNG and sends it over the local
network to pathkit_aggregator.  pathkit_aggregator will keep
a list of test results reported in this way and write the PNGs
to /OUT of the container (which is the swarming output directory).
Finally, after all the tests are run, the helper script "test_pathkit.sh"
makes a POST request that creates the JSON file that gold expects
(following the schema https://github.com/google/skia-buildbot/blob/master/golden/docs/INGESTION.md)

pathkit_aggregator takes many command line arguments which control
the keys that Gold needs in order to ingest and handle the data.
Of note, this creates a new set (i.e. source_type) of gold images
called "pathkit", which will distinguish it from "gm", "image", etc.

There will be at least 2 sub-sets of "pathkit" images, "canvas" and "svg",
(representing the 2 output types of PathKit).  This CL doesn't
quite handle SVG yet, as it needs a way to convert SVG to PNG in the
browser and will be addressed in a follow up CL.

A "standard" gm is sized at 600x600. This was arbitrarily picked.

Note that the functions in testReporter.js return Promises based
on the fetch requests to post the data. This eliminates the race
condition between the /report_gold_data and /dump_json since
running the karma tests won't return until all reports are done.

Other changes of note:
 - Adds go to karma-chrome-tests container.
 - renames recipe_modules/build/wasm.py -> pathkit.py to be consistent with
the name of test_pathkit.py and make for easier grepping.
 - Increases the JS test timeout to 10s (up from 5) to hopefully avoid
the flakes seen in the Debug Test.

Bug: skia:8216
Change-Id: Ic2cad54f3d19cc16601cf2e9a87798db1e6887a2
Reviewed-on: https://skia-review.googlesource.com/147042
Reviewed-by: Stephan Altmueller <stephana@google.com>
2018-08-15 19:25:42 +00:00
..
android_compile.expected [Android Compile Bot] Look at the start_dir for trigger_wait_ac_task.py 2018-02-05 18:34:46 +00:00
bookmaker.expected [infra] Add new go_deps asset 2018-08-03 18:33:24 +00:00
calmbench.expected Reland [recipes] Isolate build outputs with no subdirs 2018-06-01 15:18:46 +00:00
check_generated_files.expected [recipes] BUILDTYPE and SKIA_OUT are no longer used 2018-05-15 19:36:23 +00:00
compile.expected [infra] Add new go_deps asset 2018-08-03 18:33:24 +00:00
compute_test.expected Add OpenCL test job that runs hello-opencl. 2018-06-29 13:25:17 +00:00
ct_skps.expected Roll recipe dependencies (nontrivial). 2018-08-03 11:20:51 +00:00
housekeeper.expected Roll recipe dependencies (nontrivial). 2018-08-03 11:20:51 +00:00
infra.expected [infra] Add new go_deps asset 2018-08-03 18:33:24 +00:00
perf.expected Exclude compositing_images benchs from Chromecast 2018-08-07 19:19:58 +00:00
recreate_skps.expected [infra] Add new go_deps asset 2018-08-03 18:33:24 +00:00
skpbench.expected [infra] Determine Android device location based on bot ID 2018-07-10 19:54:58 +00:00
skqp_test.expected Reland [recipes] Isolate build outputs with no subdirs 2018-06-01 15:18:46 +00:00
test_pathkit.expected [PathKit] Adding test infrastructure to support Gold output 2018-08-15 19:25:42 +00:00
test.expected enabled gms and most unit tests for Metal gpu backend 2018-08-10 18:29:50 +00:00
upload_calmbench_results.expected Reland "[infra] Run recipes through Kitchen" 2018-04-19 11:27:46 +00:00
upload_coverage_results.expected Reland [recipes] Isolate build outputs with no subdirs 2018-06-01 15:18:46 +00:00
upload_dm_results.expected [infra] Make GS buckets for images and hash file URL configurable 2018-08-02 07:17:21 +00:00
upload_nano_results.expected [recipes] Simplify test/perf dirs 2018-06-20 17:50:18 +00:00
upload_skiaserve.expected Reland [recipes] Isolate build outputs with no subdirs 2018-06-01 15:18:46 +00:00
android_compile.py [Android Compile Bot] Look at the start_dir for trigger_wait_ac_task.py 2018-02-05 18:34:46 +00:00
bookmaker.py [infra] Add new go_deps asset 2018-08-03 18:33:24 +00:00
calmbench.py Reland [recipes] Isolate build outputs with no subdirs 2018-06-01 15:18:46 +00:00
check_generated_files.py [recipes] Rename some modules and files 2018-05-24 14:06:55 +00:00
compile.py Reland [recipes] Isolate build outputs with no subdirs 2018-06-01 15:18:46 +00:00
compute_test.py Add OpenCL test job that runs hello-opencl. 2018-06-29 13:25:17 +00:00
ct_skps.py [recipes] Make ct_skps use binaries from a build task 2018-06-08 21:14:02 +00:00
housekeeper.py [recipes] Simplify test/perf dirs 2018-06-20 17:50:18 +00:00
infra.py [infra] Add new go_deps asset 2018-08-03 18:33:24 +00:00
perf.py Exclude compositing_images benchs from Chromecast 2018-08-07 19:19:58 +00:00
README.md Re-re-land "added GrSkSLFP and converted DitherEffect to use it" 2018-07-31 15:18:03 +00:00
recreate_skps.py [infra] Add new go_deps asset 2018-08-03 18:33:24 +00:00
skpbench.py Disable --gpuThreads when skpbenching DDLs 2018-06-26 18:33:42 +00:00
skqp_test.py [recipes] Rename some modules and files 2018-05-24 14:06:55 +00:00
test_pathkit.py [PathKit] Adding test infrastructure to support Gold output 2018-08-15 19:25:42 +00:00
test.py enabled gms and most unit tests for Metal gpu backend 2018-08-10 18:29:50 +00:00
upload_calmbench_results.py [recipes] Rename some modules and files 2018-05-24 14:06:55 +00:00
upload_coverage_results.py Reland [recipes] Isolate build outputs with no subdirs 2018-06-01 15:18:46 +00:00
upload_dm_results.py [infra] Make GS buckets for images and hash file URL configurable 2018-08-02 07:17:21 +00:00
upload_nano_results.py [recipes] Simplify test/perf dirs 2018-06-20 17:50:18 +00:00
upload_skiaserve.py Reland [recipes] Isolate build outputs with no subdirs 2018-06-01 15:18:46 +00:00

Skia Recipes

These are the top-level scripts which run inside of Swarming tasks to perform all of Skia's automated testing.

To run a recipe locally:

$ python infra/bots/recipes.py run --workdir=/tmp/<workdir> <recipe name without .py> key1=value1 key2=value2 ...

Each recipe may have its own required properties which must be entered as key/value pairs in the command.

When you change a recipe, you generally need to re-train the simulation test:

$ python infra/bots/recipes.py test train

Or:

    $ cd infra/bots; make train

The test generates expectations files for the tests contained within each recipe which illustrate which steps would run, given a particular set of inputs. Pay attention to the diffs in these files when making changes to ensure that your change has the intended effect.