VOL-1977 Run tests multiple times

Change-Id: I8665d564effeabaa363ca21a01b92f75e6211541
diff --git a/jjb/pipeline/voltha-bbsim-tests.groovy b/jjb/pipeline/voltha-bbsim-tests.groovy
index 0662499..50d160a 100644
--- a/jjb/pipeline/voltha-bbsim-tests.groovy
+++ b/jjb/pipeline/voltha-bbsim-tests.groovy
@@ -148,6 +148,7 @@
            export KUBECONFIG="$(./bin/kind get kubeconfig-path --name="voltha-minimal")"
            export VOLTCONFIG="/home/jenkins/.volt/config-minimal"
            export PATH=$WORKSPACE/kind-voltha/bin:$PATH
+           export ROBOT_MISC_ARGS="-v teardown_device:False"
            make -C $WORKSPACE/voltha/voltha-system-tests sanity-kind || true
            '''
       }
diff --git a/jjb/pipeline/voltha-go-tests.groovy b/jjb/pipeline/voltha-go-tests.groovy
index 99a2baf..464dac0 100644
--- a/jjb/pipeline/voltha-go-tests.groovy
+++ b/jjb/pipeline/voltha-go-tests.groovy
@@ -38,7 +38,7 @@
     VOLTHA_LOG_LEVEL="DEBUG"
     CONFIG_SADIS="y"
     EXTRA_HELM_FLAGS="${params.extraHelmFlags}"
-    ROBOT_MISC_ARGS="-d $WORKSPACE/RobotLogs"
+    ROBOT_MISC_ARGS="${params.extraRobotArgs} -d $WORKSPACE/RobotLogs"
   }
   stages {
 
@@ -83,7 +83,14 @@
         sh '''
            mkdir -p $WORKSPACE/RobotLogs
            git clone https://gerrit.opencord.org/voltha-system-tests
-           make -C $WORKSPACE/voltha-system-tests ${makeTarget} || true
+           for i in \$(seq 1 ${testRuns})
+           do
+             make -C $WORKSPACE/voltha-system-tests ${makeTarget}
+             kubectl -n voltha delete pod -lapp=bbsim  # VOL-2342
+             kubectl -n voltha wait pod -lapp=bbsim --for condition=Ready --timeout=60s # VOL-2342
+             http -a karaf:karaf --ignore-stdin DELETE http://localhost:8101/onos/v1/applications/org.opencord.dhcpl2relay/active > /dev/null  # VOL-2343
+             http -a karaf:karaf --ignore-stdin  POST  http://localhost:8101/onos/v1/applications/org.opencord.dhcpl2relay/active > /dev/null  # VOL-2343
+           done
            '''
       }
     }