[Asterisk-code-review] runtests.py: Re-organize runtests options (testsuite[master])

Matt Jordan asteriskteam at digium.com
Sun Oct 25 07:30:24 CDT 2015


Matt Jordan has uploaded a new change for review.

  https://gerrit.asterisk.org/1526

Change subject: runtests.py: Re-organize runtests options
......................................................................

runtests.py: Re-organize runtests options

This patch bike sheds the runtests options by organizing them:
(1) By single letter options (-X) before named options (--blah)
(2) Alphabetically within the categories defined by (1)

Change-Id: If2b7fcb93b9b77331f6915e75c74727ba0f490f3
---
M runtests.py
1 file changed, 17 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/26/1526/1

diff --git a/runtests.py b/runtests.py
index 13bd8bc..7adbf1a 100755
--- a/runtests.py
+++ b/runtests.py
@@ -594,37 +594,38 @@
     usage = "Usage: ./runtests.py [options]"
 
     parser = optparse.OptionParser(usage=usage)
-    parser.add_option("-l", "--list-tests", action="store_true",
-                      dest="list_tests", default=False,
-                      help="List tests instead of running them.")
-    parser.add_option("-t", "--test", action="append", default=[],
-                      dest="tests",
-                      help=("Run a single specified test (directory) instead "
-                            "of all tests.  May be specified more than once."))
+    parser.add_option("-c", "--cleanup", action="store_true",
+                      dest="cleanup", default=False,
+                      help="Cleanup tmp directory after each successful test")
     parser.add_option("-g", "--tag", action="append",
                       dest="tags",
                       help="Specify one or more tags to select a subset of tests.")
-    parser.add_option("-v", "--version",
-                      dest="version", default=None,
-                      help="Specify the version of Asterisk rather then detecting it.")
+    parser.add_option("-l", "--list-tests", action="store_true",
+                      dest="list_tests", default=False,
+                      help="List tests instead of running them.")
     parser.add_option("-L", "--list-tags", action="store_true",
                       dest="list_tags", default=False,
                       help="List available tags")
     parser.add_option("-n", "--dry-run", action="store_true",
                       dest="dry_run", default=False,
                       help="Only show which tests would be run.")
-    parser.add_option("--timeout", metavar='int', type=int,
-                      dest="timeout", default=-1,
-                      help="Abort test after n seconds of no output.")
+    parser.add_option("-t", "--test", action="append", default=[],
+                      dest="tests",
+                      help=("Run a single specified test (directory) instead "
+                            "of all tests.  May be specified more than once."))
+    parser.add_option("-v", "--version",
+                      dest="version", default=None,
+                      help="Specify the version of Asterisk rather then detecting it.")
     parser.add_option("-V", "--valgrind", action="store_true",
                       dest="valgrind", default=False,
                       help="Run Asterisk under Valgrind")
-    parser.add_option("-c", "--cleanup", action="store_true",
-                      dest="cleanup", default=False,
-                      help="Cleanup tmp directory after each successful test")
     parser.add_option("--random-order", action="store_true",
                       dest="randomorder", default=False,
                       help="Shuffle the tests so they are run in random order")
+    parser.add_option("--timeout", metavar='int', type=int,
+                      dest="timeout", default=-1,
+                      help="Abort test after n seconds of no output.")
+
     (options, args) = parser.parse_args(argv)
 
     ast_version = AsteriskVersion(options.version)

-- 
To view, visit https://gerrit.asterisk.org/1526
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If2b7fcb93b9b77331f6915e75c74727ba0f490f3
Gerrit-PatchSet: 1
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Matt Jordan <mjordan at digium.com>



More information about the asterisk-code-review mailing list