
Some platforms either don't have bash installed as /bin/bash. Use the environment to find it in the PATH. Change-Id: Ie1a6d64146927c83af07d0e2ca7f573c7504f8ef
25 lines
586 B
Bash
Executable File
25 lines
586 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
wct_bin=$(which wct)
|
|
if [[ -z "$wct_bin" ]]; then
|
|
echo "WCT must be on the path."
|
|
exit 1
|
|
fi
|
|
|
|
npm_bin=$(which npm)
|
|
if [[ -z "$npm_bin" ]]; then
|
|
echo "NPM must be on the path."
|
|
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:wct_test
|