comparison mx/mx_graal.py @ 18237:6924bb0badc9

mx: set initial value for flag
author Bernhard Urban <bernhard.urban@jku.at>
date Tue, 04 Nov 2014 13:08:52 +0100
parents bfa20550f0a8
children 229dc0d72f2f 840257b6cdc5
comparison
equal deleted inserted replaced
18236:6a05fba906be 18237:6924bb0badc9
1096 if len(tests) == 0: 1096 if len(tests) == 0:
1097 classes = candidates.keys() 1097 classes = candidates.keys()
1098 projectsCp = mx.classpath([pcp.name for pcp in mx.projects_opt_limit_to_suites() if pcp.javaCompliance <= mx.java().javaCompliance]) 1098 projectsCp = mx.classpath([pcp.name for pcp in mx.projects_opt_limit_to_suites() if pcp.javaCompliance <= mx.java().javaCompliance])
1099 else: 1099 else:
1100 projs = set() 1100 projs = set()
1101 found = False
1101 if len(tests) == 1 and '#' in tests[0]: 1102 if len(tests) == 1 and '#' in tests[0]:
1102 words = tests[0].split('#') 1103 words = tests[0].split('#')
1103 if len(words) != 2: 1104 if len(words) != 2:
1104 mx.abort("Method specification is class#method: " + tests[0]) 1105 mx.abort("Method specification is class#method: " + tests[0])
1105 t, method = words 1106 t, method = words
1107
1106 for c, p in candidates.iteritems(): 1108 for c, p in candidates.iteritems():
1107 if t in c: 1109 if t in c:
1108 found = True 1110 found = True
1109 classes.append(c + '#' + method) 1111 classes.append(c + '#' + method)
1110 projs.add(p.name) 1112 projs.add(p.name)
1112 mx.log('warning: no tests matched by substring "' + t) 1114 mx.log('warning: no tests matched by substring "' + t)
1113 else: 1115 else:
1114 for t in tests: 1116 for t in tests:
1115 if '#' in t: 1117 if '#' in t:
1116 mx.abort('Method specifications can only be used in a single test: ' + t) 1118 mx.abort('Method specifications can only be used in a single test: ' + t)
1117 found = False
1118 for c, p in candidates.iteritems(): 1119 for c, p in candidates.iteritems():
1119 if t in c: 1120 if t in c:
1120 found = True 1121 found = True
1121 classes.append(c) 1122 classes.append(c)
1122 projs.add(p.name) 1123 projs.add(p.name)