summaryrefslogtreecommitdiffstats
path: root/selftest/suite_test.ok
blob: 365fcaaf432c60f6f3ccf2ace73f86eb5160b5a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
- non-existing suite dir
cnf -: DBG: Found config file paths.conf as [PATH]/selftest/suite_test/paths.conf in ./suite_test which is [PATH]/selftest/suite_test
cnf -: DBG: [PATH]/selftest/suite_test/paths.conf: relative path ./test_work/state_dir is [PATH]/selftest/suite_test/test_work/state_dir
cnf -: DBG: [PATH]/selftest/suite_test/paths.conf: relative path . is [PATH]/selftest/suite_test
cnf -: DBG: Found path suites_dir as [PATH]/selftest/suite_test
--- -: ERR: RuntimeError: Suite not found: 'does_not_exist' in [PATH]/selftest/suite_test
- no suite.conf
cnf -: DBG: Found path suites_dir as [PATH]/selftest/suite_test
cnf empty_dir: DBG: reading suite.conf
cnf [PATH]/selftest/suite_test/empty_dir/suite.conf: ERR: FileNotFoundError: [Errno 2] No such file or directory: '[PATH]/selftest/suite_test/empty_dir/suite.conf'  [empty_dir↪[PATH]/selftest/suite_test/empty_dir/suite.conf]
- valid suite dir
cnf -: DBG: Found path suites_dir as [PATH]/selftest/suite_test
cnf test_suite: DBG: reading suite.conf
defaults:
  timeout: 60s
resources:
  bts:
  - times: '1'
  - times: '2'
  ip_address:
  - times: '1'
  modem:
  - times: '2'

- run hello world test
cnf ResourcesPool: DBG: Found config file resources.conf as [PATH]/selftest/suite_test/resources.conf in ./suite_test which is [PATH]/selftest/suite_test
cnf ResourcesPool: DBG: Found path state_dir as [PATH]/selftest/suite_test/test_work/state_dir

---------------------------------------------------------------------
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 test_suite: Reserving 3 x bts (candidates: 6)
tst test_suite: 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_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
tst test_suite: Reserving 2 x modem (candidates: 16)
tst test_suite: DBG: Picked - _hash: 19c69e45aa090fb511446bd00797690aa82ff52f
  imsi: '901700000007801'
  ki: D620F48487B1B782DA55DF6717F08FF9
  label: m7801
  path: /wavecom_0
- _hash: e1a46516a1fb493b2617ab14fc1693a9a45ec254
  imsi: '901700000007802'
  ki: 47FDB2D55CE6A10A85ABDAD034A5B7B3
  label: m7802
  path: /wavecom_1

----------------------------------------------
trial test_suite hello_world.py
----------------------------------------------
tst hello_world.py:[LINENR]: hello world  [test_suite↪hello_world.py:[LINENR]]
tst hello_world.py:[LINENR]: I am 'test_suite' / 'hello_world.py:[LINENR]'  [test_suite↪hello_world.py:[LINENR]]
tst hello_world.py:[LINENR]: one  [test_suite↪hello_world.py:[LINENR]]
tst hello_world.py:[LINENR]: two  [test_suite↪hello_world.py:[LINENR]]
tst hello_world.py:[LINENR]: three  [test_suite↪hello_world.py:[LINENR]]
tst hello_world.py:[LINENR] Test passed (N.N sec)  [test_suite↪hello_world.py]
---------------------------------------------------------------------
trial test_suite PASS
---------------------------------------------------------------------
PASS: test_suite (pass: 1, skip: 5)
    pass: hello_world.py (N.N sec)
    skip: mo_mt_sms.py
    skip: mo_sms.py
    skip: test_error.py
    skip: test_fail.py
    skip: test_fail_raise.py

- a test with an error

---------------------------------------------------------------------
trial test_suite
---------------------------------------------------------------------

----------------------------------------------
trial test_suite test_error.py
----------------------------------------------
tst test_error.py:[LINENR]: I am 'test_suite' / 'test_error.py:[LINENR]'  [test_suite↪test_error.py:[LINENR]]  [test_error.py:[LINENR]]
tst test_error.py:[LINENR]: ERR: AssertionError: test_error.py:[LINENR]: assert False  [test_suite↪test_error.py:[LINENR]]  [test_error.py:[LINENR]: assert False]
tst test_error.py:[LINENR]: Test FAILED (N.N sec)  [test_suite↪test_error.py:[LINENR]]  [suite.py:[LINENR]]
---------------------------------------------------------------------
trial test_suite FAIL
---------------------------------------------------------------------
FAIL: test_suite (fail: 1, skip: 5)
    skip: hello_world.py (N.N sec)
    skip: mo_mt_sms.py
    skip: mo_sms.py
    FAIL: test_error.py (N.N sec) AssertionError: test_error.py:[LINENR]: assert False
    skip: test_fail.py
    skip: test_fail_raise.py

- a test with a failure

---------------------------------------------------------------------
trial test_suite
---------------------------------------------------------------------

----------------------------------------------
trial test_suite test_fail.py
----------------------------------------------
tst test_fail.py:[LINENR]: I am 'test_suite' / 'test_fail.py:[LINENR]'  [test_suite↪test_fail.py:[LINENR]]  [test_fail.py:[LINENR]]
tst test_fail.py:[LINENR]: ERR: EpicFail: This failure is expected  [test_suite↪test_fail.py:[LINENR]]  [test_fail.py:[LINENR]]
tst test_fail.py:[LINENR]: Test FAILED (N.N sec)  [test_suite↪test_fail.py:[LINENR]]  [suite.py:[LINENR]]
---------------------------------------------------------------------
trial test_suite FAIL
---------------------------------------------------------------------
FAIL: test_suite (fail: 1, skip: 5)
    skip: hello_world.py (N.N sec)
    skip: mo_mt_sms.py
    skip: mo_sms.py
    skip: test_error.py (N.N sec)
    FAIL: test_fail.py (N.N sec) EpicFail: This failure is expected
    skip: test_fail_raise.py

- a test with a raised failure

---------------------------------------------------------------------
trial test_suite
---------------------------------------------------------------------

----------------------------------------------
trial test_suite test_fail_raise.py
----------------------------------------------
tst test_fail_raise.py:[LINENR]: ERR: ExpectedFail: This failure is expected  [test_suite↪test_fail_raise.py:[LINENR]]  [test_fail_raise.py:[LINENR]: raise ExpectedFail('This failure is expected')]
tst test_fail_raise.py:[LINENR]: Test FAILED (N.N sec)  [test_suite↪test_fail_raise.py:[LINENR]]  [suite.py:[LINENR]]
---------------------------------------------------------------------
trial test_suite FAIL
---------------------------------------------------------------------
FAIL: test_suite (fail: 1, skip: 5)
    skip: hello_world.py (N.N sec)
    skip: mo_mt_sms.py
    skip: mo_sms.py
    skip: test_error.py (N.N sec)
    skip: test_fail.py (N.N sec)
    FAIL: test_fail_raise.py (N.N sec) ExpectedFail: This failure is expected
- test with half empty scenario
cnf ResourcesPool: DBG: Found config file resources.conf as [PATH]/selftest/suite_test/resources.conf in ./suite_test which is [PATH]/selftest/suite_test  [config.py:[LINENR]]
cnf ResourcesPool: DBG: Found path state_dir as [PATH]/selftest/suite_test/test_work/state_dir  [config.py:[LINENR]]

---------------------------------------------------------------------
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', scenario='foo'}: [RESOURCE_DICT]
tst test_suite: Reserving 3 x bts (candidates: 6)  [resource.py:[LINENR]]
tst test_suite: 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_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
  addr: 10.42.42.1
  [resource.py:[LINENR]]
tst test_suite: Reserving 2 x modem (candidates: 16)  [resource.py:[LINENR]]
tst test_suite: DBG: Picked - _hash: 19c69e45aa090fb511446bd00797690aa82ff52f
  imsi: '901700000007801'
  ki: D620F48487B1B782DA55DF6717F08FF9
  label: m7801
  path: /wavecom_0
- _hash: e1a46516a1fb493b2617ab14fc1693a9a45ec254
  imsi: '901700000007802'
  ki: 47FDB2D55CE6A10A85ABDAD034A5B7B3
  label: m7802
  path: /wavecom_1
  [resource.py:[LINENR]]

----------------------------------------------
trial test_suite hello_world.py
----------------------------------------------
tst hello_world.py:[LINENR]: hello world  [test_suite↪hello_world.py:[LINENR]]  [hello_world.py:[LINENR]]
tst hello_world.py:[LINENR]: I am 'test_suite' / 'hello_world.py:[LINENR]'  [test_suite↪hello_world.py:[LINENR]]  [hello_world.py:[LINENR]]
tst hello_world.py:[LINENR]: one  [test_suite↪hello_world.py:[LINENR]]  [hello_world.py:[LINENR]]
tst hello_world.py:[LINENR]: two  [test_suite↪hello_world.py:[LINENR]]  [hello_world.py:[LINENR]]
tst hello_world.py:[LINENR]: three  [test_suite↪hello_world.py:[LINENR]]  [hello_world.py:[LINENR]]
tst hello_world.py:[LINENR] Test passed (N.N sec)  [test_suite↪hello_world.py]  [suite.py:[LINENR]]
---------------------------------------------------------------------
trial test_suite PASS
---------------------------------------------------------------------
PASS: test_suite (pass: 1, skip: 5)
    pass: hello_world.py (N.N sec)
    skip: mo_mt_sms.py
    skip: mo_sms.py
    skip: test_error.py
    skip: test_fail.py
    skip: test_fail_raise.py
- test with scenario
cnf ResourcesPool: DBG: Found config file resources.conf as [PATH]/selftest/suite_test/resources.conf in ./suite_test which is [PATH]/selftest/suite_test  [config.py:[LINENR]]
cnf ResourcesPool: DBG: Found path state_dir as [PATH]/selftest/suite_test/test_work/state_dir  [config.py:[LINENR]]

---------------------------------------------------------------------
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', scenario='foo'}: [RESOURCE_DICT]
tst test_suite: Reserving 3 x bts (candidates: 6)  [resource.py:[LINENR]]
tst test_suite: DBG: Picked - _hash: f1cab48db5b9004986e2030cb71730a5c55e823e
  addr: 10.42.42.52
  band: GSM-1800
  ipa_unit_id: '6'
  label: Ettus B200
  launch_trx: 'True'
  trx_list:
  - nominal_power: '10'
  - nominal_power: '12'
  type: osmo-bts-trx
- _hash: 1d00bd0d6643db5590cdbefff3152e70500abefc
  addr: 10.42.42.53
  band: GSM-1800
  ipa_unit_id: '7'
  label: sysmoCell 5000
  trx_list:
  - nominal_power: '10'
  - 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
  [resource.py:[LINENR]]
tst test_suite: Reserving 1 x ip_address (candidates: 3)  [resource.py:[LINENR]]
tst test_suite: DBG: Picked - _hash: cde1debf28f07f94f92c761b4b7c6bf35785ced4
  addr: 10.42.42.1
  [resource.py:[LINENR]]
tst test_suite: Reserving 2 x modem (candidates: 16)  [resource.py:[LINENR]]
tst test_suite: DBG: Picked - _hash: 19c69e45aa090fb511446bd00797690aa82ff52f
  imsi: '901700000007801'
  ki: D620F48487B1B782DA55DF6717F08FF9
  label: m7801
  path: /wavecom_0
- _hash: e1a46516a1fb493b2617ab14fc1693a9a45ec254
  imsi: '901700000007802'
  ki: 47FDB2D55CE6A10A85ABDAD034A5B7B3
  label: m7802
  path: /wavecom_1
  [resource.py:[LINENR]]

----------------------------------------------
trial test_suite hello_world.py
----------------------------------------------
tst hello_world.py:[LINENR]: hello world  [test_suite↪hello_world.py:[LINENR]]  [hello_world.py:[LINENR]]
tst hello_world.py:[LINENR]: I am 'test_suite' / 'hello_world.py:[LINENR]'  [test_suite↪hello_world.py:[LINENR]]  [hello_world.py:[LINENR]]
tst hello_world.py:[LINENR]: one  [test_suite↪hello_world.py:[LINENR]]  [hello_world.py:[LINENR]]
tst hello_world.py:[LINENR]: two  [test_suite↪hello_world.py:[LINENR]]  [hello_world.py:[LINENR]]
tst hello_world.py:[LINENR]: three  [test_suite↪hello_world.py:[LINENR]]  [hello_world.py:[LINENR]]
tst hello_world.py:[LINENR] Test passed (N.N sec)  [test_suite↪hello_world.py]  [suite.py:[LINENR]]
---------------------------------------------------------------------
trial test_suite PASS
---------------------------------------------------------------------
PASS: test_suite (pass: 1, skip: 5)
    pass: hello_world.py (N.N sec)
    skip: mo_mt_sms.py
    skip: mo_sms.py
    skip: test_error.py
    skip: test_fail.py
    skip: test_fail_raise.py

- graceful exit.