VOL-2863 Add sanity test for voltctl

Change-Id: Ib730f842cc9afa3cef6711e64f42683009258e87
diff --git a/jjb/pipeline/voltha-bbsim-tests.groovy b/jjb/pipeline/voltha-bbsim-tests.groovy
index 74e9613..f05d39d 100644
--- a/jjb/pipeline/voltha-bbsim-tests.groovy
+++ b/jjb/pipeline/voltha-bbsim-tests.groovy
@@ -115,6 +115,8 @@
              make-local voltha-openolt-adapter
              make-local voltha-openonu-adapter
              make-local ofagent-py
+           elif [ "${gerritProject}" = "voltctl" ]; then
+             make -C $WORKSPACE/voltha/voltctl/ build
            elif ! [[ "${gerritProject}" =~ ^(voltha-helm-charts|voltha-system-tests)\$ ]]; then
              make-local ${gerritProject}
            fi
@@ -132,7 +134,7 @@
              echo "on master, using default settings for kind-voltha"
            fi
 
-           if ! [[ "${gerritProject}" =~ ^(voltha-helm-charts|voltha-system-tests)\$ ]]; then
+           if ! [[ "${gerritProject}" =~ ^(voltha-helm-charts|voltha-system-tests|voltctl)\$ ]]; then
              export GOROOT=/usr/local/go
              export GOPATH=\$(pwd)
              docker images | grep citest
@@ -196,6 +198,12 @@
              helm dep update \$VOLTHA_ADAPTER_OPEN_ONU_CHART
            fi
 
+           if [ "${gerritProject}" = "voltctl" ]; then
+             export VOLTCTL_VERSION=$(cat $WORKSPACE/voltha/voltctl/VERSION)
+             cp $WORKSPACE/voltha/voltctl/voltctl $WORKSPACE/kind-voltha/bin/voltctl
+             md5sum $WORKSPACE/kind-voltha/bin/voltctl
+           fi
+
            cd $WORKSPACE/kind-voltha/
            echo \$EXTRA_HELM_FLAGS
            kail -n voltha -n default > $WORKSPACE/onos-voltha-combined.log &
@@ -239,6 +247,7 @@
 
          sync
          pkill kail || true
+         md5sum $WORKSPACE/kind-voltha/bin/voltctl
 
          ## Pull out errors from log files
          extract_errors_go() {
diff --git a/jjb/verify/voltctl.yaml b/jjb/verify/voltctl.yaml
index 9b586ab..74c98e2 100644
--- a/jjb/verify/voltctl.yaml
+++ b/jjb/verify/voltctl.yaml
@@ -24,6 +24,8 @@
           unit-test-targets: 'lint sca test'
           unit-test-keep-going: 'true'
           dependency-jobs: 'verify_voltctl_tag-collision'
+      - 'voltha-patch-test':
+          pipeline-script: 'voltha-bbsim-tests.groovy'
 
 - job-group:
     name: 'post-submit-voltctl-jobs'