changeset 20793:60c175c1e708

tests: small refactoring of run-tests' handling of tests list
author Mads Kiilerich <madski@unity3d.com>
date Wed, 19 Mar 2014 00:19:54 +0100
parents 89059c450c56
children 8b0e3a8982ea
files tests/run-tests.py
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/tests/run-tests.py	Fri Feb 28 02:26:03 2014 +0100
+++ b/tests/run-tests.py	Wed Mar 19 00:19:54 2014 +0100
@@ -1180,12 +1180,12 @@
 
     checktools()
 
-    if len(args) == 0:
-        args = [t for t in os.listdir(".")
-                if t.startswith("test-")
-                and (t.endswith(".py") or t.endswith(".t"))]
+    if not args:
+        args = os.listdir(".")
 
-    tests = args
+    tests = [t for t in args
+             if t.startswith("test-")
+             and (t.endswith(".py") or t.endswith(".t"))]
 
     if options.random:
         random.shuffle(tests)