Files
gerrit/polygerrit-ui/app/run_test.sh
Viktar Donich dbe8aa864a Embedded PolyGerrit integrity test
Also, consolidate package building into a macro in
polygerrit-ui/app/rules.bzl.

Change-Id: If1f6b86639d7400760a53c7e293216da767d86a9
2017-06-28 22:12:19 +00:00

26 lines
700 B
Bash
Executable File

#!/usr/bin/env bash
npm_bin=$(which npm)
if [[ -z "$npm_bin" ]]; then
echo "NPM must be on the path. (https://www.npmjs.com/)"
exit 1
fi
wct_bin=$(which wct)
if [[ -z "$wct_bin" ]]; then
echo "WCT must be on the path. (https://github.com/Polymer/web-component-tester)"
exit 1
fi
# WCT tests are not hermetic, and need extra environment variables.
# TODO(hanwen): does $DISPLAY even work on OSX?
bazel test \
--test_env="HOME=$HOME" \
--test_env="WCT=${wct_bin}" \
--test_env="WCT_ARGS=${WCT_ARGS}" \
--test_env="NPM=${npm_bin}" \
--test_env="DISPLAY=${DISPLAY}" \
"$@" \
//polygerrit-ui/app:embed_test \
//polygerrit-ui/app:wct_test