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
'''
}
}
diff --git a/jjb/voltha-e2e.yaml b/jjb/voltha-e2e.yaml
index fdafc85..fd6122c 100644
--- a/jjb/voltha-e2e.yaml
+++ b/jjb/voltha-e2e.yaml
@@ -29,6 +29,17 @@
time-trigger: "H H/12 * * *"
- 'voltha-periodic-test':
+ name: 'periodic-voltha-sanity-test-multi-runs'
+ build-node: 'qct-pod4-node2'
+ default-image-tag: 'master'
+ code-branch: 'master'
+ make-target: sanity-multi-kind
+ onus: 1
+ pons: 1
+ test-runs: 5
+ time-trigger: "H H/3 * * *"
+
+ - 'voltha-periodic-test':
name: 'periodic-voltha-scale-test'
build-node: 'qct-pod4-node2'
default-image-tag: 'master'
@@ -36,6 +47,7 @@
make-target: scale-multi-kind
onus: 2
pons: 8
+ robot-args: '-v teardown_device:False'
time-trigger: "H H/3 * * *"
# Per-patchset Pod builds on Tucson pod
@@ -63,6 +75,8 @@
id: 'voltha-periodic-test'
name: '{name}'
pipeline-script: 'voltha-go-tests.groovy'
+ test-runs: 1
+ robot-args: ''
description: |
<!-- Managed by Jenkins Job Builder -->
@@ -105,6 +119,17 @@
default: '{code-branch}'
description: 'Repo manifest branch for code checkout (so we can display changes in Jenkins)'
+ - string:
+ name: testRuns
+ default: '{test-runs}'
+ description: 'How many times to repeat the tests'
+
+ - string:
+ name: extraRobotArgs
+ default: '{robot-args}'
+ description: 'Arguments to pass to robot'
+
+
project-type: pipeline
concurrent: true