aboutsummaryrefslogtreecommitdiffstats
path: root/selftest/resource_test
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-05-11 18:30:58 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2020-05-12 14:07:29 +0200
commit6c6c0e85992beee8123e9afff9583034781b01e5 (patch)
tree60a5bbf3d70b10b98c372b8058a0b09034eaeb98 /selftest/resource_test
parent0433c9b6719539575474cd45ffd46fc5a5c947e2 (diff)
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
Diffstat (limited to 'selftest/resource_test')
-rw-r--r--selftest/resource_test/resource_test.ok14
-rwxr-xr-xselftest/resource_test/resource_test.py2
2 files changed, 9 insertions, 7 deletions
diff --git a/selftest/resource_test/resource_test.ok b/selftest/resource_test/resource_test.ok
index bbdbc5b..8a0b52f 100644
--- a/selftest/resource_test/resource_test.ok
+++ b/selftest/resource_test/resource_test.ok
@@ -9,12 +9,14 @@ The requested resource requirements are not solvable [[0, 2], [2], [0, 2]]
ok, caused exception RuntimeError: Refusing to drop a list of resources from itself. This is probably a bug where a list of Resources() should have been copied but is passed as-is. use Resources.clear() instead.
- test removing a Resources list from one with the same list in it
- test resources config and state dir:
-cnf -: DBG: Found config file paths.conf as [PATH]/selftest/resource_test/conf/paths.conf in [PATH]/selftest/resource_test/conf which is [PATH]/selftest/resource_test/conf
-cnf -: DBG: [PATH]/selftest/resource_test/conf/paths.conf: relative path ./test_work/state_dir is [PATH]/selftest/resource_test/conf/test_work/state_dir
-cnf -: DBG: [PATH]/selftest/resource_test/conf/paths.conf: relative path ./suite_test is [PATH]/selftest/resource_test/conf/suite_test
-cnf -: DBG: Found path state_dir as [PATH]/selftest/resource_test/conf/test_work/state_dir
-cnf ResourcesPool: DBG: Found config file resources.conf as [PATH]/selftest/resource_test/conf/resources.conf in [PATH]/selftest/resource_test/conf which is [PATH]/selftest/resource_test/conf
-cnf ResourcesPool: DBG: Found path state_dir as [PATH]/selftest/resource_test/conf/test_work/state_dir
+cnf -: DBG: Found main configuration file in [PATH]/selftest/resource_test/conf/paths.conf which is [PATH]/selftest/resource_test/conf/paths.conf
+cnf -: DBG: MAIN CONFIG:
+{'default_suites_conf_path': '[PATH]/selftest/resource_test/conf/default-suites.conf',
+ 'defaults_conf_path': '[PATH]/selftest/resource_test/conf/defaults.conf',
+ 'resource_conf_path': '[PATH]/selftest/resource_test/conf/resources.conf',
+ 'scenarios_dir': '[PATH]/selftest/resource_test/conf/scenarios',
+ 'state_dir': '[PATH]/selftest/resource_test/conf/test_work/state_dir',
+ 'suites_dir': '[PATH]/selftest/resource_test/conf/suite_test'}
*** all resources:
{'arfcn': [{'_hash': 'e620569450f8259b3f0212ec19c285dd07df063c',
'arfcn': '512',
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 @@ from osmo_gsm_tester.core.schema import generate_schemas
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'