osmo-gsm-tester/selftest
Pau Espin 43737dab90 config: Fix combination of lists
This commit fixes combination of resources containing lists.

For lists containing complex types, it has been decided to handle them
as sorted list, where position in list matters. In this case, combine is
called recursively for each element in dest and src sharing position in
the list, and assumes that if one list is shorter than the other, then
it has to be combined against empty set for that tye.
For instance this is useful when defining trx_list properties, where a
BTS can have a different amount of TRX but we may be interested in
restricting the first TRX and don't care about extra TRX.

For lists containing simple types (eg. integers or strings), we just want
to merge both lists and we only need to check if the value is already there,
ie. handle them as unsortered sets. This case won't work if we call combine
for each element of the list because for a simple case it will just end up
checking if a[i] == b[i].
This kind of operation for simple types is needed in later commits where
cipher attribute is introduced. Without this patch, having following 2
scenarios and trying them to use together "-s foosuite:cipher-a50+ciphera51"
will fail:

cipher_a50.conf:
  bts:
  - ciphers:
    - 'a5 0'

cipher_a51.conf
  bts:
  - ciphers:
    - 'a5 1'

ValueError: cannot combine dicts, conflicting items (values 'a5 0' and 'a5 1')

Change-Id: Ib7a38f10eb9de338a77bf1fa3afceb9df1532015
2017-09-16 19:51:33 +00:00
..
conf rename resource nitb_iface to ip_address 2017-05-29 00:18:43 +02:00
config_test core implementation 2017-04-08 15:43:19 +02:00
dbus_test core implementation 2017-04-08 15:43:19 +02:00
process_test core implementation 2017-04-08 15:43:19 +02:00
py_import_test core implementation 2017-04-08 15:43:19 +02:00
suite_test Replicate resources based on times attr before combine time 2017-09-16 19:51:33 +00:00
template_test remove timer section from osmo-{bts,bsc}.cfg.tmpl 2017-07-20 11:54:49 +02:00
trial_test core implementation 2017-04-08 15:43:19 +02:00
Makefile core implementation 2017-04-08 15:43:19 +02:00
_prep.py log.py: tweak LogTarget list, require explicit LogTarget 2017-05-08 10:12:25 +00:00
all_tests.py core implementation 2017-04-08 15:43:19 +02:00
config_test.err core implementation 2017-04-08 15:43:19 +02:00
config_test.ok config: Fix combination of lists 2017-09-16 19:51:33 +00:00
config_test.py config: Fix combination of lists 2017-09-16 19:51:33 +00:00
lock_test.err core implementation 2017-04-08 15:43:19 +02:00
lock_test.ok fix util.py/FileLock and lock_test 2017-09-14 01:52:32 +02:00
lock_test.sh fix util.py/FileLock and lock_test 2017-09-14 01:52:32 +02:00
lock_test_help.py fix util.py/FileLock and lock_test 2017-09-14 01:52:32 +02:00
log_test.err core implementation 2017-04-08 15:43:19 +02:00
log_test.ok log_test.py: cosmetic follow-up 2017-06-13 13:32:37 +02:00
log_test.py log_test.py: cosmetic follow-up 2017-06-13 13:32:37 +02:00
misc.py core implementation 2017-04-08 15:43:19 +02:00
process_test.err core implementation 2017-04-08 15:43:19 +02:00
process_test.ok fix problem in origin ancestry: don't add self twice 2017-06-07 19:53:24 +02:00
process_test.ok.ign Add microsecond accuracy to log timestamps 2017-07-03 10:39:56 +00:00
process_test.py Add remote user for RemoteProcress 2017-05-04 13:16:21 +00:00
resource_test.err core implementation 2017-04-08 15:43:19 +02:00
resource_test.ok fix and refactor logging: drop 'with', simplify 2017-06-13 13:32:01 +02:00
resource_test.ok.ign config: resolve real paths from symlinks, add paths debug logging 2017-05-04 20:56:48 +00:00
resource_test.py Replicate resources based on times attr before combine time 2017-09-16 19:51:33 +00:00
sms_test.err sms_test: add output checks 2017-05-31 20:40:18 +02:00
sms_test.ok sms_test: add output checks 2017-05-31 20:40:18 +02:00
sms_test.py fix: Sms.__eq__ bug due to typo 2017-05-31 20:39:42 +02:00
suite_test.err core implementation 2017-04-08 15:43:19 +02:00
suite_test.ok Replicate resources based on times attr before combine time 2017-09-16 19:51:33 +00:00
suite_test.ok.ign Replicate resources based on times attr before combine time 2017-09-16 19:51:33 +00:00
suite_test.py Replicate resources based on times attr before combine time 2017-09-16 19:51:33 +00:00
template_test.err core implementation 2017-04-08 15:43:19 +02:00
template_test.ok nominal_power and max_power_red attrs can now be set per resource 2017-09-16 19:51:32 +00:00
template_test.py nominal_power and max_power_red attrs can now be set per resource 2017-09-16 19:51:32 +00:00
trial_test.err core implementation 2017-04-08 15:43:19 +02:00
trial_test.ok trial.py: Remove accidental double creation of file 2017-05-24 12:02:43 +00:00
trial_test.ok.ign trial: always use abspath 2017-05-15 14:25:24 +02:00
trial_test.py core implementation 2017-04-08 15:43:19 +02:00
util_test.err core implementation 2017-04-08 15:43:19 +02:00
util_test.ok core implementation 2017-04-08 15:43:19 +02:00
util_test.py core implementation 2017-04-08 15:43:19 +02:00