blob: b98d884b0ce9dd827c3c950be625b45ad740ae13 [file] [log] [blame]
Luca Milanesio3e191e42016-10-07 16:29:28 +01001#!/bin/bash -e
2
Luca Milanesioe0c046c2022-10-13 21:23:40 +01003cd gerrit
4
5if git show --diff-filter=AM --name-only --pretty="" HEAD | grep -q .bazelversion
6then
7 export BAZEL_OPTS=""
8fi
9
Luca Milanesio419610f2023-10-25 00:27:24 +020010case {branch} in
Luca Milanesio759c31c2024-04-05 15:05:02 +010011 master|stable-3.10|stable-3.9)
Luca Milanesio419610f2023-10-25 00:27:24 +020012 . set-java.sh 17
13 ;;
14
15 *)
16 . set-java.sh 11
17 ;;
18esac
Luca Milanesio66abd9e2020-10-23 15:28:43 +010019
Luca Milanesioa6b6d352023-12-29 01:18:14 +000020export BAZEL_OPTS="$(echo $BAZEL_OPTS | xargs) \
Alvaro Vilaplana Garcia5d8294a2024-01-23 09:26:45 +000021 --config=remote_bb \
22 --jobs=50 \
23 --remote_header=x-buildbuddy-api-key=$BB_API_KEY \
David Ostrovskye554a542021-02-19 19:40:33 +010024 --flaky_test_attempts 3 \
Luca Milanesio74e5a1b2017-01-11 16:35:35 +000025 --test_timeout 3600 \
Luca Milanesiob0c3f442023-12-28 22:41:04 +000026 --test_tag_filters=-flaky"
Alvaro Vilaplana Garcia5d8294a2024-01-23 09:26:45 +000027
Paladox noneff75f262017-12-23 16:59:42 +000028export WCT_HEADLESS_MODE=1
Luca Milanesiob18a5e12016-12-23 00:14:29 +000029
David Pursehousea19f76a2019-10-30 16:07:24 +090030java -fullversion
Luca Milanesio4e826372019-06-07 15:19:35 +010031bazelisk version
32
Luca Milanesiof1e4a1d2019-11-21 13:04:09 +000033echo 'Test in NoteDb mode'
34echo '----------------------------------------------'
Luca Milanesiob351dc62023-12-29 11:25:03 +000035bazelisk test $BAZEL_OPTS //...
Luca Milanesiob18a5e12016-12-23 00:14:29 +000036
Thomas Draebing192e33a2021-06-24 08:24:02 +020037echo "Test PolyGerrit locally in $(google-chrome --version)"
Luca Milanesiof1e4a1d2019-11-21 13:04:09 +000038echo '----------------------------------------------'
39bash ./polygerrit-ui/app/run_test.sh || touch ~/polygerrit-failed
Paladox noneb1dd0a62017-05-24 12:54:50 +000040
Luca Milanesio3e191e42016-10-07 16:29:28 +010041exit 0