aboutsummaryrefslogtreecommitdiffstats
path: root/selftest
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-04-12 02:42:02 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-04-12 03:13:03 +0200
commit17c139ef4c8aaea9477ba34092fe453afd417c49 (patch)
tree4e7d3b7561e0d757d3d5b65b486776a1a65dab3b /selftest
parentb818b2f0967678fb7c89faa53fd21a3f71a3b779 (diff)
octphy (untested); fix regression test expectations
Diffstat (limited to 'selftest')
-rw-r--r--selftest/conf/resources.conf10
-rw-r--r--selftest/real_suite/default-suites.conf2
-rw-r--r--selftest/real_suite/default.conf6
-rw-r--r--selftest/real_suite/resources.conf13
-rw-r--r--selftest/real_suite/scenarios/octphy.conf3
-rw-r--r--selftest/resource_test.ok66
-rw-r--r--selftest/suite_test.ok26
-rwxr-xr-xselftest/suite_test.py2
-rw-r--r--selftest/suite_test/paths.conf2
-rw-r--r--selftest/suite_test/resources.conf133
-rw-r--r--selftest/trial_test.ok6
11 files changed, 227 insertions, 42 deletions
diff --git a/selftest/conf/resources.conf b/selftest/conf/resources.conf
index 84c85d0..c17acf5 100644
--- a/selftest/conf/resources.conf
+++ b/selftest/conf/resources.conf
@@ -8,25 +8,25 @@ nitb_iface:
bts:
- label: sysmoBTS 1002
type: sysmo
- unit_id: 1
+ ipa_unit_id: 1
addr: 10.42.42.114
band: GSM-1800
- label: octBTS 3000
type: oct
- unit_id: 5
+ ipa_unit_id: 5
addr: 10.42.42.115
band: GSM-1800
trx:
- - hwaddr: 00:0c:90:32:b5:8a
+ - hw_addr: 00:0c:90:32:b5:8a
- label: nanoBTS 1900
type: nanobts
- unit_id: 1902
+ ipa_unit_id: 1902
addr: 10.42.42.190
band: GSM-1900
trx:
- - hwaddr: 00:02:95:00:41:b3
+ - hw_addr: 00:02:95:00:41:b3
arfcn:
- arfcn: 512
diff --git a/selftest/real_suite/default-suites.conf b/selftest/real_suite/default-suites.conf
index 601076a..27a1eee 100644
--- a/selftest/real_suite/default-suites.conf
+++ b/selftest/real_suite/default-suites.conf
@@ -1 +1,3 @@
- sms:sysmo
+- sms:trx
+- sms:octphy
diff --git a/selftest/real_suite/default.conf b/selftest/real_suite/default.conf
index 251a7b8..8c7d1e5 100644
--- a/selftest/real_suite/default.conf
+++ b/selftest/real_suite/default.conf
@@ -23,9 +23,3 @@ nitb_bts:
- phys_chan_config: TCH/F_TCH/H_PDCH
- phys_chan_config: TCH/F_TCH/H_PDCH
- phys_chan_config: TCH/F_TCH/H_PDCH
-
-osmo_bts_sysmo:
- ipa_unit_id: 1123
-
-osmo_bts_trx:
- ipa_unit_id: 1124
diff --git a/selftest/real_suite/resources.conf b/selftest/real_suite/resources.conf
index 5fe4ca5..3a5b129 100644
--- a/selftest/real_suite/resources.conf
+++ b/selftest/real_suite/resources.conf
@@ -8,31 +8,32 @@ nitb_iface:
bts:
- label: sysmoBTS 1002
type: sysmo
- unit_id: 1
+ ipa_unit_id: 1
addr: 10.42.42.114
band: GSM-1800
- label: octBTS 3000
type: oct
- unit_id: 5
+ ipa_unit_id: 5
addr: 10.42.42.115
band: GSM-1800
trx:
- - hwaddr: 00:0c:90:32:b5:8a
+ - hw_addr: 00:0c:90:32:b5:8a
+ net_device: eth0.2342
- label: Ettus B210
type: osmotrx
- unit_id: 6
+ ipa_unit_id: 6
addr: 10.42.42.116
band: GSM-1800
- label: nanoBTS 1900
type: nanobts
- unit_id: 1902
+ ipa_unit_id: 1902
addr: 10.42.42.190
band: GSM-1900
trx:
- - hwaddr: 00:02:95:00:41:b3
+ - hw_addr: 00:02:95:00:41:b3
arfcn:
- arfcn: 512
diff --git a/selftest/real_suite/scenarios/octphy.conf b/selftest/real_suite/scenarios/octphy.conf
new file mode 100644
index 0000000..02eb48b
--- /dev/null
+++ b/selftest/real_suite/scenarios/octphy.conf
@@ -0,0 +1,3 @@
+resources:
+ bts:
+ - type: octphy
diff --git a/selftest/resource_test.ok b/selftest/resource_test.ok
index 008c447..ae31d3b 100644
--- a/selftest/resource_test.ok
+++ b/selftest/resource_test.ok
@@ -40,26 +40,26 @@ ok, caused exception: RuntimeError('Refusing to drop a list of resources from it
{'_hash': 'dc9ce027a257da087f31a5bc1ee6b4abd2637369',
'arfcn': '548',
'band': 'GSM-1900'}],
- 'bts': [{'_hash': 'a7c6d2ebaeb139e8c2e7d45c3495d046d7439007',
+ 'bts': [{'_hash': '07d9c8aaa940b674efcbbabdd69f58a6ce4e94f9',
'addr': '10.42.42.114',
'band': 'GSM-1800',
+ 'ipa_unit_id': '1',
'label': 'sysmoBTS 1002',
- 'type': 'sysmo',
- 'unit_id': '1'},
- {'_hash': '02540ab9eb556056a0b4d28443bc9f4793f6d549',
+ 'type': 'sysmo'},
+ {'_hash': '76c8d2f459113cd6c99ed62d1a94bbe9a291ba94',
'addr': '10.42.42.115',
'band': 'GSM-1800',
+ 'ipa_unit_id': '5',
'label': 'octBTS 3000',
- 'trx': [{'hwaddr': '00:0c:90:32:b5:8a'}],
- 'type': 'oct',
- 'unit_id': '5'},
- {'_hash': '556c954d475d12cf0dc622c0df5743cac5543fa0',
+ 'trx': [{'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': [{'hwaddr': '00:02:95:00:41:b3'}],
- 'type': 'nanobts',
- 'unit_id': '1902'}],
+ 'trx': [{'hw_addr': '00:02:95:00:41:b3'}],
+ 'type': 'nanobts'}],
'modem': [{'_hash': '19c69e45aa090fb511446bd00797690aa82ff52f',
'imsi': '901700000007801',
'ki': 'D620F48487B1B782DA55DF6717F08FF9',
@@ -149,10 +149,42 @@ ok, caused exception: RuntimeError('Refusing to drop a list of resources from it
*** end: all resources
- request some resources
---- (want='nitb_iface'): DBG: Looking for 1 x nitb_iface , candidates: 3
--- (want='arfcn'): DBG: Looking for 2 x arfcn , candidates: 10
+--- (want='arfcn'): DBG: Picked - _hash: e620569450f8259b3f0212ec19c285dd07df063c
+ arfcn: '512'
+ band: GSM-1800
+- _hash: 022621e513c5a5bf33b77430a1e9c886be676fa1
+ arfcn: '514'
+ band: GSM-1800
--- (want='bts'): DBG: Looking for 2 x bts , candidates: 3
+--- (want='bts'): DBG: Picked - _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:
+ - hw_addr: 00:0c:90:32:b5:8a
+ type: oct
--- (want='modem'): DBG: Looking for 2 x modem , candidates: 16
+--- (want='modem'): DBG: Picked - _hash: 19c69e45aa090fb511446bd00797690aa82ff52f
+ imsi: '901700000007801'
+ ki: D620F48487B1B782DA55DF6717F08FF9
+ label: m7801
+ path: /wavecom_0
+- _hash: e1a46516a1fb493b2617ab14fc1693a9a45ec254
+ imsi: '901700000007802'
+ ki: 47FDB2D55CE6A10A85ABDAD034A5B7B3
+ label: m7802
+ path: /wavecom_1
+--- (want='nitb_iface'): DBG: Looking for 1 x nitb_iface , candidates: 3
+--- (want='nitb_iface'): DBG: Picked - _hash: cde1debf28f07f94f92c761b4b7c6bf35785ced4
+ addr: 10.42.42.1
~~~ currently reserved:
arfcn:
- _hash: e620569450f8259b3f0212ec19c285dd07df063c
@@ -164,22 +196,22 @@ arfcn:
arfcn: '514'
band: GSM-1800
bts:
-- _hash: a7c6d2ebaeb139e8c2e7d45c3495d046d7439007
+- _hash: 07d9c8aaa940b674efcbbabdd69f58a6ce4e94f9
_reserved_by: testowner-123-1490837279
addr: 10.42.42.114
band: GSM-1800
+ ipa_unit_id: '1'
label: sysmoBTS 1002
type: sysmo
- unit_id: '1'
-- _hash: 02540ab9eb556056a0b4d28443bc9f4793f6d549
+- _hash: 76c8d2f459113cd6c99ed62d1a94bbe9a291ba94
_reserved_by: testowner-123-1490837279
addr: 10.42.42.115
band: GSM-1800
+ ipa_unit_id: '5'
label: octBTS 3000
trx:
- - hwaddr: 00:0c:90:32:b5:8a
+ - hw_addr: 00:0c:90:32:b5:8a
type: oct
- unit_id: '5'
modem:
- _hash: 19c69e45aa090fb511446bd00797690aa82ff52f
_reserved_by: testowner-123-1490837279
diff --git a/selftest/suite_test.ok b/selftest/suite_test.ok
index c0232dd..fe7fbcb 100644
--- a/selftest/suite_test.ok
+++ b/selftest/suite_test.ok
@@ -1,8 +1,8 @@
- non-existing suite dir
---- -: ERR: RuntimeError: Suite not found: 'does_not_exist' in ./suite_test
+--- -: ERR: RuntimeError: Suite not found: 'does_not_exist' in ./suite_test/.
- no suite.conf
cnf empty_dir: DBG: reading suite.conf [empty_dir↪empty_dir]
---- ./suite_test/empty_dir/suite.conf: ERR: FileNotFoundError: [Errno 2] No such file or directory: './suite_test/empty_dir/suite.conf' [empty_dir↪./suite_test/empty_dir/suite.conf]
+--- ./suite_test/./empty_dir/suite.conf: ERR: FileNotFoundError: [Errno 2] No such file or directory: './suite_test/./empty_dir/suite.conf' [empty_dir↪./suite_test/./empty_dir/suite.conf]
- valid suite dir
cnf test_suite: DBG: reading suite.conf [test_suite↪test_suite]
defaults:
@@ -17,9 +17,27 @@ resources:
- run hello world test
tst test_suite: reserving resources...
---- (want='nitb_iface'): DBG: Looking for 1 x nitb_iface , candidates: 3
---- (want='modem'): DBG: Looking for 2 x modem , candidates: 16
--- (want='bts'): DBG: Looking for 1 x bts , candidates: 3
+--- (want='bts'): DBG: Picked - _hash: 07d9c8aaa940b674efcbbabdd69f58a6ce4e94f9
+ addr: 10.42.42.114
+ band: GSM-1800
+ ipa_unit_id: '1'
+ label: sysmoBTS 1002
+ type: sysmo
+--- (want='modem'): DBG: Looking for 2 x modem , candidates: 16
+--- (want='modem'): DBG: Picked - _hash: 19c69e45aa090fb511446bd00797690aa82ff52f
+ imsi: '901700000007801'
+ ki: D620F48487B1B782DA55DF6717F08FF9
+ label: m7801
+ path: /wavecom_0
+- _hash: e1a46516a1fb493b2617ab14fc1693a9a45ec254
+ imsi: '901700000007802'
+ ki: 47FDB2D55CE6A10A85ABDAD034A5B7B3
+ label: m7802
+ path: /wavecom_1
+--- (want='nitb_iface'): DBG: Looking for 1 x nitb_iface , candidates: 3
+--- (want='nitb_iface'): DBG: Picked - _hash: cde1debf28f07f94f92c761b4b7c6bf35785ced4
+ addr: 10.42.42.1
tst hello_world.py: START [test_suite↪hello_world.py]
tst hello_world.py:3: hello world [test_suite↪hello_world.py:3]
tst hello_world.py:4: I am 'test_suite' / 'hello_world.py:4' [test_suite↪hello_world.py:4]
diff --git a/selftest/suite_test.py b/selftest/suite_test.py
index 8c0e6e8..cbbd6be 100755
--- a/selftest/suite_test.py
+++ b/selftest/suite_test.py
@@ -3,7 +3,7 @@ import os
import _prep
from osmo_gsm_tester import log, suite, config
-config.ENV_CONF = os.path.join(os.getcwd(), 'conf')
+config.ENV_CONF = './suite_test'
#log.style_change(trace=True)
diff --git a/selftest/suite_test/paths.conf b/selftest/suite_test/paths.conf
new file mode 100644
index 0000000..2b0a274
--- /dev/null
+++ b/selftest/suite_test/paths.conf
@@ -0,0 +1,2 @@
+state_dir: ./test_work/state_dir
+suites_dir: .
diff --git a/selftest/suite_test/resources.conf b/selftest/suite_test/resources.conf
new file mode 100644
index 0000000..c17acf5
--- /dev/null
+++ b/selftest/suite_test/resources.conf
@@ -0,0 +1,133 @@
+# all hardware and interfaces available to this osmo-gsm-tester
+
+nitb_iface:
+- addr: 10.42.42.1
+- addr: 10.42.42.2
+- addr: 10.42.42.3
+
+bts:
+- label: sysmoBTS 1002
+ type: sysmo
+ ipa_unit_id: 1
+ addr: 10.42.42.114
+ band: GSM-1800
+
+- label: octBTS 3000
+ type: oct
+ ipa_unit_id: 5
+ addr: 10.42.42.115
+ band: GSM-1800
+ trx:
+ - hw_addr: 00:0c:90:32:b5:8a
+
+- label: nanoBTS 1900
+ type: nanobts
+ ipa_unit_id: 1902
+ addr: 10.42.42.190
+ band: GSM-1900
+ trx:
+ - hw_addr: 00:02:95:00:41:b3
+
+arfcn:
+ - arfcn: 512
+ band: GSM-1800
+ - arfcn: 514
+ band: GSM-1800
+ - arfcn: 516
+ band: GSM-1800
+ - arfcn: 518
+ band: GSM-1800
+ - arfcn: 520
+ band: GSM-1800
+
+ - arfcn: 540
+ band: GSM-1900
+ - arfcn: 542
+ band: GSM-1900
+ - arfcn: 544
+ band: GSM-1900
+ - arfcn: 546
+ band: GSM-1900
+ - arfcn: 548
+ band: GSM-1900
+
+modem:
+- label: m7801
+ path: '/wavecom_0'
+ imsi: 901700000007801
+ ki: D620F48487B1B782DA55DF6717F08FF9
+
+- label: m7802
+ path: '/wavecom_1'
+ imsi: 901700000007802
+ ki: 47FDB2D55CE6A10A85ABDAD034A5B7B3
+
+- label: m7803
+ path: '/wavecom_2'
+ imsi: 901700000007803
+ ki: ABBED4C91417DF710F60675B6EE2C8D2
+
+- label: m7804
+ path: '/wavecom_3'
+ imsi: 901700000007804
+ ki: 8BA541179156F2BF0918CA3CFF9351B0
+
+- label: m7805
+ path: '/wavecom_4'
+ imsi: 901700000007805
+ ki: 82BEC24B5B50C9FAA69D17DEC0883A23
+
+- label: m7806
+ path: '/wavecom_5'
+ imsi: 901700000007806
+ ki: DAF6BD6A188F7A4F09866030BF0F723D
+
+- label: m7807
+ path: '/wavecom_6'
+ imsi: 901700000007807
+ ki: AEB411CFE39681A6352A1EAE4DDC9DBA
+
+- label: m7808
+ path: '/wavecom_7'
+ imsi: 901700000007808
+ ki: F5DEF8692B305D7A65C677CA9EEE09C4
+
+- label: m7809
+ path: '/wavecom_8'
+ imsi: 901700000007809
+ ki: A644F4503E812FD75329B1C8D625DA44
+
+- label: m7810
+ path: '/wavecom_9'
+ imsi: 901700000007810
+ ki: EF663BDF3477DCD18D3D2293A2BAED67
+
+- label: m7811
+ path: '/wavecom_10'
+ imsi: 901700000007811
+ ki: E88F37F048A86A9BC4D652539228C039
+
+- label: m7812
+ path: '/wavecom_11'
+ imsi: 901700000007812
+ ki: E8D940DD66FCF6F1CD2C0F8F8C45633D
+
+- label: m7813
+ path: '/wavecom_12'
+ imsi: 901700000007813
+ ki: DBF534700C10141C49F699B0419107E3
+
+- label: m7814
+ path: '/wavecom_13'
+ imsi: 901700000007814
+ ki: B36021DEB90C4EA607E408A92F3B024D
+
+- label: m7815
+ path: '/wavecom_14'
+ imsi: 901700000007815
+ ki: 1E209F6F839F9195778C4F96BE281A24
+
+- label: m7816
+ path: '/wavecom_15'
+ imsi: 901700000007816
+ ki: BF827D219E739DD189F6F59E60D6455C
diff --git a/selftest/trial_test.ok b/selftest/trial_test.ok
index 0b3e31a..66dcff0 100644
--- a/selftest/trial_test.ok
+++ b/selftest/trial_test.ok
@@ -3,10 +3,10 @@
[TMP]/second
[TMP]/third
- fetch trial dirs in order
-[TMP]/first
+first
['taken']
-[TMP]/second
-[TMP]/third
+second
+third
- no more trial dirs left
None
- test checksum verification