From 4bca2eeb7fabe20112d0b9c5a4c166615124bcd0 Mon Sep 17 00:00:00 2001 From: Martin Klozik Date: Mon, 20 Nov 2017 09:40:38 +0000 Subject: ci: Skip VPP tests if needed If VPP can't be executed properly, then VPP tests will be skipped for VERIFY and MERGE jobs. It sometimes happens, that VPP can't be executed at builders used for VERIFY & MERGE jobs execution. These failures are not caused by patches themselves, but they are blocking standard review & merge process. Thus VPP tests will be suppressed in case that VPP can't be started at all. This change is not related to DAILY job, which is executed at POD dedicated to VSPERF project. It means that VPP tests are always executed by DAILY job. Change-Id: I4752601561b94a82482c403305bc3f24779f538b Signed-off-by: Martin Klozik Reviewed-by: Al Morton Reviewed-by: Christian Trautman Reviewed-by: Sridhar Rao Reviewed-by: Trevor Cooper --- ci/build-vsperf.sh | 15 +++++++++++++++ conf/integration/01_testcases.conf | 11 +++++++++++ 2 files changed, 26 insertions(+) diff --git a/ci/build-vsperf.sh b/ci/build-vsperf.sh index a8a42cee..755fb51a 100755 --- a/ci/build-vsperf.sh +++ b/ci/build-vsperf.sh @@ -213,6 +213,21 @@ function execute_vsperf() { LOG_FILE="${LOG_FILE_PREFIX}_${LOG_SUBDIR}_${DATE_SUFFIX}.log" hugepages_info > $LOG_FILE + + # check if VPP is up & running + echo " $VSPERF_BIN $OPNFVPOD --vswitch VppDpdkVhost --vnf QemuDpdkVhostUser $CONF_FILE $TESTPARAM vswitch_version_vpp >> ${LOG_FILE}2" + $VSPERF_BIN $OPNFVPOD --vswitch VppDpdkVhost --vnf QemuDpdkVhostUser $CONF_FILE $TESTPARAM vswitch_version_vpp &>> ${LOG_FILE}2 + if (grep FAILED ${LOG_FILE}2 &> /dev/null ) ; then + # VPP can't be executed or vppctl can't connect to it, so skip + # VPP tests as it is probably an issue with jenkins slave + printf " %-70s %-6s\n" "vswitch_version_vpp" "FAILED" + echo + echo "VPP is not working properly. VPP tests will be skipped." + echo + return + else + printf " %-70s %-6s\n" "vswitch_version_vpp" "OK" + fi echo " $VSPERF_BIN $OPNFVPOD --vswitch VppDpdkVhost --vnf QemuDpdkVhostUser $CONF_FILE $TESTPARAM $TESTCASES > $LOG_FILE" $VSPERF_BIN $OPNFVPOD --vswitch VppDpdkVhost --vnf QemuDpdkVhostUser $CONF_FILE $TESTPARAM $TESTCASES &>> $LOG_FILE hugepages_info >> $LOG_FILE diff --git a/conf/integration/01_testcases.conf b/conf/integration/01_testcases.conf index 647e39cc..dfc8a4c2 100644 --- a/conf/integration/01_testcases.conf +++ b/conf/integration/01_testcases.conf @@ -969,10 +969,21 @@ INTEGRATION_TESTS = [ # # VPP tests used by VERIFY and MERGE jobs by OPNFV Jenkins # + { + "Name": "vswitch_version_vpp", + "Deployment": "clean", + "Description": "VPP: vSwitch - determine VPP version and fail if it is not possible.", + "vSwitch" : "VppDpdkVhost", + "TestSteps": [ + ['vswitch', 'run_vppctl', ['show', 'version', 'verbose'], '|Version:\s+(v\d+\.\d+)'], + ['tools', 'assert', 'len(#STEP[-1][0])'], + ] + }, { "Name": "vswitch_vports_add_del_connection_vpp", "Deployment": "clean", "Description": "VPP: vSwitch - configure switch with vports, add and delete connection", + "vSwitch" : "VppDpdkVhost", "TestSteps": [ ['vswitch', 'add_switch', 'int_br0'], ['vswitch', 'add_vport', 'int_br0'], -- cgit 1.2.3-korg