Skip to content

Commit

Permalink
Rollup merge of rust-lang#74968 - lzutao:no-args, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
Run all tests if have no specified tests

The behaviour was changed in rust-lang#74905 (comment)
cc @alex if you could check it again, thank you.
  • Loading branch information
JohnTitor authored Jul 31, 2020
2 parents ab4570e + a475722 commit ad8230f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/etc/test-float-parse/runtests.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,12 @@ def interact(proc, queue):

def main():
global MAILBOX
tests = [os.path.splitext(f)[0] for f in glob('*.rs')
if not f.startswith('_')]
all_tests = [os.path.splitext(f)[0] for f in glob('*.rs') if not f.startswith('_')]
args = sys.argv[1:]
tests = [test for test in tests if test in args]
if args:
tests = [test for test in all_tests if test in args]
else
tests = all_tests
if not tests:
print("Error: No tests to run")
sys.exit(1)
Expand Down

0 comments on commit ad8230f

Please sign in to comment.