Change in osmo-gsm-tester[master]: Cmdline arg -c sets main configuration file (old paths.conf) instead ...
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18204 ) Change subject: Cmdline arg -c sets main configuration file (old paths.conf) instead of dir containing it .. Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18204 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Ieca65b71b543c44cfcec8e83efd0fe053c432e55 Gerrit-Change-Number: 18204 Gerrit-PatchSet: 4 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 May 2020 12:53:45 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-gsm-tester[master]: Cmdline arg -c sets main configuration file (old paths.conf) instead ...
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18204 ) Change subject: Cmdline arg -c sets main configuration file (old paths.conf) instead of dir containing it .. Cmdline arg -c sets main configuration file (old paths.conf) instead of dir containing it It has been notified that current configuration system is difficult to understand and to use, so it has been envisioned to refactor it a bit. The idea is that the user passes a -c path/to/main.conf file, which in turn contains whatever osmo-gsm-tester main settings supports (basically what old paths.conf used to be, plus some files harcoded to the same -c directory are now configurable through the main configuration file). Change-Id: Ieca65b71b543c44cfcec8e83efd0fe053c432e55 --- M contrib/jenkins-run.sh M doc/examples/2g_osmocom/README.md A doc/examples/2g_osmocom/main.conf D doc/examples/2g_osmocom/paths.conf M doc/examples/4g_srsLTE/README.md A doc/examples/4g_srsLTE/main.conf D doc/examples/4g_srsLTE/paths.conf M doc/manuals/chapters/config.adoc M selftest/resource_test/resource_test.ok M selftest/resource_test/resource_test.py M selftest/scenario_test/scenario_test.ok M selftest/scenario_test/scenario_test.py M selftest/suite_test/suite_test.ok M selftest/suite_test/suite_test.py M src/osmo-gsm-tester.py M src/osmo_gsm_tester/core/config.py M src/osmo_gsm_tester/core/resource.py M sysmocom/README.md A sysmocom/main.conf D sysmocom/paths.conf D sysmocom/ttcn3/defaults.conf M sysmocom/ttcn3/jenkins-run.sh A sysmocom/ttcn3/main.conf D sysmocom/ttcn3/paths.conf 24 files changed, 290 insertions(+), 212 deletions(-) Approvals: pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins-run.sh b/contrib/jenkins-run.sh index 89ff13f..1c31a9d 100755 --- a/contrib/jenkins-run.sh +++ b/contrib/jenkins-run.sh @@ -2,7 +2,7 @@ set -e -x base="$PWD" SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P) # this file's directory -OSMO_GSM_TESTER_CONF=${OSMO_GSM_TESTER_CONF:-${SCRIPT_DIR}/../sysmocom} +OSMO_GSM_TESTER_CONF=${OSMO_GSM_TESTER_CONF:-${SCRIPT_DIR}/../sysmocom/main.conf} time_start="$(date '+%F %T')" diff --git a/doc/examples/2g_osmocom/README.md b/doc/examples/2g_osmocom/README.md index 47b0737..b85ee1f 100644 --- a/doc/examples/2g_osmocom/README.md +++ b/doc/examples/2g_osmocom/README.md @@ -1,13 +1,14 @@ This a sample 2G test suite configured and ready to use. The only thing missing is a trial dir containing binaries. -You can point osmo-gsm-tester.py at this config using the '-c $DIR' command line -argument, where DIR is the directory path where this README file resides. +You can point osmo-gsm-tester.py at this config using the '-c $DIR/main.conf' +command line argument, where DIR is the directory path where this README file +resides. If you have your trial with binary tar archives in ~/my_trial you can run the suite for example like this: ``` -osmo-gsm-tester.py -c $DIR ~/my_trial +osmo-gsm-tester.py -c $DIR/main.conf ~/my_trial ``` Alternatively you can setup this example as default config for your user by @@ -19,4 +20,4 @@ A ./state dir will be created to store the current osmo-gsm-tester state. If you prefer not to write to $DIR, set up an own configuration pointing at a -different path (see paths.conf: 'state_dir'). +different path (see main.conf: 'state_dir'). diff --git a/doc/examples/2g_osmocom/main.conf b/doc/examples/2g_osmocom/main.conf new file mode 100644 index 000..b810519 --- /dev/null +++ b/doc/examples/2g_osmocom/main.conf @@ -0,0 +1,6 @@ +state_dir: '/var/tmp/osmo-gsm-tester/state' +suites_dir: './suites' +scenarios_dir: './scenarios' +default_suites_conf_path: './default-suites.conf' +defaults_conf_path: './defaults.conf' +resource_conf_path: './resources.conf' diff --git a/doc/examples/2g_osmocom/paths.conf b/doc/examples/2g_osmocom/paths.conf deleted file mode 100644 index 27c5818..000 --- a/doc/examples/2g_osmocom/paths.conf +++ /dev/null @@ -1,3 +0,0 @@ -state_dir: '/var/tmp/osmo-gsm-tester/state' -suites_dir: './suites' -scenarios_dir: './scenarios' diff --git a/doc/examples/4g_srsLTE/README.md b/doc/examples/4g_srsLTE/README.md index b577035..09af755 100644 --- a/doc/examples/4g_srsLTE/README.md +++ b/doc/examples/4g_srsLTE/README.md @@ -1,13 +1,14 @@ This a sample 4G test suite configured and ready to use srsLTE stack. The only thing missing is a trial dir containing binaries. -You can point osmo-gsm-tester.py at this config using the '-c $DIR' command line -argument, where DIR is the directory path where this README file resides. +You can point osmo-gsm-tester.py at this config using the '-c $DIR/main.conf' +command line argument, where DIR is the directory path where this README file +resides. If you have your trial with binary tar archives in ~/my_trial you can run the suite for example like this: ``` -osmo-gsm-tester.py -c $DIR
Change in osmo-gsm-tester[master]: Cmdline arg -c sets main configuration file (old paths.conf) instead ...
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18204 to look at the new patch set (#4). Change subject: Cmdline arg -c sets main configuration file (old paths.conf) instead of dir containing it .. Cmdline arg -c sets main configuration file (old paths.conf) instead of dir containing it It has been notified that current configuration system is difficult to understand and to use, so it has been envisioned to refactor it a bit. The idea is that the user passes a -c path/to/main.conf file, which in turn contains whatever osmo-gsm-tester main settings supports (basically what old paths.conf used to be, plus some files harcoded to the same -c directory are now configurable through the main configuration file). Change-Id: Ieca65b71b543c44cfcec8e83efd0fe053c432e55 --- M contrib/jenkins-run.sh M doc/examples/2g_osmocom/README.md A doc/examples/2g_osmocom/main.conf D doc/examples/2g_osmocom/paths.conf M doc/examples/4g_srsLTE/README.md A doc/examples/4g_srsLTE/main.conf D doc/examples/4g_srsLTE/paths.conf M doc/manuals/chapters/config.adoc M selftest/resource_test/resource_test.ok M selftest/resource_test/resource_test.py M selftest/scenario_test/scenario_test.ok M selftest/scenario_test/scenario_test.py M selftest/suite_test/suite_test.ok M selftest/suite_test/suite_test.py M src/osmo-gsm-tester.py M src/osmo_gsm_tester/core/config.py M src/osmo_gsm_tester/core/resource.py M sysmocom/README.md A sysmocom/main.conf D sysmocom/paths.conf D sysmocom/ttcn3/defaults.conf M sysmocom/ttcn3/jenkins-run.sh A sysmocom/ttcn3/main.conf D sysmocom/ttcn3/paths.conf 24 files changed, 290 insertions(+), 212 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/04/18204/4 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18204 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Ieca65b71b543c44cfcec8e83efd0fe053c432e55 Gerrit-Change-Number: 18204 Gerrit-PatchSet: 4 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset
Change in osmo-gsm-tester[master]: Cmdline arg -c sets main configuration file (old paths.conf) instead ...
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18204 ) Change subject: Cmdline arg -c sets main configuration file (old paths.conf) instead of dir containing it .. Patch Set 3: This change is ready for review. -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18204 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Ieca65b71b543c44cfcec8e83efd0fe053c432e55 Gerrit-Change-Number: 18204 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 May 2020 11:13:03 + Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment
Change in osmo-gsm-tester[master]: Cmdline arg -c sets main configuration file (old paths.conf) instead ...
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18204 ) Change subject: Cmdline arg -c sets main configuration file (old paths.conf) instead of dir containing it .. Cmdline arg -c sets main configuration file (old paths.conf) instead of dir containing it It has been notified that current configuration system is difficult to understand and to use, so it has been envisioned to refactor it a bit. The idea is that the user passes a -c path/to/main.conf file, which in turn contains whatever osmo-gsm-tester main settings supports (basically what old paths.conf used to be, plus some files harcoded to the same -c directory are now configurable through the main configuration file). TODO: * Update documentation * Update sample config files (doc/examples). * Trial loaded from main.conf if not overriden by cmdline Change-Id: Ieca65b71b543c44cfcec8e83efd0fe053c432e55 --- M contrib/jenkins-run.sh M selftest/resource_test/resource_test.py M selftest/scenario_test/scenario_test.py M selftest/suite_test/suite_test.py M src/osmo-gsm-tester.py M src/osmo_gsm_tester/core/config.py M src/osmo_gsm_tester/core/resource.py R sysmocom/main.conf M sysmocom/ttcn3/jenkins-run.sh R sysmocom/ttcn3/main.conf 10 files changed, 108 insertions(+), 80 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/04/18204/1 diff --git a/contrib/jenkins-run.sh b/contrib/jenkins-run.sh index 89ff13f..1c31a9d 100755 --- a/contrib/jenkins-run.sh +++ b/contrib/jenkins-run.sh @@ -2,7 +2,7 @@ set -e -x base="$PWD" SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P) # this file's directory -OSMO_GSM_TESTER_CONF=${OSMO_GSM_TESTER_CONF:-${SCRIPT_DIR}/../sysmocom} +OSMO_GSM_TESTER_CONF=${OSMO_GSM_TESTER_CONF:-${SCRIPT_DIR}/../sysmocom/main.conf} time_start="$(date '+%F %T')" diff --git a/selftest/resource_test/resource_test.py b/selftest/resource_test/resource_test.py index b74ba2a..f18aa73 100755 --- a/selftest/resource_test/resource_test.py +++ b/selftest/resource_test/resource_test.py @@ -13,7 +13,7 @@ workdir = util.get_tempdir() # override config locations to make sure we use only the test conf -config.override_conf = os.path.join(os.path.dirname(sys.argv[0]), 'conf') +config.override_conf = os.path.join(os.path.dirname(sys.argv[0]), 'conf', 'paths.conf') log.get_process_id = lambda: '123-1490837279' diff --git a/selftest/scenario_test/scenario_test.py b/selftest/scenario_test/scenario_test.py index f5f42f7..15f8983 100755 --- a/selftest/scenario_test/scenario_test.py +++ b/selftest/scenario_test/scenario_test.py @@ -18,7 +18,7 @@ 'foobar' : schema.BOOL_STR, } -config.override_conf = os.path.join(os.path.dirname(sys.argv[0])) +config.override_conf = os.path.join(os.path.dirname(sys.argv[0]), 'paths.conf') def print_scenario(sc): # we use copy() to be able to get the dictionary in super class of Scenario: diff --git a/selftest/suite_test/suite_test.py b/selftest/suite_test/suite_test.py index a096027..4b32439 100755 --- a/selftest/suite_test/suite_test.py +++ b/selftest/suite_test/suite_test.py @@ -11,7 +11,7 @@ from osmo_gsm_tester.core import suite from osmo_gsm_tester.core.schema import generate_schemas, get_all_schema -config.override_conf = os.path.join(os.path.dirname(sys.argv[0])) +config.override_conf = os.path.join(os.path.dirname(sys.argv[0]), 'paths.conf') example_trial_dir = os.path.join('test_trial_tmp') diff --git a/src/osmo-gsm-tester.py b/src/osmo-gsm-tester.py index fb5574b..204b1c7 100755 --- a/src/osmo-gsm-tester.py +++ b/src/osmo-gsm-tester.py @@ -24,9 +24,9 @@ Examples: -./osmo-gsm-tester.py -c doc/examples/2g_osmocom/ ~/my_trial_package/ -s osmo_trx -./osmo-gsm-tester.py -c doc/examples/2g_osmocom/ ~/my_trial_package/ -s sms_tests:dyn_ts+eu_band+bts_sysmo -./osmo-gsm-tester.py -c sysmocom/ ~/my_trial_package/ -s sms_tests/mo_mt_sms:bts_trx +./osmo-gsm-tester.py -c doc/examples/2g_osmocom/main.conf ~/my_trial_package/ -s osmo_trx +./osmo-gsm-tester.py -c doc/examples/2g_osmocom/main.conf ~/my_trial_package/ -s sms_tests:dyn_ts+eu_band+bts_sysmo +./osmo-gsm-tester.py -c sysmocom/main.conf ~/my_trial_package/ -s sms_tests/mo_mt_sms:bts_trx (The names for test suites and scenarios used in these examples must be defined by the osmo-gsm-tester configuration.) @@ -54,8 +54,9 @@ A test run thus needs to define: * A trial package containing built binaries * A set of test suites, each with its combinations of scenarios -* A configuration directory specifying sets of resources, default configurations - and paths on where to find suites, scenarios, etc. +* A main configuration file specifying paths to other files containing sets of + resources, default configurations and paths on where to find suites, + scenarios, etc. If no combination of suites and scenarios is provided, the default list of suites will be run as defined