skia2/infra/pathkit/test_pathkit.sh
Kevin Lubick 8e9750d3c5 Add CanvasKit build
Building CanvasKit uses very similar logic to PathKit, so there
was a fair amount of copy/paste/customize.

Fixes the name of skia.js/wasm -> canvaskit.js/wasm and
adds a package.json to formally track versions.

Also move PathKit helper scripts to align better.

Docs-Preview: https://skia.org/?cl=160463
Bug: skia:
Change-Id: Ie75b30592dcc4d520dca41f6f5579006aaa8849b
Reviewed-on: https://skia-review.googlesource.com/c/160463
Reviewed-by: Eric Boren <borenet@google.com>
2018-10-09 13:56:56 +00:00

31 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
# Copyright 2018 Google LLC
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# This assumes it is being run inside a docker container of gold-karma-chrome-tests
# and a Skia checkout has been mounted at /SRC and the output directory
# is mounted at /OUT
# For example:
# docker run -v $SKIA_ROOT:/SRC -v /tmp/dockerout:/OUT gcr.io/skia-public/gold-karma-chrome-tests:68.0.3440.106_v1 /SRC/infra/pathkit/test_pathkit.sh
set -ex
#BASE_DIR is the dir this script is in ($SKIA_ROOT/infra/pathkit)
BASE_DIR=`cd $(dirname ${BASH_SOURCE[0]}) && pwd`
PATHKIT_DIR=$BASE_DIR/../../modules/pathkit
# Start the aggregator in the background
/opt/gold-aggregator $@ &
# Run the tests
npx karma start $PATHKIT_DIR/karma.conf.js --single-run
# Tell the aggregator to dump the json
# This curl command gets the HTTP code and stores it into $CODE
CODE=`curl -s -o /dev/null -I -w "%{http_code}" -X POST localhost:8081/dump_json`
if [ $CODE -ne 200 ]; then
# If we don't get 200 back, something is wrong with writing to disk, so exit with error
exit 1
fi