From patchwork Tue May 16 17:00:08 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: 99887 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp2122476qge; Tue, 16 May 2017 10:00:47 -0700 (PDT) X-Received: by 10.107.132.104 with SMTP id g101mr11397079iod.181.1494954047439; Tue, 16 May 2017 10:00:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1494954047; cv=none; d=google.com; s=arc-20160816; b=WisCm4B1VgbSpyrOng0j9UCs1C+KS41YAjI9Jv0HOXc0Nfi6fGVA1GAr/+3USDKyhK ADcMXzkWAc5kiR9bd6GIEepUOa2JNlWoPG5SbO7/x6ktZmX0y/XWVMqEqg0fMFqsy7Wn PfQHdOR9GtysOMRU8Tbsko0kS46dMosoiYfN/m4b7qC9j/7lCe6CUJCHq5VsfaH4cRnN hupNQyO6uq2N8RaMbk6KosnfEjGIV82NsAwPrzAhRSGRq6GOtEIPcoIIgARBSPUo3ulz zphmGqX6F7AVJmshRINEJlKTXERTJgfO98uiuoT3pCwLlX7dxTcqbj7QxlRIYpkCHoMd gc0Q== 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=t8BiIuuvP0h/u4NNcnlqKA8bbs9Fh+0sHONaLuBDcxU=; b=SWohEwk8q5aG86yTzoTsJcJXmLVxB3IYD0gcwGFIeJGzn+xAd9bXdbpPMVGwcGQnAv hoLHyKnwS7mume93/LuczCDO5B8z7Qa864vt/p1EvZ+xV+vD+3Emm/9o4w0/QfZK+HJI S7FJD4rvqEe4hKtpUiQHxUN9X66nxqMzc37L9mRNOJ2Y7Qmb+9avM6CtowgYTj7zvkFu 8+tXhy2bs36GpyYOKOCoiaKa+JNgT78Y1Sjagejv3ih75PC1Gz55Jsa30L+t5ZAFVxeR iprScUWCb0Gm8gG8v1JUGEDfdsBXOccBqeWb2nML6YMed2/zCsKd7vsKDuYCD6nkSkHj pEhA== 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 70si4608258itp.90.2017.05.16.10.00.47; Tue, 16 May 2017 10: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 EB9AB6068E; Tue, 16 May 2017 17:00:46 +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,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 01FED608D2; Tue, 16 May 2017 17:00:25 +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 851F060841; Tue, 16 May 2017 17:00:20 +0000 (UTC) Received: from forward2o.cmail.yandex.net (forward2o.cmail.yandex.net [37.9.109.243]) by lists.linaro.org (Postfix) with ESMTPS id 88304607FD for ; Tue, 16 May 2017 17:00:16 +0000 (UTC) Received: from smtp2p.mail.yandex.net (smtp2p.mail.yandex.net [77.88.29.85]) by forward2o.cmail.yandex.net (Yandex) with ESMTP id E3F32211EA for ; Tue, 16 May 2017 20:00:14 +0300 (MSK) Received: from smtp2p.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp2p.mail.yandex.net (Yandex) with ESMTP id BF0BE1A8004F for ; Tue, 16 May 2017 20:00:14 +0300 (MSK) Received: by smtp2p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id GuvtKExRO3-0DUak42V; Tue, 16 May 2017 20:00:13 +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 20:00:08 +0300 Message-Id: <1494954008-12341-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1494954008-12341-1-git-send-email-odpbot@yandex.ru> References: <1494954008-12341-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 31 Subject: [lng-odp] [PATCH v5 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: b50cf14202528e986ae9a41721fae1e746078646 ** Merge commit sha: 4ac052360ff5ff56f547b9930f859e346096d757 **/ .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 aa7ea01..877bba2 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 0000000..cb1c4e6 --- /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