skia2/infra/bots/recipes/test_pathkit.py

182 lines
6.1 KiB
Python
Raw Normal View History

# Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Recipe which runs the PathKit tests using docker
DEPS = [
'checkout',
'env',
'infra',
'recipe_engine/file',
'recipe_engine/path',
'recipe_engine/properties',
'recipe_engine/python',
'recipe_engine/step',
'run',
'vars',
]
DOCKER_IMAGE = 'gcr.io/skia-public/gold-karma-chrome-tests:72.0.3626.121_v1'
INNER_KARMA_SCRIPT = '/SRC/skia/infra/pathkit/test_pathkit.sh'
def RunSteps(api):
api.vars.setup()
checkout_root = api.checkout.default_checkout_root
out_dir = api.vars.swarming_out_dir
api.checkout.bot_update(checkout_root=checkout_root)
# Make sure this exists, otherwise Docker will make it with root permissions.
[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 17:45:28 +00:00
api.file.ensure_directory('mkdirs out_dir', out_dir, mode=0777)
# The karma script is configured to look in ./npm-(asmjs|wasm)/bin/test/ for
# the test files to load, so we must copy them there (see Set up for docker).
copy_dest = checkout_root.join('skia', 'modules', 'pathkit',
'npm-wasm', 'bin', 'test')
if 'asmjs' in api.vars.builder_name:
copy_dest = checkout_root.join('skia', 'modules', 'pathkit',
'npm-asmjs', 'bin', 'test')
base_dir = api.vars.build_dir
bundle_name = 'pathkit.wasm'
if 'asmjs' in api.vars.builder_name:
# release mode has a .js.mem file that needs to come with.
# debug mode has an optional .map file, but we can omit that for tests
if 'Debug' in api.vars.builder_name:
bundle_name = ''
else:
bundle_name = 'pathkit.js.mem'
api.python.inline(
[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 17:45:28 +00:00
name='Set up for docker',
program='''import errno
import os
import shutil
import sys
copy_dest = sys.argv[1]
base_dir = sys.argv[2]
bundle_name = sys.argv[3]
[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 17:45:28 +00:00
out_dir = sys.argv[4]
# Clean out old binaries (if any)
try:
shutil.rmtree(copy_dest)
except OSError as e:
if e.errno != errno.ENOENT:
raise
# Make folder
try:
os.makedirs(copy_dest)
except OSError as e:
if e.errno != errno.EEXIST:
raise
[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 17:45:28 +00:00
# Copy binaries (pathkit.js and pathkit.wasm) to where the karma tests
# expect them ($SKIA_ROOT/modules/pathkit/npm-wasm/bin/test/)
dest = os.path.join(copy_dest, 'pathkit.js')
shutil.copyfile(os.path.join(base_dir, 'pathkit.js'), dest)
os.chmod(dest, 0o644) # important, otherwise non-privileged docker can't read.
if bundle_name:
dest = os.path.join(copy_dest, bundle_name)
shutil.copyfile(os.path.join(base_dir, bundle_name), dest)
os.chmod(dest, 0o644) # important, otherwise non-privileged docker can't read.
[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 17:45:28 +00:00
# Prepare output folder, api.file.ensure_directory doesn't touch
# the permissions of the out directory if it already exists.
[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 17:45:28 +00:00
os.chmod(out_dir, 0o777) # important, otherwise non-privileged docker can't write.
''',
args=[copy_dest, base_dir, bundle_name, out_dir],
infra_step=True)
[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 17:45:28 +00:00
cmd = ['docker', 'run', '--shm-size=2gb', '--rm',
'--volume', '%s:/SRC' % checkout_root,
'--volume', '%s:/OUT' % out_dir]
if 'asmjs' in api.vars.builder_name:
cmd.extend(['--env', 'ASM_JS=1'])
cmd.extend([
DOCKER_IMAGE, INNER_KARMA_SCRIPT,
'--builder', api.vars.builder_name,
'--git_hash', api.properties['revision'],
'--buildbucket_build_id', api.properties.get('buildbucket_build_id',
''),
'--bot_id', api.vars.swarming_bot_id,
'--task_id', api.vars.swarming_task_id,
'--browser', 'Chrome',
'--config', api.vars.configuration,
'--source_type', 'pathkit',
])
if 'asmjs' in api.vars.builder_name:
cmd.extend(['--compiled_language', 'asmjs']) # the default is wasm
[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 17:45:28 +00:00
if api.vars.is_trybot:
cmd.extend([
'--issue', api.vars.issue,
'--patchset', api.vars.patchset,
])
# Override DOCKER_CONFIG set by Kitchen.
env = {'DOCKER_CONFIG': '/home/chrome-bot/.docker'}
with api.env(env):
api.run(
api.step,
'Test PathKit with Docker',
cmd=cmd)
def GenTests(api):
yield (
api.test('Test-Debian9-EMCC-GCE-CPU-AVX2-wasm-Debug-All-PathKit') +
api.properties(buildername=('Test-Debian9-EMCC-GCE-CPU-AVX2'
'-wasm-Debug-All-PathKit'),
repository='https://skia.googlesource.com/skia.git',
revision='abc123',
path_config='kitchen',
swarm_out_dir='[SWARM_OUT_DIR]')
)
[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 17:45:28 +00:00
yield (
api.test('Test-Debian9-EMCC-GCE-CPU-AVX2-asmjs-Debug-All-PathKit') +
api.properties(buildername=('Test-Debian9-EMCC-GCE-CPU-AVX2'
'-asmjs-Debug-All-PathKit'),
repository='https://skia.googlesource.com/skia.git',
revision='abc123',
path_config='kitchen',
swarm_out_dir='[SWARM_OUT_DIR]')
)
yield (
api.test('Test-Debian9-EMCC-GCE-CPU-AVX2-asmjs-Release-All-PathKit') +
api.properties(buildername=('Test-Debian9-EMCC-GCE-CPU-AVX2'
'-asmjs-Release-All-PathKit'),
repository='https://skia.googlesource.com/skia.git',
revision='abc123',
path_config='kitchen',
swarm_out_dir='[SWARM_OUT_DIR]')
)
[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 17:45:28 +00:00
yield (
api.test('pathkit_trybot') +
api.properties(buildername=('Test-Debian9-EMCC-GCE-CPU-AVX2'
'-wasm-Debug-All-PathKit'),
repository='https://skia.googlesource.com/skia.git',
revision='abc123',
path_config='kitchen',
swarm_out_dir='[SWARM_OUT_DIR]',
patch_ref='89/456789/12',
patch_repo='https://skia.googlesource.com/skia.git',
[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 17:45:28 +00:00
patch_storage='gerrit',
patch_set=7,
patch_issue=1234,
gerrit_project='skia',
gerrit_url='https://skia-review.googlesource.com/')
)