| t=$(mktemp -d || mktemp -d -t wct-XXXXXXXXXX) |
| components=$TEST_SRCDIR/gerrit/polygerrit-ui/app/test_components.zip |
| code=$TEST_SRCDIR/gerrit/polygerrit-ui/app/polygerrit_embed_ui.zip |
| index=$TEST_SRCDIR/gerrit/polygerrit-ui/app/embed/test.html |
| tests=$TEST_SRCDIR/gerrit/polygerrit-ui/app/embed/*_test.html |
| # For some reason wct tries to install selenium into its node_modules |
| # directory on first run. If you've installed into /usr/local and |
| # aren't running wct as root, you're screwed. Turning this option off |
| # through skipSeleniumInstall seems to still work, so there's that. |
| # Sauce tests are disabled by default in order to run local tests |
| # only. Run it with (saucelabs.com account required; free for open |
| # source): WCT_ARGS='--plugin sauce' ./polygerrit-ui/app/embed_test.sh |
| cat <<EOF > $t/wct.conf.js |
| {'/components/bower_components': 'bower_components'} |
| 'skipSeleniumInstall': true |
| 'Windows 10/microsoftedge' |
| export PATH="$(dirname $WCT):$(dirname $NPM):$PATH" |
| $(basename ${WCT}) ${WCT_ARGS} |