[PATCH] osmo-gsm-tester[master]: cosmetic: cmdline help: add line breaks

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Sat May 6 20:28:26 UTC 2017


Review at  https://gerrit.osmocom.org/2495

cosmetic: cmdline help: add line breaks

Argparse has a peculiar way of treating the cmdline help strings. To be able to
have separate paragraphs in the long description, we use the
RawTextHelpFormatter. Unfortunately this also seems to omit line breaks in the
argument summaries. So we need to add newlines there at sensible places
ourselves. Break longer lines using multiline py strings -- which is again not
particularly beautiful in the python code flow, but easiest to maintain.

Change-Id: I34a2333c55719986b729b07386bc47314635ee04
---
M src/osmo-gsm-tester.py
1 file changed, 9 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/95/2495/1

diff --git a/src/osmo-gsm-tester.py b/src/osmo-gsm-tester.py
index fb4a8d7..86bd197 100755
--- a/src/osmo-gsm-tester.py
+++ b/src/osmo-gsm-tester.py
@@ -79,15 +79,17 @@
     parser.add_argument('trial_package', nargs='+',
             help='Directory containing binaries to test')
     parser.add_argument('-s', '--suite-scenario', dest='suite_scenario', action='append',
-            help='A suite-scenarios combination like suite:scenario+scenario')
+            help='''A suite-scenarios combination
+like suite:scenario+scenario''')
     parser.add_argument('-S', '--series', dest='series', action='append',
-            help='A series of suite-scenarios combinations as defined in the'
-                 ' osmo-gsm-tester configuration')
+            help='''A series of suite-scenarios combinations
+as defined in the osmo-gsm-tester configuration''')
     parser.add_argument('-t', '--test', dest='test', action='append',
-            help='Run only tests matching this name. Any test name that'
-                 ' contains the given string is run. To get an exact patch,'
-                 ' prepend a "=" like "-t =my_exact_name". The ".py" suffix is'
-                 ' always optional.')
+            help='''Run only tests matching this name.
+Any test name that contains the given string is run.
+To get an exact match, prepend a "=" like
+"-t =my_exact_name". The ".py" suffix is always
+optional.''')
     parser.add_argument('-l', '--log-level', dest='log_level', choices=log.LEVEL_STRS.keys(),
             default=None,
             help='Set logging level for all categories (on stdout)')

-- 
To view, visit https://gerrit.osmocom.org/2495
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I34a2333c55719986b729b07386bc47314635ee04
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list