ci: Skip VPP tests if needed
[vswitchperf.git] / ci / build-vsperf.sh
1 #!/bin/bash
2 #
3 # Copyright 2015-2017 Intel Corporation.
4 #
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
8 #
9 #   http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16
17 # VSPERF nightly build execution script
18
19 # Usage:
20 #       build-vsperf.sh job_type
21 #   where job_type is one of "verify", "merge", "daily"
22
23 #
24 # exit codes
25 #
26
27 EXIT=0
28 EXIT_TC_FAILED=1
29 EXIT_SANITY_TC_FAILED=2
30 EXIT_PYLINT_FAILED=4
31 EXIT_NO_RESULTS=128
32 EXIT_NO_TEST_REPORT_LOG_DIR=256
33
34 #
35 # configuration
36 #
37
38 VSPERF_BIN='./vsperf'
39 LOG_FILE_PREFIX="/tmp/vsperf_build"
40 DATE=$(date -u +"%Y-%m-%d_%H-%M-%S")
41 BRANCH=${GIT_BRANCH##*/}
42 VSPERFENV_DIR="$HOME/vsperfenv"
43 RESULTS_ARCHIVE="$HOME/ci_results_archive"
44
45 # CI job specific configuration
46 # VERIFY - run basic set of TCs with default settings
47 TESTCASES_VERIFY="vswitch_add_del_bridge vswitch_add_del_bridges vswitch_add_del_vport vswitch_add_del_vports vswitch_vports_add_del_flow"
48 TESTPARAM_VERIFY="--integration"
49 TESTCASES_VERIFY_VPP="vswitch_add_del_bridge vswitch_add_del_bridges vswitch_add_del_vport vswitch_add_del_vports vswitch_vports_add_del_connection_vpp"
50 TESTPARAM_VERIFY_VPP=$TESTPARAM_VERIFY
51 # MERGE - run selected TCs with default settings
52 TESTCASES_MERGE=$TESTCASES_VERIFY
53 TESTPARAM_MERGE=$TESTPARAM_VERIFY
54 TESTCASES_MERGE_VPP=$TESTCASES_VERIFY_VPP
55 TESTPARAM_MERGE_VPP=$TESTPARAM_VERIFY_VPP
56 # DAILY - run selected TCs for defined packet sizes
57 TESTCASES_DAILY='phy2phy_tput back2back phy2phy_tput_mod_vlan phy2phy_scalability pvp_tput pvp_back2back pvvp_tput pvvp_back2back'
58 TESTCASES_DAILY_VPP='phy2phy_tput_vpp phy2phy_back2back_vpp pvp_tput_vpp pvp_back2back_vpp pvvp_tput_vpp pvvp_back2back_vpp'
59 TESTPARAM_DAILY='--test-params TRAFFICGEN_PKT_SIZES=(64,128,512,1024,1518)'
60 TESTPARAM_DAILY_VPP=$TESTPARAM_DAILY
61 TESTCASES_SRIOV='pvp_tput'
62 TESTPARAM_SRIOV='--test-params TRAFFICGEN_PKT_SIZES=(64,128,512,1024,1518)'
63 # check if user config file exists if not then we will use default settings
64 if [ -f $HOME/vsperf-${BRANCH}.conf ] ; then
65     # branch specific config was found
66     CONF_FILE="--conf-file ${HOME}/vsperf-${BRANCH}.conf"
67 else
68     if [ -f $HOME/vsperf.conf ] ; then
69         CONF_FILE="--conf-file ${HOME}/vsperf.conf"
70     else
71         CONF_FILE=""
72     fi
73 fi
74 # check if sriov specific config file exists if not then use default configuration
75 if [ -f $HOME/vsperf-${BRANCH}.conf.sriov ] ; then
76     CONF_FILE_SRIOV="${CONF_FILE}.sriov"
77 else
78     CONF_FILE_SRIOV=$CONF_FILE
79 fi
80
81 # Test report related configuration
82 TEST_REPORT_PARTIAL="*_test_report.rst"
83 TEST_REPORT_DIR="${WORKSPACE}/docs/testing/developer/devguide/results"
84 TEST_REPORT_INDEX="${TEST_REPORT_DIR}/index.rst"
85 TEST_REPORT_LINK_OLD="https://wiki.opnfv.org/wiki/vsperf_results"
86 TEST_REPORT_FILE="${WORKSPACE}/docs_output/testing_developer_devguide_results/index.html"
87 TEST_REPORT_TARBALL="vswitchperf_logs_${DATE}.tar.gz"
88
89 if [[ "x${BRANCH}" == "xmaster" ]]; then
90     TEST_REPORT_LINK_NEW="https://artifacts.opnfv.org/logs/$PROJECT/$NODE_NAME/$DATE/${TEST_REPORT_TARBALL}"
91 else
92     TEST_REPORT_LINK_NEW="https://artifacts.opnfv.org/logs/$PROJECT/$NODE_NAME/$BRANCH/$DATE/${TEST_REPORT_TARBALL}"
93 fi
94
95 TEST_REPORT_LOG_DIR="${HOME}/opnfv/$PROJECT/results/$BRANCH"
96
97 #
98 # functions
99 #
100
101 # terminate vsperf and all its utilities
102 # it is expected that vsperf is the only python3 app
103 # and no other ovs or qemu instances are running
104 # at CI machine
105 # parameters:
106 #   none
107 function terminate_vsperf() {
108     sudo pkill stress &> /dev/null
109     sudo pkill python3 &> /dev/null
110     sudo killall -9 qemu-system-x86_64 &> /dev/null
111
112     # sometimes qemu resists to terminate, so wait a bit and kill it again
113     if pgrep qemu-system-x86_64 &> /dev/null ; then
114         sleep 5
115         sudo killall -9 qemu-system-x86_64 &> /dev/null
116         sleep 5
117     fi
118
119     sudo pkill ovs-vswitchd &> /dev/null
120     sleep 1
121     sudo pkill ovsdb-server &> /dev/null
122     sleep 1
123 }
124
125 # check and print testcase execution status
126 # parameters:
127 #   $1 - directory with results
128 function print_results() {
129     for i in $TESTCASES ; do
130         if [ ! -e $1 ] ; then
131             printf "    %-70s %-6s\n" "result_${i}" "FAILED"
132             EXIT=$EXIT_TC_FAILED
133         else
134             RES_FILE=`ls -1 $1 | egrep "result_${i}_[0-9a-zA-Z\-]+.csv"`
135
136             if [ "x$RES_FILE" != "x" -a -e "${1}/${RES_FILE}" ]; then
137                 if grep ^FAILED "${1}/${RES_FILE}" &> /dev/null ; then
138                     printf "    %-70s %-6s\n" "result_${i}" "FAILED"
139                     EXIT=$EXIT_TC_FAILED
140                 else
141                     printf "    %-70s %-6s\n" "result_${i}" "OK"
142                 fi
143             else
144                 printf "    %-70s %-6s\n" "result_${i}" "FAILED"
145                 EXIT=$EXIT_TC_FAILED
146             fi
147         fi
148     done
149 }
150
151 # execute tests and display results
152 # parameters:
153 #   $1 - vswitch and vnf combination, one of OVS_vanilla, OVS_with_DPDK_and_vHost_User
154 #   $2 - CI job type, one of verify, merge, daily
155 function execute_vsperf() {
156     OPNFVPOD=""
157     # figure out list of TCs and execution parameters
158     case $2 in
159         "verify")
160             if [ "$1" == "VPP" ] ; then
161                 TESTPARAM=$TESTPARAM_VERIFY_VPP
162                 TESTCASES=$TESTCASES_VERIFY_VPP
163             else
164                 TESTPARAM=$TESTPARAM_VERIFY
165                 TESTCASES=$TESTCASES_VERIFY
166             fi
167             ;;
168         "merge")
169             if [ "$1" == "VPP" ] ; then
170                 TESTPARAM=$TESTPARAM_MERGE_VPP
171                 TESTCASES=$TESTCASES_MERGE_VPP
172             else
173                 TESTPARAM=$TESTPARAM_MERGE
174                 TESTCASES=$TESTCASES_MERGE
175             fi
176             ;;
177         *)
178             # by default use daily build and upload results to the OPNFV databse
179             if [ "$1" == "VPP" ] ; then
180                 TESTPARAM=$TESTPARAM_DAILY_VPP
181                 TESTCASES=$TESTCASES_DAILY_VPP
182                 # don't report VPP results into testresults DB, until TC name mapping
183                 # for VPP tests will be defined
184                 #OPNFVPOD="--opnfvpod=$NODE_NAME"
185             else
186                 TESTPARAM=$TESTPARAM_DAILY
187                 TESTCASES=$TESTCASES_DAILY
188                 OPNFVPOD="--opnfvpod=$NODE_NAME"
189             fi
190             ;;
191     esac
192
193     # execute testcases
194     echo -e "\nExecution of VSPERF for $1"
195
196     DATE_SUFFIX=$(date -u +"%Y-%m-%d_%H-%M-%S")
197
198     case $1 in
199         "SRIOV")
200             # use SRIOV specific TCs and configuration
201             TESTPARAM=$TESTPARAM_SRIOV
202             TESTCASES=$TESTCASES_SRIOV
203             # figure out log file name
204             LOG_SUBDIR="SRIOV"
205             LOG_FILE="${LOG_FILE_PREFIX}_${LOG_SUBDIR}_${DATE_SUFFIX}.log"
206
207             echo "    $VSPERF_BIN --vswitch none --vnf QemuPciPassthrough $CONF_FILE_SRIOV $TESTPARAM $TESTCASES &> $LOG_FILE"
208             $VSPERF_BIN --vswitch none --vnf QemuPciPassthrough $CONF_FILE_SRIOV $TESTPARAM $TESTCASES &> $LOG_FILE
209             ;;
210         "VPP")
211             # figure out log file name
212             LOG_SUBDIR="VppDpdkVhost"
213             LOG_FILE="${LOG_FILE_PREFIX}_${LOG_SUBDIR}_${DATE_SUFFIX}.log"
214
215             hugepages_info > $LOG_FILE
216
217             # check if VPP is up & running
218             echo "    $VSPERF_BIN $OPNFVPOD --vswitch VppDpdkVhost --vnf QemuDpdkVhostUser $CONF_FILE $TESTPARAM vswitch_version_vpp >> ${LOG_FILE}2"
219             $VSPERF_BIN $OPNFVPOD --vswitch VppDpdkVhost --vnf QemuDpdkVhostUser $CONF_FILE $TESTPARAM vswitch_version_vpp &>> ${LOG_FILE}2
220             if (grep FAILED ${LOG_FILE}2 &> /dev/null ) ; then
221                 # VPP can't be executed or vppctl can't connect to it, so skip
222                 # VPP tests as it is probably an issue with jenkins slave
223                 printf "    %-70s %-6s\n" "vswitch_version_vpp" "FAILED"
224                 echo
225                 echo "VPP is not working properly. VPP tests will be skipped."
226                 echo
227                 return
228             else
229                 printf "    %-70s %-6s\n" "vswitch_version_vpp" "OK"
230             fi
231             echo "    $VSPERF_BIN $OPNFVPOD --vswitch VppDpdkVhost --vnf QemuDpdkVhostUser $CONF_FILE $TESTPARAM $TESTCASES > $LOG_FILE"
232             $VSPERF_BIN $OPNFVPOD --vswitch VppDpdkVhost --vnf QemuDpdkVhostUser $CONF_FILE $TESTPARAM $TESTCASES &>> $LOG_FILE
233             hugepages_info >> $LOG_FILE
234             ;;
235         "OVS_vanilla")
236             # figure out log file name
237             LOG_SUBDIR="OvsVanilla"
238             LOG_FILE="${LOG_FILE_PREFIX}_${LOG_SUBDIR}_${DATE_SUFFIX}.log"
239
240             echo "    $VSPERF_BIN $OPNFVPOD --vswitch OvsVanilla --vnf QemuVirtioNet $CONF_FILE $TESTPARAM $TESTCASES &> $LOG_FILE"
241             $VSPERF_BIN $OPNFVPOD --vswitch OvsVanilla --vnf QemuVirtioNet $CONF_FILE $TESTPARAM $TESTCASES &> $LOG_FILE
242             ;;
243         *)
244             # figure out log file name
245             LOG_SUBDIR="OvsDpdkVhost"
246             LOG_FILE="${LOG_FILE_PREFIX}_${LOG_SUBDIR}_${DATE_SUFFIX}.log"
247
248             hugepages_info > $LOG_FILE
249             echo "    $VSPERF_BIN $OPNFVPOD --vswitch OvsDpdkVhost --vnf QemuDpdkVhostUser $CONF_FILE $TESTPARAM $TESTCASES > $LOG_FILE"
250             $VSPERF_BIN $OPNFVPOD --vswitch OvsDpdkVhost --vnf QemuDpdkVhostUser $CONF_FILE $TESTPARAM $TESTCASES &>> $LOG_FILE
251             hugepages_info >> $LOG_FILE
252             ;;
253     esac
254
255     # evaluation of results
256     echo -e "\nResults for $1"
257     RES_DIR="/$(grep "Creating result directory" $LOG_FILE | cut -d'/' -f2-)"
258     if [[ "/" == "${RES_DIR}" ]] ; then
259         echo "FAILURE: Results are not available."
260         echo "-------------------------------------------------------------------"
261         cat $LOG_FILE
262         echo "-------------------------------------------------------------------"
263         exit $EXIT_NO_RESULTS
264     else
265         print_results "${RES_DIR}"
266         if [ $(($EXIT & $EXIT_TC_FAILED)) -gt 0 ] ; then
267             echo "-------------------------------------------------------------------"
268             cat $LOG_FILE
269             echo "-------------------------------------------------------------------"
270         fi
271     fi
272
273     # show detailed result figures
274     for md_file in $(grep '\.md"$' $LOG_FILE | cut -d'"' -f2); do
275         # TC resut file header
276         echo -e "\n-------------------------------------------------------------------"
277         echo -e " $md_file"
278         echo -e "-------------------------------------------------------------------\n"
279         # TC details
280         sed -n '/^- Test ID/,/Bidirectional/{/Packet size/b;p;/Bidirectional/q};/Results\/Metrics Collected/,/Statistics collected/{/^$/p;/^|/p}' $md_file
281         # TC results
282         sed -n '/Results\/Metrics Collected/,/Statistics collected/{/^$/p;/^|/p}' $md_file | grep -v "Unknown" | cat -s
283     done
284
285     # add test results into the final doc template
286     for report in ${RES_DIR}/${TEST_REPORT_PARTIAL} ; do
287         # modify link to the artifactory with test report and logs
288         if [ -f $report ] ; then
289             sed -i -e "s,$TEST_REPORT_LINK_OLD,$TEST_REPORT_LINK_NEW," "$report"
290             cp $report $TEST_REPORT_DIR
291             echo "   $(basename $report)" >> $TEST_REPORT_INDEX
292         fi
293     done
294
295     # copy logs into dedicated directory
296     mkdir ${TEST_REPORT_LOG_DIR}/${LOG_SUBDIR}
297     [ -f "$LOG_FILE" ] && cp -a "${LOG_FILE}" "${TEST_REPORT_LOG_DIR}/${LOG_SUBDIR}" &> /dev/null
298     [ -d "$RES_DIR" ] && cp -ar "$RES_DIR" "${TEST_REPORT_LOG_DIR}/${LOG_SUBDIR}" &> /dev/null
299 }
300
301 # generates final test_report in PDF and HTML formats
302 function generate_report() {
303
304     # prepare final tarball with all logs...
305     tar --exclude "${TEST_REPORT_TARBALL}" -czf "${TEST_REPORT_LOG_DIR}/${TEST_REPORT_TARBALL}" $(find "${TEST_REPORT_LOG_DIR}" -mindepth 1 -maxdepth 1 -type d)
306     # ...and move original log files to the archive directory...
307     find "${TEST_REPORT_LOG_DIR}" -maxdepth 2 -name "results_*" -type d -exec mv \{\} ${RESULTS_ARCHIVE} \;
308     # ...and remove the rest
309     find "${TEST_REPORT_LOG_DIR}" -mindepth 1 -maxdepth 1 -type d -exec rm -rf \{\} \;
310
311     # clone opnfvdocs repository
312     echo "Cloning opnfvdocs repository..."
313     [ -d opnfvdocs ] && rm -rf opnfvdocs
314     git clone https://gerrit.opnfv.org/gerrit/opnfvdocs &> /dev/null
315
316     # generate final docs with test results
317     echo "Generating test report..."
318     sed -ie 's,python ,python2 ,g' ./opnfvdocs/scripts/docs-build.sh
319     OPNFVDOCS_DIR='./opnfvdocs' ./opnfvdocs/scripts/docs-build.sh &> /dev/null
320
321     # store HTML report with test results into dedicated directory
322     if [ -f $TEST_REPORT_FILE ] ; then
323         cp -ar $TEST_REPORT_FILE $(dirname $TEST_REPORT_FILE)/_static $TEST_REPORT_LOG_DIR
324         echo "Final test report has been created."
325     else
326         echo "FAILURE: Generation of final test report has failed."
327     fi
328 }
329
330 # generates graphs from recent test results
331 function generate_and_push_graphs() {
332     # create graphs from results in archive directory
333     ./ci/plot-results.sh "$1" "$2" "$RESULTS_ARCHIVE"
334
335     # push graphs into artifactory
336     if ls *png &> /dev/null ; then
337         gsutil cp *png gs://artifacts.opnfv.org/logs/vswitchperf/intel-pod12/graphs/
338     else
339         echo "Graphs were not created."
340     fi
341 }
342
343 # pushes test report and logs collected during test execution into artifactory
344 function push_results_to_artifactory() {
345     # clone releng repository
346     echo "Cloning releng repository..."
347     [ -d releng ] && rm -rf releng
348     git clone https://gerrit.opnfv.org/gerrit/releng &> /dev/null
349
350     echo "Pushing results and logs into artifactory..."
351     . ./releng/utils/push-test-logs.sh "$DATE"
352
353     # enter workspace as it could be modified by 3rd party script
354     cd $WORKSPACE
355 }
356
357 # removes any local changes of repository
358 function cleanup() {
359     echo "Cleaning up..."
360     git stash -u
361 }
362
363 # prepares directory for logs collection and removes old logs
364 function initialize_logdir() {
365     if [[ "x$TEST_REPORT_LOG_DIR" == "x" ]] ; then
366         echo "FAILURE: Logging directory is not defined. Logs and report cannot be published!"
367         exit $EXIT_NO_TEST_REPORT_LOG_DIR
368     else
369         # remove TEST_REPORT_LOG_DIR if it exists
370         if [ -e $TEST_REPORT_LOG_DIR ] ; then
371             if [ -f $TEST_REPORT_LOG_DIR ] ; then
372                 rm $TEST_REPORT_LOG_DIR
373             else
374                 rm -rf ${TEST_REPORT_LOG_DIR}
375             fi
376         fi
377         # create TEST_REPORT_LOG_DIR
378         mkdir -p $TEST_REPORT_LOG_DIR
379     fi
380 }
381
382 # verify basic vsperf functionality
383 function execute_vsperf_sanity() {
384     DATE_SUFFIX=$(date -u +"%Y-%m-%d_%H-%M-%S")
385     LOG_FILE="${LOG_FILE_PREFIX}_sanity_${DATE_SUFFIX}.log"
386     echo "Execution of VSPERF sanity checks:"
387     for PARAM in '--version' '--help' '--list-trafficgens' '--list-collectors' '--list-vswitches' '--list-fwdapps' '--list-vnfs' '--list-loadgens' '--list-settings' '--list' '--integration --list'; do
388         echo -e "-------------------------------------------------------------------" >> $LOG_FILE
389         echo "$VSPERF_BIN $PARAM $CONF_FILE" >> $LOG_FILE
390         echo -e "-------------------------------------------------------------------" >> $LOG_FILE
391         $VSPERF_BIN $PARAM $CONF_FILE &>> $LOG_FILE
392         if $VSPERF_BIN $PARAM $CONF_FILE &>> $LOG_FILE ; then
393             printf "    %-70s %-6s\n" "$VSPERF_BIN $PARAM" "OK"
394         else
395             printf "    %-70s %-6s\n" "$VSPERF_BIN $PARAM" "FAILED"
396             EXIT=$EXIT_SANITY_TC_FAILED
397         fi
398         echo >> $LOG_FILE
399     done
400     echo "Sanity log file $LOG_FILE"
401     if [ $(($EXIT & $EXIT_SANITY_TC_FAILED)) -gt 0 ] ; then
402         echo "-------------------------------------------------------------------"
403         cat $LOG_FILE
404         echo "-------------------------------------------------------------------"
405     fi
406 }
407
408 # execute pylint to check code quality
409 function execute_vsperf_pylint_check() {
410     if ! ./check -b ; then
411         EXIT=$EXIT_PYLINT_FAILED
412     fi
413 }
414
415 # check and install required packages at nodes running VERIFY and MERGE jobs
416 function dependencies_check() {
417     . /etc/os-release
418     if [ $ID == "ubuntu" ] ; then
419         echo "Dependencies check"
420         echo "=================="
421         # install system packages
422         for PACKAGE in "python3-tk" "sysstat" "bc" ; do
423             if dpkg -s $PACKAGE &> /dev/null ; then
424                 printf "    %-70s %-6s\n" $PACKAGE "OK"
425             else
426                 printf "    %-70s %-6s\n" $PACKAGE "missing"
427                 sudo apt-get install -y $PACKAGE
428             fi
429         done
430         # install additional python packages into python environment
431         for PACKAGE in "pylint" ; do
432             if pip show $PACKAGE &> /dev/null ; then
433                 printf "    %-70s %-6s\n" $PACKAGE "OK"
434             else
435                 printf "    %-70s %-6s\n" $PACKAGE "missing"
436                 pip install $PACKAGE
437             fi
438         done
439         echo
440     fi
441 }
442
443 # configure hugepages
444 function configure_hugepages() {
445     HP_MAX=8192
446     HP_REQUESTED=3072
447     HP_NR=`cat /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages`
448     HP_FREE=`cat /sys/devices/system/node/node0/hugepages/hugepages-2048kB/free_hugepages`
449     # check if HP must be (re)configured
450     if [ $HP_FREE -lt $HP_REQUESTED ] ; then
451         HP_NR_NEW=$(($HP_NR+($HP_REQUESTED-$HP_FREE)))
452         if [ $HP_NR_NEW -gt $HP_MAX ] ; then
453             HP_NR_NEW=$HP_MAX
454         fi
455         sudo bash -c "echo $HP_NR_NEW > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages"
456     fi
457
458     if [ -f /sys/devices/system/node/node1/hugepages/hugepages-2048kB/nr_hugepages ] ; then
459         sudo bash -c "echo 0 > /sys/devices/system/node/node1/hugepages/hugepages-2048kB/nr_hugepages"
460     fi
461 }
462
463 # dump hugepages configuration
464 function hugepages_info() {
465     echo "-------------------------------------------------------------------"
466     head /sys/devices/system/node/node*/hugepages/hugepages*/*
467     echo "-------------------------------------------------------------------"
468 }
469
470 #
471 # main
472 #
473
474 echo
475
476 # enter workspace dir
477 cd $WORKSPACE
478
479 # create virtualenv if needed
480 if [ ! -e $VSPERFENV_DIR ] ; then
481     echo "Create VSPERF environment"
482     echo "========================="
483     virtualenv --python=python3 "$VSPERFENV_DIR"
484     echo
485 fi
486
487 # acivate and update virtualenv
488 echo "Update VSPERF environment"
489 echo "========================="
490 source "$VSPERFENV_DIR"/bin/activate
491 pip install -r ./requirements.txt
492 echo
493
494 # VERFIY&MERGE job specific - check if required packages are installed
495 dependencies_check
496
497 # initialization
498 initialize_logdir
499
500 # configure hugepages
501 echo "Configure hugepages"
502 echo "==================="
503 configure_hugepages
504 hugepages_info | grep -v '^--'
505 echo
506
507 # execute job based on passed parameter
508 case $1 in
509     "verify")
510         echo "================="
511         echo "VSPERF verify job"
512         echo "================="
513
514         execute_vsperf_pylint_check
515         terminate_vsperf
516         execute_vsperf_sanity
517         terminate_vsperf
518         execute_vsperf OVS_with_DPDK_and_vHost_User $1
519         terminate_vsperf
520         execute_vsperf OVS_vanilla $1
521         terminate_vsperf
522         execute_vsperf VPP $1
523         terminate_vsperf
524
525         exit $EXIT
526         ;;
527     "merge")
528         echo "================"
529         echo "VSPERF merge job"
530         echo "================"
531
532         execute_pylint_check
533         terminate_vsperf
534         execute_vsperf_sanity
535         terminate_vsperf
536         execute_vsperf OVS_with_DPDK_and_vHost_User $1
537         terminate_vsperf
538         execute_vsperf OVS_vanilla $1
539         terminate_vsperf
540         execute_vsperf VPP $1
541         terminate_vsperf
542
543         exit $EXIT
544         ;;
545     *)
546         echo "================"
547         echo "VSPERF daily job"
548         echo "================"
549
550         terminate_vsperf
551         execute_vsperf OVS_with_DPDK_and_vHost_User $1
552         terminate_vsperf
553         execute_vsperf OVS_vanilla $1
554         terminate_vsperf
555         execute_vsperf VPP $1
556         terminate_vsperf
557         execute_vsperf SRIOV $1
558         terminate_vsperf
559
560         generate_report
561
562         push_results_to_artifactory
563
564         generate_and_push_graphs "$TESTCASES_DAILY" ",OvsDpdkVhost,"
565         generate_and_push_graphs "$TESTCASES_DAILY" ",OvsVanilla,"
566         generate_and_push_graphs "$TESTCASES_DAILY_VPP" ",VppDpdkVhost,"
567         generate_and_push_graphs "$TESTCASES_SRIOV" ",none,"
568
569         cleanup
570
571         exit $EXIT
572         ;;
573 esac
574
575 exit $EXIT
576
577 #
578 # end
579 #