summaryrefslogtreecommitdiffstats
path: root/selftest
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2017-09-14 15:55:49 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2017-09-16 21:59:44 +0200
commitcbc724204c212988b97122f723414698bb602dcc (patch)
tree3a4ab7a44429672972eb19397ff05d3d91982f58 /selftest
parent5847551640e9ac6730b56aec1b6c3fd930354a84 (diff)
suite_test: Update tests to check new feature fixes
Now that combination and matching of lists works properly, update the suite test to check a more complex scenario. Change-Id: Ib0b82dc0c2a7f27cd6b2ffc32eed5f1287692ddc
Diffstat (limited to 'selftest')
-rw-r--r--selftest/suite_test.ok114
-rwxr-xr-xselftest/suite_test.py2
-rw-r--r--selftest/suite_test/test_suite/suite.conf4
3 files changed, 69 insertions, 51 deletions
diff --git a/selftest/suite_test.ok b/selftest/suite_test.ok
index 9c73588..cd5a9e7 100644
--- a/selftest/suite_test.ok
+++ b/selftest/suite_test.ok
@@ -15,8 +15,10 @@ defaults:
timeout: 60s
resources:
bts:
+ - label: sysmoCell 5000
+ times: '2'
- times: '1'
- - times: '2'
+ type: sysmo
ip_address:
- times: '1'
modem:
@@ -31,30 +33,37 @@ trial test_suite
---------------------------------------------------------------------
tst test_suite: reserving resources in [PATH]/selftest/suite_test/test_work/state_dir ...
tst test_suite: DBG: {combining='resources'}
-tst {combining_scenarios='resources'}: DBG: {definition_conf={bts=[{}, {}, {}], ip_address=[{}], modem=[{}, {}]}} [test_suite↪{combining_scenarios='resources'}]
+tst {combining_scenarios='resources'}: DBG: {definition_conf={bts=[{'label': 'sysmoCell 5000'}, {'label': 'sysmoCell 5000'}, {'type': 'sysmo'}], ip_address=[{}], modem=[{}, {}]}} [test_suite↪{combining_scenarios='resources'}]
tst test_suite: Reserving 3 x bts (candidates: 6)
-tst test_suite: DBG: Picked - _hash: 07d9c8aaa940b674efcbbabdd69f58a6ce4e94f9
+tst test_suite: DBG: Picked - _hash: 076ff06a4b719e61779492d3fb99f42a6635bb72
+ addr: 10.42.42.53
+ band: GSM-1800
+ ipa_unit_id: '7'
+ label: sysmoCell 5000
+ trx_list:
+ - max_power_red: '3'
+ nominal_power: '10'
+ - max_power_red: '0'
+ nominal_power: '12'
+ trx_remote_ip: 10.42.42.112
+ type: osmo-bts-trx
+- _hash: 9eaa928b04ce04b19dbae972f9bfc3eea6f5e249
+ addr: 10.42.42.53
+ band: GSM-1800
+ ipa_unit_id: '7'
+ label: sysmoCell 5000
+ trx_list:
+ - nominal_power: '10'
+ - max_power_red: '1'
+ nominal_power: '12'
+ trx_remote_ip: 10.42.42.112
+ type: osmo-bts-trx
+- _hash: 07d9c8aaa940b674efcbbabdd69f58a6ce4e94f9
addr: 10.42.42.114
band: GSM-1800
ipa_unit_id: '1'
label: sysmoBTS 1002
type: sysmo
-- _hash: 76c8d2f459113cd6c99ed62d1a94bbe9a291ba94
- addr: 10.42.42.115
- band: GSM-1800
- ipa_unit_id: '5'
- label: octBTS 3000
- trx_list:
- - hw_addr: 00:0c:90:32:b5:8a
- type: oct
-- _hash: 0b7fabd512b36aec43d7d496abd00af4e193b0f8
- addr: 10.42.42.190
- band: GSM-1900
- ipa_unit_id: '1902'
- label: nanoBTS 1900
- trx_list:
- - hw_addr: 00:02:95:00:41:b3
- type: nanobts
tst test_suite: Reserving 1 x ip_address (candidates: 3)
tst test_suite: DBG: Picked - _hash: cde1debf28f07f94f92c761b4b7c6bf35785ced4
addr: 10.42.42.1
@@ -166,31 +175,38 @@ trial test_suite
---------------------------------------------------------------------
tst test_suite: reserving resources in [PATH]/selftest/suite_test/test_work/state_dir ... [suite.py:[LINENR]]
tst test_suite: DBG: {combining='resources'} [suite.py:[LINENR]]
-tst {combining_scenarios='resources'}: DBG: {definition_conf={bts=[{}, {}, {}], ip_address=[{}], modem=[{}, {}]}} [test_suite↪{combining_scenarios='resources'}] [suite.py:[LINENR]]
+tst {combining_scenarios='resources'}: DBG: {definition_conf={bts=[{'label': 'sysmoCell 5000'}, {'label': 'sysmoCell 5000'}, {'type': 'sysmo'}], ip_address=[{}], modem=[{}, {}]}} [test_suite↪{combining_scenarios='resources'}] [suite.py:[LINENR]]
tst {combining_scenarios='resources', scenario='foo'}: [RESOURCE_DICT]
tst test_suite: Reserving 3 x bts (candidates: 6) [resource.py:[LINENR]]
-tst test_suite: DBG: Picked - _hash: 07d9c8aaa940b674efcbbabdd69f58a6ce4e94f9
+tst test_suite: DBG: Picked - _hash: 076ff06a4b719e61779492d3fb99f42a6635bb72
+ addr: 10.42.42.53
+ band: GSM-1800
+ ipa_unit_id: '7'
+ label: sysmoCell 5000
+ trx_list:
+ - max_power_red: '3'
+ nominal_power: '10'
+ - max_power_red: '0'
+ nominal_power: '12'
+ trx_remote_ip: 10.42.42.112
+ type: osmo-bts-trx
+- _hash: 9eaa928b04ce04b19dbae972f9bfc3eea6f5e249
+ addr: 10.42.42.53
+ band: GSM-1800
+ ipa_unit_id: '7'
+ label: sysmoCell 5000
+ trx_list:
+ - nominal_power: '10'
+ - max_power_red: '1'
+ nominal_power: '12'
+ trx_remote_ip: 10.42.42.112
+ type: osmo-bts-trx
+- _hash: 07d9c8aaa940b674efcbbabdd69f58a6ce4e94f9
addr: 10.42.42.114
band: GSM-1800
ipa_unit_id: '1'
label: sysmoBTS 1002
type: sysmo
-- _hash: 76c8d2f459113cd6c99ed62d1a94bbe9a291ba94
- addr: 10.42.42.115
- band: GSM-1800
- ipa_unit_id: '5'
- label: octBTS 3000
- trx_list:
- - hw_addr: 00:0c:90:32:b5:8a
- type: oct
-- _hash: 0b7fabd512b36aec43d7d496abd00af4e193b0f8
- addr: 10.42.42.190
- band: GSM-1900
- ipa_unit_id: '1902'
- label: nanoBTS 1900
- trx_list:
- - hw_addr: 00:02:95:00:41:b3
- type: nanobts
[resource.py:[LINENR]]
tst test_suite: Reserving 1 x ip_address (candidates: 3) [resource.py:[LINENR]]
tst test_suite: DBG: Picked - _hash: cde1debf28f07f94f92c761b4b7c6bf35785ced4
@@ -237,29 +253,29 @@ trial test_suite
---------------------------------------------------------------------
tst test_suite: reserving resources in [PATH]/selftest/suite_test/test_work/state_dir ... [suite.py:[LINENR]]
tst test_suite: DBG: {combining='resources'} [suite.py:[LINENR]]
-tst {combining_scenarios='resources'}: DBG: {definition_conf={bts=[{}, {}, {}], ip_address=[{}], modem=[{}, {}]}} [test_suite↪{combining_scenarios='resources'}] [suite.py:[LINENR]]
+tst {combining_scenarios='resources'}: DBG: {definition_conf={bts=[{'label': 'sysmoCell 5000'}, {'label': 'sysmoCell 5000'}, {'type': 'sysmo'}], ip_address=[{}], modem=[{}, {}]}} [test_suite↪{combining_scenarios='resources'}] [suite.py:[LINENR]]
tst {combining_scenarios='resources', scenario='foo'}: [RESOURCE_DICT]
tst test_suite: Reserving 3 x bts (candidates: 6) [resource.py:[LINENR]]
-tst test_suite: DBG: Picked - _hash: 89e45aaea42027162cc33f4389f055077338c82b
- addr: 10.42.42.52
+tst test_suite: DBG: Picked - _hash: 076ff06a4b719e61779492d3fb99f42a6635bb72
+ addr: 10.42.42.53
band: GSM-1800
- ipa_unit_id: '6'
- label: Ettus B200
- launch_trx: 'True'
+ ipa_unit_id: '7'
+ label: sysmoCell 5000
trx_list:
- - max_power_red: '2'
+ - max_power_red: '3'
nominal_power: '10'
- - nominal_power: '12'
+ - max_power_red: '0'
+ nominal_power: '12'
+ trx_remote_ip: 10.42.42.112
type: osmo-bts-trx
-- _hash: 076ff06a4b719e61779492d3fb99f42a6635bb72
+- _hash: 9eaa928b04ce04b19dbae972f9bfc3eea6f5e249
addr: 10.42.42.53
band: GSM-1800
ipa_unit_id: '7'
label: sysmoCell 5000
trx_list:
- - max_power_red: '3'
- nominal_power: '10'
- - max_power_red: '0'
+ - nominal_power: '10'
+ - max_power_red: '1'
nominal_power: '12'
trx_remote_ip: 10.42.42.112
type: osmo-bts-trx
diff --git a/selftest/suite_test.py b/selftest/suite_test.py
index 12bd5e7..a8b0f37 100755
--- a/selftest/suite_test.py
+++ b/selftest/suite_test.py
@@ -45,7 +45,7 @@ print(output)
print('- test with half empty scenario')
trial = log.Origin(log.C_TST, 'trial')
scenario = config.Scenario('foo', 'bar')
-scenario['resources'] = { 'bts': [{'type': 'sysmo'}] }
+scenario['resources'] = { 'bts': [{'type': 'osmo-bts-trx'}] }
s = suite.SuiteRun(trial, 'test_suite', s_def, [scenario])
results = s.run_tests('hello_world.py')
print(report.suite_to_text(s))
diff --git a/selftest/suite_test/test_suite/suite.conf b/selftest/suite_test/test_suite/suite.conf
index 890f66a..925dedb 100644
--- a/selftest/suite_test/test_suite/suite.conf
+++ b/selftest/suite_test/test_suite/suite.conf
@@ -2,8 +2,10 @@ resources:
ip_address:
- times: 1
bts:
- - times: 1
- times: 2
+ label: sysmoCell 5000
+ - times: 1
+ type: sysmo
modem:
- times: 2