launcher: No need to start a web server when listing tests
authorEdward Hervey <edward@collabora.com>
Wed, 19 Mar 2014 16:04:14 +0000 (17:04 +0100)
committerEdward Hervey <edward@collabora.com>
Wed, 19 Mar 2014 16:04:14 +0000 (17:04 +0100)
It's not needed and makes listing faster.
Also sort the list of tests

validate/tools/launcher/main.py

index 21fa3a9..5ea2e87 100644 (file)
@@ -176,17 +176,19 @@ def main():
     ScenarioManager().config = options
     tests_launcher.list_tests()
 
+    if options.list_tests:
+        l = tests_launcher.tests
+        l.sort()
+        for test in l:
+            printc(test)
+        return 0
+
     httpsrv = HTTPServer(options)
     if tests_launcher.needs_http_server():
         httpsrv.start()
 
     e = None
     try:
-        if options.list_tests:
-            for test in tests_launcher.tests:
-                printc(test)
-            return 0
-
         tests_launcher.run_tests()
         tests_launcher.final_report()
     except Exception as e: