scan-build and Jenkins

Li-Wen Hsu lwhsu at FreeBSD.org
Wed Feb 11 15:05:18 UTC 2015


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 at .

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 <lwhsu at FreeBSD.org>
http://lwhsu.org


More information about the freebsd-testing mailing list