# HG changeset patch # User Doug Simon # Date 1372944638 -7200 # Node ID eeb80dcd60d850a3bc2e12be397d3ea4a18e1318 # Parent dd5a042811f64613b1c8e6888a540e15b21f809a fixed regression in unittest command when no tests are specified diff -r dd5a042811f6 -r eeb80dcd60d8 mx/commands.py --- a/mx/commands.py Thu Jul 04 15:03:43 2013 +0200 +++ b/mx/commands.py Thu Jul 04 15:30:38 2013 +0200 @@ -715,9 +715,6 @@ return True return False - if len(tests) == 0: - mx.abort('no tests specified') - candidates = [] for p in mx.projects(): if mx.java().javaCompliance < p.javaCompliance: @@ -725,17 +722,20 @@ candidates += _find_classes_with_annotations(p, None, annotations).keys() classes = [] - for t in tests: - if t.startswith('-'): - mx.abort('VM option needs @ prefix (i.e., @' + t + ')') - - found = False - for c in candidates: - if t in c: - found = True - classes.append(c) - if not found: - mx.log('warning: no tests matched by substring "' + t) + if len(tests) == 0: + classes = candidates + else: + for t in tests: + if t.startswith('-'): + mx.abort('VM option needs @ prefix (i.e., @' + t + ')') + + found = False + for c in candidates: + if t in c: + found = True + classes.append(c) + if not found: + mx.log('warning: no tests matched by substring "' + t) projectscp = mx.classpath([pcp.name for pcp in mx.projects() if pcp.javaCompliance <= mx.java().javaCompliance])