From patchwork Fri Oct 27 09:00:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 117305 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp519653qgn; Fri, 27 Oct 2017 02:01:38 -0700 (PDT) X-Google-Smtp-Source: ABhQp+RKVeTxo5skTXDvCpdTsGSxa7eNgIM56naTG5y5Ib5lomfbTWqmt9WdiL4O4cRsmT/TQKid X-Received: by 10.36.194.135 with SMTP id i129mr2327158itg.144.1509094898296; Fri, 27 Oct 2017 02:01:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509094898; cv=none; d=google.com; s=arc-20160816; b=adFw8205rDCp3Myn8Pxm6wEdbIj+74r5oLuSIwmN6ZDPUntRvf+IR4bPCM1QIcfsXZ lXttYbxTOOLnefcVN1aIge8hOUN33qxB+h+PTtJf+c/ytiJopETAdKm+aZv1FKFv0/Qu RtxL9DfdbNwhSVIH1I+p1uqG1705AqiADumjgeMqvsACgfcvzx7ox6YnQgbxmB/W9BdR btLFpFIqwH0TzwFyBD9YF77Hq7s4P2KLo68q0tM8DZplh4hYPwGke/ctsVeQtRO+62p7 DPj5DzEEJnZ0aKKOc3Iw8sk4ZHwYTWZlHzEM45JIgypvV17SUbHtcOB8iEJSETy+IByw twGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=jC+Jct9dc5uRNBhj8oJ/e5SS6Pzceuu5Xl2xJRxlDWI=; b=mvjLV9P2aphMabGfj/SS3TjL8J8NIBUTy902kOcyTSKADNU/tyTasWcoiGGBj07QyZ VJ6/ceWlif2RAYAQ7QvPh3OSNeQMDJoyuP8KK7eQM2Kc8+TeGaPdPy52v4gnAKlucFkm GuZjNjEkYjC22eCTlTfzqE4RbLSwlP6SlRcusANm54dSlnKJKLfbDpxPk2QdzsrRj/EU fwZNnET9m4CrB0g9rzjd3T0RG8T2dDT/VL+B1QhNTxtoBPCG1JWhBrpP5b9WQOvsJc5N F8eBWqjboSs/2DiPnFacGOwGySIIMFzjZgQh347w8BDNRiJbZt69XozyTyS5/g3GO/pN fQ4g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id e187si998000ita.0.2017.10.27.02.01.37; Fri, 27 Oct 2017 02:01:38 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id C8D3D62951; Fri, 27 Oct 2017 09:01:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 9AA7D618C8; Fri, 27 Oct 2017 09:01:05 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 19DF961039; Fri, 27 Oct 2017 09:00:49 +0000 (UTC) Received: from forward104o.mail.yandex.net (forward104o.mail.yandex.net [37.140.190.179]) by lists.linaro.org (Postfix) with ESMTPS id CD48C60973 for ; Fri, 27 Oct 2017 09:00:42 +0000 (UTC) Received: from mxback8o.mail.yandex.net (mxback8o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::22]) by forward104o.mail.yandex.net (Yandex) with ESMTP id 6D363706A0F for ; Fri, 27 Oct 2017 12:00:41 +0300 (MSK) Received: from smtp1j.mail.yandex.net (smtp1j.mail.yandex.net [2a02:6b8:0:801::ab]) by mxback8o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id XxN5QJjwYR-0fr05K7h; Fri, 27 Oct 2017 12:00:41 +0300 Received: by smtp1j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id p3d96whbUT-0erCwmXY; Fri, 27 Oct 2017 12:00:40 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Fri, 27 Oct 2017 12:00:06 +0300 Message-Id: <1509094806-15430-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1509094806-15430-1-git-send-email-odpbot@yandex.ru> References: <1509094806-15430-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 263 Subject: [lng-odp] [PATCH v1 1/1] travis: fix script to check patches to not fail on new branch X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Maxim Uvarov Signed-off-by: Maxim Uvarov --- /** Email created from pull request 263 (muvarov:master_fixscripts) ** https://github.com/Linaro/odp/pull/263 ** Patch: https://github.com/Linaro/odp/pull/263.patch ** Base sha: 3edee38da55876e36f654a5d1a4b87c2ea5b8bfe ** Merge commit sha: 7470cdbf6ae96d7e9842196b4842063fdfb2416c **/ .travis.yml | 1 - scripts/ci-checkpatches.sh | 22 ++++++++++++++-------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2d3971718..7632ae3fe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -279,7 +279,6 @@ jobs: script: - echo ${TRAVIS_COMMIT_RANGE}; - ODP_PATCHES=`echo ${TRAVIS_COMMIT_RANGE} | sed 's/\.//'`; - - if [ -z "${ODP_PATCHES}" ]; then env; exit 0; fi; - ./scripts/ci-checkpatches.sh ${ODP_PATCHES}; after_failure: diff --git a/scripts/ci-checkpatches.sh b/scripts/ci-checkpatches.sh index cb1c4e65d..798efe052 100755 --- a/scripts/ci-checkpatches.sh +++ b/scripts/ci-checkpatches.sh @@ -1,17 +1,23 @@ -#!/bin/bash +#!/bin/bash -x PATCHES=$1 echo "Run checkpatch for ${PATCHES}" # Generate patches provided with $1. # In case of force push and range is broken # validate only the latest commit if it's not merge commit. -git format-patch ${PATCHES} + +if [ "$PATCHES" = "" ]; then + git format-patch -1 HEAD; + perl ./scripts/checkpatch.pl *.patch; + exit $? +fi + +git show --summary HEAD| grep -q '^Merge:'; if [ $? -ne 0 ]; then - git show --summary HEAD| grep -q '^Merge:'; - if [ $? -ne 0 ]; then - git format-patch HEAD^; - perl ./scripts/checkpatch.pl *.patch; - fi; -else + git format-patch -1 HEAD; perl ./scripts/checkpatch.pl *.patch; + exit $? fi + +git format-patch ${PATCHES} +perl ./scripts/checkpatch.pl *.patch;