<p>pespin has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18106">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">osmo-gsm-tester.py: Update help description and remove old nope cmdline arg<br><br>Change-Id: I879a5c30c185905614c2c5a7d54eb33817c94c31<br>---<br>M src/osmo-gsm-tester.py<br>1 file changed, 20 insertions(+), 27 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/06/18106/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/osmo-gsm-tester.py b/src/osmo-gsm-tester.py</span><br><span>index 84151b8..fb5574b 100755</span><br><span>--- a/src/osmo-gsm-tester.py</span><br><span>+++ b/src/osmo-gsm-tester.py</span><br><span>@@ -1,10 +1,11 @@</span><br><span> #!/usr/bin/env python3</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-# osmo_gsm_tester: invoke a single test run</span><br><span style="color: hsl(120, 100%, 40%);">+# osmo-gsm-tester.py: main program file</span><br><span> #</span><br><span style="color: hsl(0, 100%, 40%);">-# Copyright (C) 2016-2017 by sysmocom - s.f.m.c. GmbH</span><br><span style="color: hsl(120, 100%, 40%);">+# Copyright (C) 2016-2020 sysmocom - s.f.m.c. GmbH <info@sysmocom.de></span><br><span> #</span><br><span> # Author: Neels Hofmeyr <neels@hofmeyr.de></span><br><span style="color: hsl(120, 100%, 40%);">+# Author: Pau Espin Pedrol <pespin@sysmocom.de></span><br><span> #</span><br><span> # This program is free software: you can redistribute it and/or modify</span><br><span> # it under the terms of the GNU General Public License as</span><br><span>@@ -19,7 +20,7 @@</span><br><span> # You should have received a copy of the GNU General Public License</span><br><span> # along with this program.  If not, see <http://www.gnu.org/licenses/>.</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-'''osmo_gsm_tester: invoke a single test run.</span><br><span style="color: hsl(120, 100%, 40%);">+'''osmo-gsm-tester.py: invoke a single test run</span><br><span> </span><br><span> Examples:</span><br><span> </span><br><span>@@ -27,12 +28,12 @@</span><br><span> ./osmo-gsm-tester.py -c doc/examples/2g_osmocom/ ~/my_trial_package/ -s sms_tests:dyn_ts+eu_band+bts_sysmo</span><br><span> ./osmo-gsm-tester.py -c sysmocom/ ~/my_trial_package/ -s sms_tests/mo_mt_sms:bts_trx</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-(The names for test suite, scenario and series names used in these examples</span><br><span style="color: hsl(0, 100%, 40%);">-must be defined by the osmo-gsm-tester configuration.)</span><br><span style="color: hsl(120, 100%, 40%);">+(The names for test suites and scenarios used in these examples must be defined</span><br><span style="color: hsl(120, 100%, 40%);">+by the osmo-gsm-tester configuration.)</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-A trial package contains binaries (usually built by a jenkins job) of GSM</span><br><span style="color: hsl(0, 100%, 40%);">-software, including the core network programs as well as binaries for the</span><br><span style="color: hsl(0, 100%, 40%);">-various BTS models.</span><br><span style="color: hsl(120, 100%, 40%);">+A trial package contains binaries (usually built by a jenkins job) of software</span><br><span style="color: hsl(120, 100%, 40%);">+to be run by Osmo-Gsm-Tester, like core network programs as well as binaries for</span><br><span style="color: hsl(120, 100%, 40%);">+the various BTS models on a 2G network.</span><br><span> </span><br><span> A test suite defines specific actions to be taken and verifies their outcome.</span><br><span> Such a test suite may leave certain aspects of a setup undefined, e.g. it may</span><br><span>@@ -50,19 +51,17 @@</span><br><span> strictly defined by a scenario, which will be resolved automatically, e.g. by</span><br><span> choosing the first available item that matches the other constraints.</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-A test run thus needs to define: a trial package containing built binaries, a</span><br><span style="color: hsl(0, 100%, 40%);">-combination of scenarios to run a suite in, and a test suite to launch in the</span><br><span style="color: hsl(0, 100%, 40%);">-given scenario with the given binaries.</span><br><span style="color: hsl(120, 100%, 40%);">+A test run thus needs to define:</span><br><span style="color: hsl(120, 100%, 40%);">+* A trial package containing built binaries</span><br><span style="color: hsl(120, 100%, 40%);">+* A set of test suites, each with its combinations of scenarios</span><br><span style="color: hsl(120, 100%, 40%);">+* A configuration directory specifying sets of resources, default configurations</span><br><span style="color: hsl(120, 100%, 40%);">+  and paths on where to find suites, scenarios, etc.</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-The osmo-gsm-tester configuration may define one or more series as a number of</span><br><span style="color: hsl(0, 100%, 40%);">-suite:scenario combinations. So instead of a specific suite:scenario</span><br><span style="color: hsl(0, 100%, 40%);">-combination, the name of such a series can be passed.</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-If neither a combination or series is specified, the default series will be run</span><br><span style="color: hsl(0, 100%, 40%);">-as defined in the osmo-gsm-tester configuration.</span><br><span style="color: hsl(120, 100%, 40%);">+If no combination of suites and scenarios is provided, the default list of</span><br><span style="color: hsl(120, 100%, 40%);">+suites will be run as defined in the osmo-gsm-tester configuration.</span><br><span> </span><br><span> The scenarios and suites run for a given trial will be recorded in a trial</span><br><span style="color: hsl(0, 100%, 40%);">-package's directory: Upon launch, a 'test_package/run.<date>' directory will be</span><br><span style="color: hsl(120, 100%, 40%);">+package's directory: Upon launch, a '$trial_dir/run.<date>' directory will be</span><br><span> created, which will collect logs and reports.</span><br><span> '''</span><br><span> </span><br><span>@@ -102,14 +101,13 @@</span><br><span>     # is easiest to maintain.</span><br><span>     parser.add_argument('-V', '--version', action='store_true',</span><br><span>             help='Show version')</span><br><span style="color: hsl(120, 100%, 40%);">+    parser.add_argument('-c', '--conf-dir', dest='conf_dir',</span><br><span style="color: hsl(120, 100%, 40%);">+            help='''Specify configuration directory path (containing paths.conf)''')</span><br><span>     parser.add_argument('trial_package',</span><br><span>             help='Directory containing binaries to test')</span><br><span>     parser.add_argument('-s', '--suite-scenario', dest='suite_scenario', action='append',</span><br><span>             help='''A suite-scenarios combination</span><br><span> like suite:scenario+scenario''')</span><br><span style="color: hsl(0, 100%, 40%);">-    parser.add_argument('-S', '--series', dest='series', action='append',</span><br><span style="color: hsl(0, 100%, 40%);">-            help='''A series of suite-scenarios combinations</span><br><span style="color: hsl(0, 100%, 40%);">-as defined in the osmo-gsm-tester configuration''')</span><br><span>     parser.add_argument('-t', '--test', dest='test', action='append',</span><br><span>             help='''Run only tests matching this name.</span><br><span> Any test name that contains the given string is run.</span><br><span>@@ -123,8 +121,6 @@</span><br><span>             help='Enable stdout logging of tracebacks')</span><br><span>     parser.add_argument('-R', '--source', dest='source', action='store_true',</span><br><span>             help='Enable stdout logging of source file')</span><br><span style="color: hsl(0, 100%, 40%);">-    parser.add_argument('-c', '--conf-dir', dest='conf_dir',</span><br><span style="color: hsl(0, 100%, 40%);">-            help='''Specify configuration directory path (containing paths.conf)''')</span><br><span>     args = parser.parse_args()</span><br><span> </span><br><span>     if args.version:</span><br><span>@@ -132,7 +128,6 @@</span><br><span>         exit(0)</span><br><span> </span><br><span>     print('combinations:', repr(args.suite_scenario))</span><br><span style="color: hsl(0, 100%, 40%);">-    print('series:', repr(args.series))</span><br><span>     print('trial:', repr(args.trial_package))</span><br><span>     print('tests:', repr(args.test))</span><br><span> </span><br><span>@@ -149,8 +144,6 @@</span><br><span>         config.override_conf = args.conf_dir</span><br><span> </span><br><span>     combination_strs = list(args.suite_scenario or [])</span><br><span style="color: hsl(0, 100%, 40%);">-    # for series in args.series:</span><br><span style="color: hsl(0, 100%, 40%);">-    #     combination_strs.extend(config.get_series(series))</span><br><span> </span><br><span>     if not combination_strs:</span><br><span>         combination_strs = config.read_config_file(config.DEFAULT_SUITES_CONF, if_missing_return=[])</span><br><span>@@ -162,7 +155,7 @@</span><br><span> </span><br><span> </span><br><span>     if not combination_strs:</span><br><span style="color: hsl(0, 100%, 40%);">-        raise RuntimeError('Need at least one suite:scenario or series to run')</span><br><span style="color: hsl(120, 100%, 40%);">+        raise RuntimeError('Need at least one suite:scenario to run')</span><br><span> </span><br><span>     # Generate supported schemas dynamically from objects:</span><br><span>     generate_schemas()</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18106">change 18106</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18106"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-gsm-tester </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I879a5c30c185905614c2c5a7d54eb33817c94c31 </div>
<div style="display:none"> Gerrit-Change-Number: 18106 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>