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