| #!/bin/bash -e |
| |
| cd gerrit |
| |
| if git show --diff-filter=AM --name-only --pretty="" HEAD | grep -q .bazelversion |
| then |
| export BAZEL_OPTS="" |
| fi |
| |
| case {branch} in |
| master|stable-3.10|stable-3.9) |
| . set-java.sh 17 |
| ;; |
| |
| *) |
| . set-java.sh 11 |
| ;; |
| esac |
| |
| export BAZEL_OPTS="$(echo $BAZEL_OPTS | xargs) \ |
| --config=remote_bb \ |
| --jobs=50 \ |
| --remote_header=x-buildbuddy-api-key=$BB_API_KEY \ |
| --flaky_test_attempts 3 \ |
| --test_timeout 3600 \ |
| --test_tag_filters=-flaky" |
| |
| export WCT_HEADLESS_MODE=1 |
| |
| java -fullversion |
| bazelisk version |
| |
| echo 'Test in NoteDb mode' |
| echo '----------------------------------------------' |
| bazelisk test $BAZEL_OPTS //... |
| |
| echo "Test PolyGerrit locally in $(google-chrome --version)" |
| echo '----------------------------------------------' |
| bash ./polygerrit-ui/app/run_test.sh || touch ~/polygerrit-failed |
| |
| exit 0 |