Mercurial > hg > graal-jvmci-8
comparison mx/mx_graal.py @ 14767:ded08e344e4a
findbugs will also use any findbugsExcludeFilter.xml it finds in a suite's root
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 26 Mar 2014 17:30:40 +0100 |
parents | c6f4b780fa88 |
children | 141d570b397c |
comparison
equal
deleted
inserted
replaced
14764:5823c399e28f | 14767:ded08e344e4a |
---|---|
1693 findbugsJar = join(findbugsLib, 'findbugs.jar') | 1693 findbugsJar = join(findbugsLib, 'findbugs.jar') |
1694 assert exists(findbugsJar) | 1694 assert exists(findbugsJar) |
1695 nonTestProjects = [p for p in mx.projects() if not p.name.endswith('.test') and not p.name.endswith('.jtt')] | 1695 nonTestProjects = [p for p in mx.projects() if not p.name.endswith('.test') and not p.name.endswith('.jtt')] |
1696 outputDirs = [p.output_dir() for p in nonTestProjects] | 1696 outputDirs = [p.output_dir() for p in nonTestProjects] |
1697 findbugsResults = join(_graal_home, 'findbugs.results') | 1697 findbugsResults = join(_graal_home, 'findbugs.results') |
1698 exitcode = mx.run_java(['-jar', findbugsJar, '-textui', '-low', '-maxRank', '15', '-exclude', join(_graal_home, 'graal', 'findbugsExcludeFilter.xml'), | 1698 |
1699 '-auxclasspath', mx.classpath([p.name for p in nonTestProjects]), '-output', findbugsResults, '-progress', '-exitcode'] + args + outputDirs, nonZeroIsFatal=False) | 1699 cmd = ['-jar', findbugsJar, '-textui', '-low', '-maxRank', '15', '-exclude', join(_graal_home, 'graal', 'findbugsExcludeFilter.xml')] |
1700 for s in mx.suites(): | |
1701 filt = join(s.dir, 'findbugsExcludeFilter.xml') | |
1702 if exists(filt): | |
1703 cmd.append('-exclude') | |
1704 cmd.append(filt) | |
1705 if sys.stdout.isatty(): | |
1706 cmd.append('-progress') | |
1707 cmd = cmd + ['-auxclasspath', mx.classpath([p.name for p in nonTestProjects]), '-output', findbugsResults, '-progress', '-exitcode'] + args + outputDirs | |
1708 exitcode = mx.run_java(cmd, nonZeroIsFatal=False) | |
1700 if exitcode != 0: | 1709 if exitcode != 0: |
1701 with open(findbugsResults) as fp: | 1710 with open(findbugsResults) as fp: |
1702 mx.log(fp.read()) | 1711 mx.log(fp.read()) |
1703 os.unlink(findbugsResults) | 1712 os.unlink(findbugsResults) |
1704 return exitcode | 1713 return exitcode |