[asterisk-commits] runtests.py: Re-organize runtests options (testsuite[master])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Oct 25 09:49:47 CDT 2015


Anonymous Coward #1000019 has submitted this change and it was merged.

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(-)

Approvals:
  Anonymous Coward #1000019: Verified
  Joshua Colp: Looks good to me, approved



diff --git a/runtests.py b/runtests.py
index bb121a5..4f84595 100755
--- a/runtests.py
+++ b/runtests.py
@@ -602,40 +602,41 @@
     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("-k", "--keep-core", action="store_true",
                       dest="keep_core", default=False,
                       help="Archive the 'core' file if Asterisk crashes.")
+    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: merged
Gerrit-Change-Id: If2b7fcb93b9b77331f6915e75c74727ba0f490f3
Gerrit-PatchSet: 2
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Matt Jordan <mjordan at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>



More information about the asterisk-commits mailing list