changeset 17363:4f9633b83a24

mx: reduce size of exculde command line argument and fold it into package-star expressions
author Bernhard Urban <bernhard.urban@jku.at>
date Tue, 07 Oct 2014 16:26:29 +0200
parents 03eef43d364f
children 9fb3791586e8
files graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/NewArrayNode.java graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/ReplacementsUtil.java mx/mx_graal.py
diffstat 3 files changed, 11 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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 {
 
--- 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
--- 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',