Supporting DT workflow in tucson pipeline
Change-Id: I8e28d56db6353f2072affc78654a30564d65aaac
diff --git a/jjb/pipeline/voltha/master/tucson-build-and-test.groovy b/jjb/pipeline/voltha/master/tucson-build-and-test.groovy
index f2070fe..18a66c8 100644
--- a/jjb/pipeline/voltha/master/tucson-build-and-test.groovy
+++ b/jjb/pipeline/voltha/master/tucson-build-and-test.groovy
@@ -53,6 +53,11 @@
sh returnStdout: true, script: "rm -rf ${configBaseDir}"
sh returnStdout: true, script: "git clone -b master ${cordRepoUrl}/${configBaseDir}"
script {
+
+ if (params.workflow.toUpperCase() == "TT") {
+ error("The Tucson POD does not support TT workflow at the moment")
+ }
+
if ( params.workflow.toUpperCase() == "DT" ) {
deployment_config = readYaml file: "${configBaseDir}/${configDeploymentDir}/${configFileName}-DT.yaml"
}
@@ -247,14 +252,28 @@
stage('Run E2E Tests') {
steps {
script {
+ // different workflows need different make targets and different robot files
if ( params.workflow.toUpperCase() == "DT" ) {
robotConfigFile = "${configBaseDir}/${configDeploymentDir}/${configFileName}-DT.yaml"
+ robotFile = "Voltha_DT_PODTests.robot"
+ makeTarget = "voltha-dt-test"
+ robotFunctionalKeyword = "-i functionalDt"
+ robotDataplaneKeyword = "-i dataplaneDt"
}
else if ( params.workflow.toUpperCase() == "TT" ) {
+ // TODO the TT tests have diffent tags, address once/if TT is support on the Tucson POD
robotConfigFile = "${configBaseDir}/${configDeploymentDir}/${configFileName}-TT.yaml"
+ robotFile = "Voltha_TT_PODTests.robot"
+ makeTarget = "voltha-tt-test"
+ robotFunctionalKeyword = "-i functionalTt"
+ robotDataplaneKeyword = "-i dataplaneTt"
}
else {
robotConfigFile = "${configBaseDir}/${configDeploymentDir}/${configFileName}.yaml"
+ robotFile = "Voltha_PODTests.robot"
+ makeTarget = "voltha-test"
+ robotFunctionalKeyword = "-i functional"
+ robotDataplaneKeyword = "-i dataplane"
}
}
sh returnStdout: false, script: """
@@ -262,22 +281,22 @@
export ROBOT_CONFIG_FILE="$WORKSPACE/${robotConfigFile}"
export ROBOT_MISC_ARGS="${params.extraRobotArgs} --removekeywords wuks -d $WORKSPACE/RobotLogs -v container_log_dir:$WORKSPACE "
- export ROBOT_FILE="Voltha_PODTests.robot"
+ export ROBOT_FILE="${robotFile}"
# 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 [[ "${gerritComment}" =~ \$REGEX ]]; then
- ROBOT_MISC_ARGS+="-i functional"
+ ROBOT_MISC_ARGS+="${robotFunctionalKeyword} "
fi
# Likewise for dataplane tests
REGEX="dataplane tests"
if [[ "${gerritComment}" =~ \$REGEX ]]; then
- ROBOT_MISC_ARGS+="-i dataplane"
+ ROBOT_MISC_ARGS+="${robotDataplaneKeyword}"
fi
- make -C $WORKSPACE/voltha-system-tests voltha-test || true
+ make -C $WORKSPACE/voltha-system-tests ${makeTarget} || true
"""
}
}