diff options
author | Peter Mikus <pmikus@cisco.com> | 2018-06-04 05:46:31 +0000 |
---|---|---|
committer | Peter Mikus <pmikus@cisco.com> | 2018-06-04 07:18:03 +0000 |
commit | 114c67ed87774ba816914e812b9c0729667e55d1 (patch) | |
tree | 720c9182fc0fab07f09adedb6768722a46802acf /jjb/csit/include-raw-csit-dpdk-perf-mrr-weekly.sh | |
parent | 93a8d83afaaa00ccd76bd19ad01ca8d580487ca2 (diff) |
Introduce of DPDK MRR weekly job
Purpose of the job is to verify latest DPDK performance weekly.
Change-Id: Id49e69183b2fba8510593fb6f6990df1dcbcf99d
Signed-off-by: Peter Mikus <pmikus@cisco.com>
Diffstat (limited to 'jjb/csit/include-raw-csit-dpdk-perf-mrr-weekly.sh')
-rw-r--r-- | jjb/csit/include-raw-csit-dpdk-perf-mrr-weekly.sh | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/jjb/csit/include-raw-csit-dpdk-perf-mrr-weekly.sh b/jjb/csit/include-raw-csit-dpdk-perf-mrr-weekly.sh new file mode 100644 index 000000000..8995ae973 --- /dev/null +++ b/jjb/csit/include-raw-csit-dpdk-perf-mrr-weekly.sh @@ -0,0 +1,54 @@ +#!/bin/bash +set -xeu -o pipefail + +# check BRANCH_ID value +if [ "$BRANCH_ID" == "" ]; then + echo "branch_id not provided => 'master' will be used" + BRANCH_ID="master" +fi + +# make sure there is no csit directory +if [ -d "./csit/" ]; then + rm -rf ./csit/ +fi + +# clone csit +git clone --depth 1 --no-single-branch https://gerrit.fd.io/r/csit + +# if the git clone fails, complain clearly and exit +if [ $? != 0 ]; then + echo "Failed to run: git clone --depth 1 --no-single-branch https://gerrit.fd.io/r/csit" + exit 1 +fi + +cd csit + +# get the latest verified version of the required branch +BRANCH_NAME=$(echo $(git branch -r | grep -E "${BRANCH_ID}-[0-9]+" | tail -n 1)) + +if [ "${BRANCH_NAME}" == "" ]; then + echo "No verified version found for requested branch - exiting" + exit 1 +fi + +# remove 'origin/' from the branch name +BRANCH_NAME=$(echo ${BRANCH_NAME#origin/}) + +# checkout to the required branch +git checkout ${BRANCH_NAME} + +export TEST_TAG="PERFTEST_MRR_DAILY" + +# execute csit bootstrap script if it exists +if [ -e bootstrap-verify-perf-DPDK.sh ] +then + # make sure that bootstrap.sh is executable + chmod +x bootstrap-verify-perf-DPDK.sh + # run the script + ./bootstrap-verify-perf-DPDK.sh +else + echo 'ERROR: No bootstrap-verify-perf-DPDK.sh found' + exit 1 +fi + +# vim: ts=4 ts=4 sts=4 et : |