From patchwork Mon May 22 20:00:09 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: 100314 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp1321qge; Mon, 22 May 2017 13:00:47 -0700 (PDT) X-Received: by 10.200.3.134 with SMTP id t6mr25434085qtg.238.1495483247725; Mon, 22 May 2017 13:00:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1495483247; cv=none; d=google.com; s=arc-20160816; b=ONY/o8kEX15wGspJodz92PajFNOwn+WPghqxkjT1s2CqGQTt5FNYvUuiOJ1RaWRdty WW3nLTSL/kt8IpUlwxUmKZDus7L+V0VQ4msLDVbHLK97okPhaaJrBA3R3N0VVoeIFCwH SxpIn0RqbMsUpzWYC+MsHEpQa3BHk98/h19YVEwvnRXwmiHzZek9sDhjQZSaTXZgqTgD DrQFfi0OyHXq2Who64LN3mMSxt+6+2FF8efRIuFiwLsY/DF+kQbpgkjoExxS1DswvgCP SW0nZ4QBo44+RtCfOfJfTj2qv1uMqvk4r26iwbWG5o5IfQ61GP+UZSq26qSx/He9GJDN pssg== 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=T7XNoIUFK7NmC2950uMteeUaYZ/wBPoQY0uQs52dE34=; b=WVHvAVdTYfZPKaswW8cUVCcfwF7L2l66B3eEu9Sx6keTxjp/Paz0Zm1ymkudwJkRbM VWbwuSIhJGS3028igYZm/JS7Tw0rTpI28ybDkzUgBUycoCTygEPlRSU2xkjP6/SnVT94 VVyV7uGvVh8KZqCI1IZgBhFC1YgBLjj/gSnDYpL+Idc3efR4lps6pYmz+qmGQNsxRmmJ UZJLb3CBZKL4SJF9b/1F4uk4olfkjMelajVWRVab12AhDvGjl+viqL92hlAz/j/1SiEg BXKruz9tyu7WC+mY30YzsjLIkHNE69+kFMSLioH69voC/7FqER/j5jqI2bkeWMrhOp36 YOFA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id c50si19256090qtc.249.2017.05.22.13.00.47; Mon, 22 May 2017 13:00:47 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 5DFE2607B2; Mon, 22 May 2017 20:00:47 +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 47C8260B19; Mon, 22 May 2017 20:00:27 +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 40E1C60B1A; Mon, 22 May 2017 20:00:20 +0000 (UTC) Received: from forward3p.cmail.yandex.net (forward3p.cmail.yandex.net [77.88.31.18]) by lists.linaro.org (Postfix) with ESMTPS id 2CB84606B5 for ; Mon, 22 May 2017 20:00:16 +0000 (UTC) Received: from smtp3p.mail.yandex.net (smtp3p.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b6:8]) by forward3p.cmail.yandex.net (Yandex) with ESMTP id F1CC82070C for ; Mon, 22 May 2017 23:00:13 +0300 (MSK) Received: from smtp3p.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp3p.mail.yandex.net (Yandex) with ESMTP id D179313200AB for ; Mon, 22 May 2017 23:00:13 +0300 (MSK) Received: by smtp3p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id uzgJjqSubx-0CAWuE8W; Mon, 22 May 2017 23:00:12 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) X-Yandex-Suid-Status: 1 0 From: Github ODP bot To: lng-odp@lists.linaro.org Date: Mon, 22 May 2017 23:00:09 +0300 Message-Id: <1495483210-28200-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1495483210-28200-1-git-send-email-odpbot@yandex.ru> References: <1495483210-28200-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 31 Subject: [lng-odp] [PATCH v6 1/1] travis: move code style check to separate job 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 Move this check to separate job to better see which exactly task was failed. Signed-off-by: Maxim Uvarov --- /** Email created from pull request 31 (muvarov:master_checkpatch_job) ** https://github.com/Linaro/odp/pull/31 ** Patch: https://github.com/Linaro/odp/pull/31.patch ** Base sha: f4386378e466a519d8f97923ba43ea22dec1e933 ** Merge commit sha: bb321787a0330cc9fe01816ae54995118b33ce8d **/ .travis.yml | 31 ++++++++++++++++--------------- scripts/ci-checkpatches.sh | 17 +++++++++++++++++ 2 files changed, 33 insertions(+), 15 deletions(-) create mode 100755 scripts/ci-checkpatches.sh diff --git a/.travis.yml b/.travis.yml index aa7ea010..e792af06 100644 --- a/.travis.yml +++ b/.travis.yml @@ -51,12 +51,28 @@ matrix: - llvm-toolchain-precise-3.8 packages: - clang-3.8 + - compiler: gcc + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - gcc + env: TEST="CHECKPATCH" before_install: - echo 1000 | sudo tee /proc/sys/vm/nr_hugepages - sudo mkdir -p /mnt/huge - sudo mount -t hugetlbfs nodev /mnt/huge + - if [ "$TEST" = "CHECKPATCH" ]; then + echo ${TRAVIS_COMMIT_RANGE}; + ODP_PATCHES=`echo ${TRAVIS_COMMIT_RANGE} | sed 's/\.//'`; + if [ -z "${ODP_PATCHES}" ]; then env; exit 1; fi; + ./scripts/ci-checkpatches.sh ${ODP_PATCHES}; + exit $?; + fi + - sudo apt-get -qq update - sudo apt-get install automake autoconf libtool libssl-dev graphviz mscgen doxygen - sudo apt-get install libpcap-dev linux-headers-`uname -r` @@ -101,21 +117,6 @@ before_install: - popd script: - - echo $TRAVIS_COMMIT_RANGE - - ODP_PACHES=`echo $TRAVIS_COMMIT_RANGE | sed 's/\.//'` -# Generate patches provided with $TRAVIS_COMMIT_RANGE. -# In case of force push and range is broken validate only the latest commit if it's not merge commit. - - git format-patch $ODP_PACHES; - 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 - perl ./scripts/checkpatch.pl *.patch; - fi - - ./bootstrap - ./configure # doxygen does not trap on warnings, check for them here. diff --git a/scripts/ci-checkpatches.sh b/scripts/ci-checkpatches.sh new file mode 100755 index 00000000..cb1c4e65 --- /dev/null +++ b/scripts/ci-checkpatches.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +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 [ $? -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 + perl ./scripts/checkpatch.pl *.patch; +fi