# HG changeset patch # User Bernhard Urban # Date 1412691989 -7200 # Node ID 4f9633b83a24bf9788d55f5ff3420e594548365d # Parent 03eef43d364fe694b4413094292609f0aa8c39f8 mx: reduce size of exculde command line argument and fold it into package-star expressions diff -r 03eef43d364f -r 4f9633b83a24 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/NewArrayNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/NewArrayNode.java Tue Oct 07 02:56:42 2014 -0700 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/NewArrayNode.java Tue Oct 07 16:26:29 2014 +0200 @@ -36,6 +36,7 @@ * The {@code NewArrayNode} is used for all array allocations where the element type is know at * compile time. */ +// JaCoCo Exclude @NodeInfo public class NewArrayNode extends AbstractNewArrayNode implements VirtualizableAllocation { diff -r 03eef43d364f -r 4f9633b83a24 graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/ReplacementsUtil.java --- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/ReplacementsUtil.java Tue Oct 07 02:56:42 2014 -0700 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/ReplacementsUtil.java Tue Oct 07 16:26:29 2014 +0200 @@ -24,6 +24,7 @@ import com.oracle.graal.replacements.nodes.*; +// JaCoCo Exclude public class ReplacementsUtil { private ReplacementsUtil() { // empty diff -r 03eef43d364f -r 4f9633b83a24 mx/mx_graal.py --- a/mx/mx_graal.py Tue Oct 07 02:56:42 2014 -0700 +++ b/mx/mx_graal.py Tue Oct 07 16:26:29 2014 +0200 @@ -1001,11 +1001,17 @@ if _jacoco == 'on' or _jacoco == 'append': jacocoagent = mx.library("JACOCOAGENT", True) # Exclude all compiler tests and snippets - excludes = ['com.oracle.graal.compiler.tests.*', 'com.oracle.graal.jtt.*'] + + baseExcludes = ['com.oracle.graal.compiler.test', 'com.oracle.graal.jtt', 'com.oracle.graal.api.meta.test', 'com.oracle.truffle.api.test', 'com.oracle.truffle.api.dsl.test', 'com.oracle.graal.compiler.hsail.test'] + def _filter(l): + # filter out specific classes which are already covered by a baseExclude package + return [clazz for clazz in l if not any([clazz.startswith(package) for package in baseExcludes])] + excludes = [] for p in mx.projects(): - excludes += _find_classes_with_annotations(p, None, ['@Snippet', '@ClassSubstitution', '@Test'], includeInnerClasses=True).keys() - excludes += p.find_classes_with_matching_source_line(None, lambda line: 'JaCoCo Exclude' in line, includeInnerClasses=True).keys() + excludes += _filter(_find_classes_with_annotations(p, None, ['@Snippet', '@ClassSubstitution', '@Test'], includeInnerClasses=True).keys()) + excludes += _filter(p.find_classes_with_matching_source_line(None, lambda line: 'JaCoCo Exclude' in line, includeInnerClasses=True).keys()) + excludes += [package + '.*' for package in baseExcludes] includes = ['com.oracle.graal.*'] agentOptions = { 'append' : 'true' if _jacoco == 'append' else 'false',