From owner-freebsd-testing@FreeBSD.ORG Wed Feb 11 15:05:18 2015 Return-Path: Delivered-To: freebsd-testing@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3FF6E7AC; Wed, 11 Feb 2015 15:05:18 +0000 (UTC) Received: from FreeBSD.cs.nctu.edu.tw (FreeBSD.cs.nctu.edu.tw [140.113.17.209]) by mx1.freebsd.org (Postfix) with ESMTP id 0A5CFC96; Wed, 11 Feb 2015 15:05:18 +0000 (UTC) Received: by FreeBSD.cs.nctu.edu.tw (Postfix, from userid 1058) id A31752BF4; Wed, 11 Feb 2015 23:05:15 +0800 (CST) Date: Wed, 11 Feb 2015 23:05:15 +0800 From: Li-Wen Hsu To: Craig Rodrigues Subject: Re: scan-build and Jenkins Message-ID: <20150211150515.GA22751@FreeBSD.cs.nctu.edu.tw> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "freebsd-testing@freebsd.org" X-BeenThere: freebsd-testing@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Testing on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 15:05:18 -0000 Hi, On Tue, Feb 10, 2015 at 13:00:08 -0800, Craig Rodrigues wrote: > Li-Wen, > > Can you provide the steps you did to create a clang scan-build setup > under FreeBSD? > I'm interested in what you did, in order to set that up for a project at > work. The configurations are stored by your backup magic: https://github.com/freebsd/jenkins-config/tree/master/jobs/FreeBSD_HEAD-scan-build There are some tricky points: - "Multiple SCMs" plugin is used, for check out both scan-build scripts and source being checked - scan-build is build from LLVM & Clang trunk, which are also checked out by multiple SCMs plugin and built when job triggered. This is designed by uqs@ at the beginning because we want to use the latest tool to eliminate false results. The build process is straightforward, just copying necessary files and executing scan-build: https://github.com/freebsd/jenkins-config/blob/50f1336a04b039852b73780314c3967e5d6f9b07/jobs/FreeBSD_HEAD-scan-build/config.xml#L85-L107 The scripts are stored here, they are originally developed by uqs@. https://github.com/freebsd/freebsd-ci/tree/master/scan-build Perhaps we can split this to another repository in the future. > I noticed that there is a scan-build Jenkins plugin: > > https://wiki.jenkins-ci.org/display/JENKINS/Clang+Scan-Build+Plugin > > Right now it only supports Xcode, but someone has submitted > a github PR to support the scan-build command-line ( > https://github.com/jenkinsci/clang-scanbuild-plugin/pull/2 ). > > That plugin doesn't look actively maintained, but it might be nice > to fix it up and use it. This is interesting, I also want the clang-scan build plugin can support scan-build from command-line. I hope this can help to collect and publish the results. The way we publish scan-build results is a bit dirty. Li-Wen -- Li-Wen Hsu http://lwhsu.org