From patchwork Tue May 16 15:00:07 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: 99874 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp2068075qge; Tue, 16 May 2017 08:00:50 -0700 (PDT) X-Received: by 10.36.166.4 with SMTP id q4mr11066214ite.66.1494946850862; Tue, 16 May 2017 08:00:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1494946850; cv=none; d=google.com; s=arc-20160816; b=XkOVijjtrcRXmD0i2wXkv5QjGfvgFRBJp3IS4o4Rg0hT3OyX9yCMcPWdkcjcPx0O2C iPEkP7snkkNABhsQlkYQSLO2QLVs3sxLnznzVNTSFT64nSjgcKBAEbG9zijnHraYhbkq 1eClhZho/SQnhlw/cRWI/8gZfBZkEWuYc2mqdxaR9QoGA8QxpZKeePCgVZJLVudl+oRX PuQTZ7ylvnoDPWjIGPkvEtXivCuzIZD19VV0Z/MiwhLf2WmCpOJuFX1lrqyW4u5tYDyo tWYA1W6w5AohHL+TclDxr3Sypttx9fIZgu9/TTxXNFY1uCvNp6YZHS7S9WuLGyyySsOM rsDg== 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=wdyqMbSuGbLifv/eilOq7tcE/4UN3pf62zJkNo/FGIk=; b=MIiR5dF05MgQqjAZxlqgEjPB7MSBmZ+6iVYTPHaMi7FwF/vBR9XYh/vS/JZx5pBJjj wAMzBBPTQJOxbdsGw6lQNzj11Erz/H54KrA0Jhz5EczKVN+z9wHI9zOfszU6KP770+wt Anh6DejC9miDTafRFJ4RR9f3COVJnyGWjjZb7xvGNJwMnRDDW0cG/5zTLhxQnXsBbLZI DUNkriH3xa2HC8MqQlG2evf7sEPm8PsHH2bKMWtJqhtVGRAmOgfNP6gnnLz5Wrjv1Eoe bmuKtcm/2x+ezyY/Mnc1g0d/6/UygMD1lyvU7FZSWYGRvXAYUrqrSOVR/HjSmTUGXrzM 02pw== 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 p11si14446338iod.111.2017.05.16.08.00.50; Tue, 16 May 2017 08:00:50 -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 1A97B60853; Tue, 16 May 2017 15:00:50 +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 D0F516085E; Tue, 16 May 2017 15:00:31 +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 F024B608DA; Tue, 16 May 2017 15:00:22 +0000 (UTC) Received: from forward4o.cmail.yandex.net (forward4o.cmail.yandex.net [37.9.109.248]) by lists.linaro.org (Postfix) with ESMTPS id DFD9C60853 for ; Tue, 16 May 2017 15:00:18 +0000 (UTC) Received: from smtp2m.mail.yandex.net (smtp2m.mail.yandex.net [IPv6:2a02:6b8:0:2519::122]) by forward4o.cmail.yandex.net (Yandex) with ESMTP id 511B821126 for ; Tue, 16 May 2017 18:00:17 +0300 (MSK) Received: from smtp2m.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp2m.mail.yandex.net (Yandex) with ESMTP id 1CA902300C94 for ; Tue, 16 May 2017 18:00:16 +0300 (MSK) Received: by smtp2m.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 5ojjka0Td9-0GxWcWw9; Tue, 16 May 2017 18:00:16 +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: Tue, 16 May 2017 18:00:07 +0300 Message-Id: <1494946807-9195-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1494946807-9195-1-git-send-email-odpbot@yandex.ru> References: <1494946807-9195-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 31 Subject: [lng-odp] [PATCH v1 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: 3a8ba69bff8052cbe35dcca71ebda9b669dbf807 ** Merge commit sha: e98ddada54058454f8ae1d2862b652cb6305138c **/ .travis.yml | 30 +++++++++++++++--------------- scripts/ci-checkpatches.sh | 17 +++++++++++++++++ 2 files changed, 32 insertions(+), 15 deletions(-) create mode 100755 scripts/ci-checkpatches.sh diff --git a/.travis.yml b/.travis.yml index aa7ea01..1dfb444 100644 --- a/.travis.yml +++ b/.travis.yml @@ -51,12 +51,27 @@ 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/\.//'`; + ./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 +116,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 0000000..533de3a --- /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