Only run reviewdb tests on stable branches
NoteDB and PolyGerrit aren't officially supported on stable
branches: they should not necessarily be executed and validated
as we know they may not work as expected.
Change-Id: I2dfd907492d35cf264c502439f31f998fa76a08c
diff --git a/jenkins/gerrit-bazel-test.sh b/jenkins/gerrit-bazel-test.sh
index 377cb2a..20fa88f 100755
--- a/jenkins/gerrit-bazel-test.sh
+++ b/jenkins/gerrit-bazel-test.sh
@@ -14,6 +14,11 @@
echo '----------------------------------------------'
bazel test $BAZEL_OPTS //...
+if [ "{branch}" != "master" ]
+then
+ exit 0
+fi
+
echo 'Test in Note DB mode (Disable ReviewDB)'
echo '----------------------------------------------'
bazel test --test_env=GERRIT_NOTEDB=DISABLE_CHANGE_REVIEW_DB $BAZEL_OPTS //...
diff --git a/jenkins/gerrit-buck-test.sh b/jenkins/gerrit-buck-test.sh
index 38f4c74..e4c09ce 100644
--- a/jenkins/gerrit-buck-test.sh
+++ b/jenkins/gerrit-buck-test.sh
@@ -11,7 +11,7 @@
echo '----------------------------------------------'
buck test --no-results-cache --exclude flaky
- if [ ! -d gerrit-server/src/main/java/com/google/gerrit/server/notedb ]
+ if [ "{branch}" != "master" ]
then
exit 0
fi