Mercurial > hg > truffle
comparison mx/commands.py @ 8607:c7672a325faf
search for classes containing annotations returns source file as well as class name
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 03 Apr 2013 10:08:42 +0200 |
parents | 676a85b65481 |
children | c1c0ca020d98 |
comparison
equal
deleted
inserted
replaced
8606:f00f02691677 | 8607:c7672a325faf |
---|---|
688 if _jacoco == 'on' or _jacoco == 'append': | 688 if _jacoco == 'on' or _jacoco == 'append': |
689 jacocoagent = mx.library("JACOCOAGENT", True) | 689 jacocoagent = mx.library("JACOCOAGENT", True) |
690 # Exclude all compiler tests and snippets | 690 # Exclude all compiler tests and snippets |
691 excludes = ['com.oracle.graal.compiler.tests.*', 'com.oracle.graal.jtt.*'] | 691 excludes = ['com.oracle.graal.compiler.tests.*', 'com.oracle.graal.jtt.*'] |
692 for p in mx.projects(): | 692 for p in mx.projects(): |
693 excludes += _find_classes_with_annotations(p, None, ['@Snippet', '@ClassSubstitution', '@Test'], includeInnerClasses=True) | 693 excludes += _find_classes_with_annotations(p, None, ['@Snippet', '@ClassSubstitution', '@Test'], includeInnerClasses=True).keys() |
694 excludes += p.find_classes_with_matching_source_line(None, lambda line: 'JaCoCo Exclude' in line, includeInnerClasses=True) | 694 excludes += p.find_classes_with_matching_source_line(None, lambda line: 'JaCoCo Exclude' in line, includeInnerClasses=True).keys() |
695 | 695 |
696 includes = ['com.oracle.graal.*', 'com.oracle.max.*'] | 696 includes = ['com.oracle.graal.*', 'com.oracle.max.*'] |
697 agentOptions = { | 697 agentOptions = { |
698 'append' : 'true' if _jacoco == 'append' else 'false', | 698 'append' : 'true' if _jacoco == 'append' else 'false', |
699 'bootclasspath' : 'true', | 699 'bootclasspath' : 'true', |
730 return True | 730 return True |
731 return False | 731 return False |
732 | 732 |
733 classes = [] | 733 classes = [] |
734 for p in mx.projects(): | 734 for p in mx.projects(): |
735 classes += _find_classes_with_annotations(p, None, annotations) | 735 classes += _find_classes_with_annotations(p, None, annotations).keys() |
736 | 736 |
737 if len(pos) != 0: | 737 if len(pos) != 0: |
738 classes = [c for c in classes if containsAny(c, pos)] | 738 classes = [c for c in classes if containsAny(c, pos)] |
739 if len(neg) != 0: | 739 if len(neg) != 0: |
740 classes = [c for c in classes if not containsAny(c, neg)] | 740 classes = [c for c in classes if not containsAny(c, neg)] |