comparison mx/mx_graal.py @ 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 115de469a26b
children d42e11af980d
comparison
equal deleted inserted replaced
17362:03eef43d364f 17363:4f9633b83a24
999 if _make_eclipse_launch: 999 if _make_eclipse_launch:
1000 mx.make_eclipse_launch(args, 'graal-' + build, name=None, deps=mx.project('com.oracle.graal.hotspot').all_deps([], True)) 1000 mx.make_eclipse_launch(args, 'graal-' + build, name=None, deps=mx.project('com.oracle.graal.hotspot').all_deps([], True))
1001 if _jacoco == 'on' or _jacoco == 'append': 1001 if _jacoco == 'on' or _jacoco == 'append':
1002 jacocoagent = mx.library("JACOCOAGENT", True) 1002 jacocoagent = mx.library("JACOCOAGENT", True)
1003 # Exclude all compiler tests and snippets 1003 # Exclude all compiler tests and snippets
1004 excludes = ['com.oracle.graal.compiler.tests.*', 'com.oracle.graal.jtt.*'] 1004
1005 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']
1006 def _filter(l):
1007 # filter out specific classes which are already covered by a baseExclude package
1008 return [clazz for clazz in l if not any([clazz.startswith(package) for package in baseExcludes])]
1009 excludes = []
1005 for p in mx.projects(): 1010 for p in mx.projects():
1006 excludes += _find_classes_with_annotations(p, None, ['@Snippet', '@ClassSubstitution', '@Test'], includeInnerClasses=True).keys() 1011 excludes += _filter(_find_classes_with_annotations(p, None, ['@Snippet', '@ClassSubstitution', '@Test'], includeInnerClasses=True).keys())
1007 excludes += p.find_classes_with_matching_source_line(None, lambda line: 'JaCoCo Exclude' in line, includeInnerClasses=True).keys() 1012 excludes += _filter(p.find_classes_with_matching_source_line(None, lambda line: 'JaCoCo Exclude' in line, includeInnerClasses=True).keys())
1008 1013
1014 excludes += [package + '.*' for package in baseExcludes]
1009 includes = ['com.oracle.graal.*'] 1015 includes = ['com.oracle.graal.*']
1010 agentOptions = { 1016 agentOptions = {
1011 'append' : 'true' if _jacoco == 'append' else 'false', 1017 'append' : 'true' if _jacoco == 'append' else 'false',
1012 'bootclasspath' : 'true', 1018 'bootclasspath' : 'true',
1013 'includes' : ':'.join(includes), 1019 'includes' : ':'.join(includes),