X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=jjb%2Fscripts%2Fvpp%2Fcheckstyle.sh;h=00fc8bdb84b5fc00fd180a7c03dd8c4e74f3cff5;hb=7b4321b0bb2ce96fc2dd64e975f1afb3bc7884a3;hp=55aa62a5393ec9374ad9e0327e2f01d7a7d6adfe;hpb=2c152b9513e4a85a2486771420b2f6b541d4e54f;p=ci-management.git diff --git a/jjb/scripts/vpp/checkstyle.sh b/jjb/scripts/vpp/checkstyle.sh old mode 100644 new mode 100755 index 55aa62a53..00fc8bdb8 --- a/jjb/scripts/vpp/checkstyle.sh +++ b/jjb/scripts/vpp/checkstyle.sh @@ -15,6 +15,25 @@ echo "---> jjb/scripts/vpp/checkstyle.sh" +# If mlx_rdma_dpdk_matrix.txt file has been updated in the current changeset, +# verify the current rdma-core_version and dpdk_version exist in the matrix +# file +LINE="*******************************************************************" +BUILD_EXT_DIR="build/external" +MATRIX_FILE="$BUILD_EXT_DIR/mlx_rdma_dpdk_matrix.txt" +PKGS_DIR="$BUILD_EXT_DIR/packages" +if git show --stat | grep -q "$MATRIX_FILE" ; then + RDMA_CORE_VERSION="$(grep rdma-core_version $PKGS_DIR/rdma-core.mk | grep -v '(' | mawk '{print $3}')" + DPDK_VERSION="$(grep dpdk_version $PKGS_DIR/dpdk.mk | grep -v '(' | mawk '{print $3}')" + CURRENT_MATRIX="rdma=$RDMA_CORE_VERSION dpdk=$DPDK_VERSION" + if grep -q "$CURRENT_MATRIX" "$MATRIX_FILE"; then + echo -e "$LINE\n* DPDK/RDMA-CORE matrix file update successfully verified\n$LINE" + else + echo -e "$LINE\n* ERROR: 'rdma=$RDMA_CORE_VERSION dpdk=$DPDK_VERSION' not found in $MATRIX_FILE!\n$LINE" + exit 1 + fi +fi + if [ -n "$(grep -E '^checkstyle:' Makefile)" ] then make checkstyle