Merge "[VOL-3679] integrate new tests for multiple olts on bbsim and hardware"
diff --git a/jjb/pipeline/voltha-dt-physical-functional-tests.groovy b/jjb/pipeline/voltha-dt-physical-functional-tests.groovy
index c1f16c0..566d245 100644
--- a/jjb/pipeline/voltha-dt-physical-functional-tests.groovy
+++ b/jjb/pipeline/voltha-dt-physical-functional-tests.groovy
@@ -227,6 +227,26 @@
       }
     }
 
+    stage('Multiple OLT Tests') {
+      environment {
+        ROBOT_CONFIG_FILE="$WORKSPACE/${configBaseDir}/${configDeploymentDir}/${configFileName}-DT.yaml"
+        ROBOT_FILE="Voltha_DT_MultiOLT_Tests.robot"
+        ROBOT_LOGS_DIR="$WORKSPACE/RobotLogs/dt-workflow/MultipleOLTScenarios"
+      }
+      steps {
+        sh """
+        mkdir -p $ROBOT_LOGS_DIR
+        if ( ${powerSwitch} ); then
+             export ROBOT_MISC_ARGS="--removekeywords wuks -L TRACE -i functionalDt -i PowerSwitch -e bbsim -e notready -d $ROBOT_LOGS_DIR -v POD_NAME:${configFileName} -v KUBERNETES_CONFIGS_DIR:$WORKSPACE/${configBaseDir}/${configKubernetesDir} -v container_log_dir:$WORKSPACE"
+        else
+             export ROBOT_MISC_ARGS="--removekeywords wuks -L TRACE -i functionalDt -e PowerSwitch -e bbsim -e notready -d $ROBOT_LOGS_DIR -v POD_NAME:${configFileName} -v KUBERNETES_CONFIGS_DIR:$WORKSPACE/${configBaseDir}/${configKubernetesDir} -v container_log_dir:$WORKSPACE"
+        fi
+        make -C $WORKSPACE/voltha-system-tests voltha-dt-test || true
+        """
+      }
+    }
+
+
     stage('Error Scenario Tests') {
       environment {
         ROBOT_CONFIG_FILE="$WORKSPACE/${configBaseDir}/${configDeploymentDir}/${configFileName}-DT.yaml"
diff --git a/jjb/pipeline/voltha-nightly-tests-bbsim.groovy b/jjb/pipeline/voltha-nightly-tests-bbsim.groovy
index 2017c89..24c015b 100644
--- a/jjb/pipeline/voltha-nightly-tests-bbsim.groovy
+++ b/jjb/pipeline/voltha-nightly-tests-bbsim.groovy
@@ -159,6 +159,21 @@
       }
     }
 
+    stage('Multiple OLT Tests') {
+      environment {
+        ROBOT_LOGS_DIR="$WORKSPACE/RobotLogs/MultipleOLTTests"
+      }
+      steps {
+        sh '''
+           set +e
+           mkdir -p $WORKSPACE/RobotLogs
+
+           export ROBOT_MISC_ARGS="-d $ROBOT_LOGS_DIR"
+           make -C $WORKSPACE/voltha-system-tests ${makeMultiOltTarget} || true
+           '''
+      }
+    }
+
     stage('Error Tests') {
       environment {
         ROBOT_LOGS_DIR="$WORKSPACE/RobotLogs/ErrorTests"
diff --git a/jjb/voltha-e2e.yaml b/jjb/voltha-e2e.yaml
index f534efd..3d1c8e8 100644
--- a/jjb/voltha-e2e.yaml
+++ b/jjb/voltha-e2e.yaml
@@ -11,6 +11,7 @@
     make-target-failtest: bbsim-failurescenarios
     make-target-errortest: bbsim-errorscenarios
     make-target-alarmtest: bbsim-alarms-kind
+    make-target-multipleolt: bbsim-multiolt-kind
 
     jobs:
       - 'voltha-periodic-test':
@@ -21,6 +22,7 @@
           make-target-failtest: bbsim-failurescenarios
           make-target-errortest: bbsim-errorscenarios
           make-target-alarmtest: bbsim-alarms-kind
+          make-target-multipleolt: bbsim-multiolt-kind
           withAlarms: true
           code-branch: 'master'
           olts: 1
@@ -36,6 +38,7 @@
           make-target-failtest: bbsim-multiolt-failurescenarios
           make-target-errortest: bbsim-multiolt-errorscenarios
           make-target-alarmtest: bbsim-alarms-kind
+          make-target-multipleolt: bbsim-multiolt-kind
           withAlarms: false
           code-branch: 'master'
           olts: 2
@@ -50,6 +53,7 @@
           make-target-failtest: bbsim-failurescenarios
           make-target-errortest: bbsim-errorscenarios
           make-target-alarmtest: bbsim-alarms-kind
+          make-target-multipleolt: bbsim-multiolt-kind
           withAlarms: true
           make-target: functional-single-kind
           code-branch: 'master'
@@ -229,6 +233,11 @@
           description: 'Makefile target to invoke during failure/based test'
 
       - string:
+          name: makeMultiOltTarget
+          default: '{make-target-multipleolt}'
+          description: 'Makefile target to invoke during multiple olt test'
+
+      - string:
           name: makeErrortestTarget
           default: '{make-target-errortest}'
           description: 'Makefile target to invoke during error test'