Enable manual per-patchset functional tests on BBSim
Change-Id: Ie4bbd4eacd5863bec7fd63d56c9080044a357c3c
diff --git a/jjb/pipeline/voltha-bbsim-tests.groovy b/jjb/pipeline/voltha-bbsim-tests.groovy
index a3033c1..f6e8b27 100644
--- a/jjb/pipeline/voltha-bbsim-tests.groovy
+++ b/jjb/pipeline/voltha-bbsim-tests.groovy
@@ -155,7 +155,20 @@
steps {
sh '''
mkdir -p $WORKSPACE/RobotLogs
- make -C $WORKSPACE/voltha/voltha-system-tests sanity-kind || true
+
+ # By default, all tests tagged 'sanity' are run. This covers basic functionality
+ # like running through the ATT workflow for a single subscriber.
+ export TEST_TAGS=sanity
+
+ # If the Gerrit comment contains a line with "functional tests" then run the full
+ # functional test suite. This covers tests tagged either 'sanity' or 'functional'.
+ # Note: Gerrit comment text will be prefixed by "Patch set n:" and a blank line
+ REGEX="functional tests"
+ if [[ "$GERRIT_EVENT_COMMENT_TEXT" =~ \$REGEX ]]; then
+ TEST_TAGS=sanityORfunctional
+ fi
+
+ make -C $WORKSPACE/voltha/voltha-system-tests single-kind || true
'''
}
}