-
Notifications
You must be signed in to change notification settings - Fork 134
/
e2e.yml
558 lines (514 loc) · 13.2 KB
/
e2e.yml
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
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
#
# Copyright 2013-2024 Software Radio Systems Limited
#
# By using this file, you agree to the terms and conditions set
# forth in the LICENSE file which can be found at the top level of
# the distribution.
#
include:
- project: softwareradiosystems/ci/tools
ref: "17"
file: .gitlab/ci-shared/setup/all.yml
variables:
TESTBED:
description: Retina Testbed Description
options:
- "zmq"
- "zmq_deb"
- "zmq_single_ue"
- "zmq_4x4_mimo"
- "zmq_srsue"
- "rf_b200"
- "rf_hp"
- "android_b200"
- "android_n300"
- "android_x300"
- "viavi"
- "none"
value: "zmq"
MARKERS:
description: Selected pytest marker (label / tag). Tests with that mark will run.
value: ""
KEYWORDS:
description: Select tests by keyword expressions. This will run tests which contain names that match the given string expression (case-insensitive), which can include Python operators that use filenames, class names and function names as variables
value: ""
PYTEST_ARGS:
description: Extra pytest args for the e2e suite to run
value: ""
RETINA_ARGS:
description: Extra retina args for the e2e suite to run
value: ""
E2E_LOG_LEVEL:
description: Log level to set for software under test in the e2e tests
options:
- debug
- info
- warning
- error
value: "info"
.txrx-lib: &txrx-lib
- job: "build trx driver"
optional: true
artifacts: true
- job: "build amariue zmq driver"
optional: true
artifacts: true
load retina variables:
stage: ci
rules:
- if: $TESTBED == "none"
when: never
- if: $ON_MR
- if: $CI_DESCRIPTION =~ /Nightly E2E Tests/
- if: $ON_WEB
- if: $ON_API
script:
- cat .gitlab/ci/e2e/.env
artifacts:
reports:
dotenv: .gitlab/ci/e2e/.env
.prepare_test:
variables:
KUBECONFIG_VAR_NAME: "RETINA_NAMESPACE_KUBECONFIG"
before_script:
- |
eval K_PATH="\$$KUBECONFIG_VAR_NAME"
export FORCE_COLOR=1
export KUBECONFIG=$K_PATH
needs: &retina-needs
- job: "load retina variables"
artifacts: true
e2e request validation:
stage: static
extends:
- .prepare_test
rules:
- if: $ON_MR
changes:
- .gitlab/ci/e2e/**/*
image:
name: ${RETINA_REGISTRY_PREFIX}/launcher:${RETINA_VERSION}
entrypoint: ["/bin/sh", "-c"]
script:
- |
cd ${CI_PROJECT_DIR}/.gitlab/ci/e2e
file_list=$(ls *.yml)
for f in $file_list; do
retina-request-checker --input $f
done
.e2e-run:
resource_group: e2e-${GROUP}
timeout: 6h
image:
name: ${RETINA_REGISTRY_PREFIX}/launcher:${RETINA_VERSION}
entrypoint: ["/bin/sh", "-c"]
interruptible: false
variables:
ARTIFACT_COMPRESSION_LEVEL: "slowest"
KUBERNETES_CPU_REQUEST: 2
KUBERNETES_CPU_LIMIT: 2
KUBERNETES_MEMORY_REQUEST: 2Gi
KUBERNETES_MEMORY_LIMIT: 2Gi
KUBERNETES_EPHEMERAL_STORAGE_REQUEST: "12G"
KUBERNETES_EPHEMERAL_STORAGE_LIMIT: "12G"
KUBECONFIG_VAR_NAME: "RETINA_NAMESPACE_KUBECONFIG"
GROUP: zmq
tags:
- "${RETINA_TAG}"
extends:
- .prepare_test
rules:
- if: $CI_DESCRIPTION =~ /Nightly E2E Tests/
artifacts:
paths:
- tests/e2e/log
when: always
expire_in: 1 week
reports:
junit: tests/e2e/out.xml
script:
# Clean LFS files
- |
while read -r line; do
git rm --cached "$line" >/dev/null
done < <(git lfs ls-files | sed -r 's/^.{13}//')
echo "srsGNB sources+build size is" $(du -hs .)
# Remove any existing retina resource for this group
- retina-delete-orchestration-network --user-name ^ci_${GROUP} --regex
# Add extra secret env variables to the .env file
- |
echo "" >> .gitlab/ci/e2e/.env
cat $RETINA_SECRET_ENV >> .gitlab/ci/e2e/.env
# Set username for retina
- |
cd tests/e2e
export LOGNAME=ci_${GROUP}_${GITLAB_USER_LOGIN}
# Change sharing gnb file for complete src + build (With gnb) folder
- |
sed -i "s|- local_path: ../../build/apps/gnb/gnb|- local_path: ../../|; s|remote_path: /usr/local/bin|remote_path: $CI_PROJECT_DIR|; s|is_executable: true|is_executable: false|" ${CI_PROJECT_DIR}/.gitlab/ci/e2e/retina_request_${TESTBED}.yml
# Run Retina
- |
E2E_CMD="retina-launcher --retina-request=${CI_PROJECT_DIR}/.gitlab/ci/e2e/retina_request_${TESTBED}.yml --log-folder=./log --html=./log/report.html --self-contained-html --junitxml=out.xml ${PYTEST_ARGS} -k '${KEYWORDS}' -m '${MARKERS}' --register-parameter ue.all.log_level=$E2E_LOG_LEVEL gnb.all.log_level=$E2E_LOG_LEVEL ${RETINA_ARGS}"
echo "${E2E_CMD}"
eval $E2E_CMD
after_script:
- |
echo "*******************************************************************************************************************************"
echo "Test report ---> https://softwareradiosystems.gitlab.io/-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/tests/e2e/log//report.html"
echo "*******************************************************************************************************************************"
- du -hs tests/e2e/log/
custom e2e:
stage: manual
extends: .e2e-run
rules:
- if: $TESTBED == "none"
when: never
- if: $ON_WEB
- if: $ON_API
needs:
- *retina-needs
- custom build
- build trx driver
################################################################################
# ZMQ
################################################################################
smoke zmq:
extends: .e2e-run
stage: manual
rules:
- if: $ON_MR == "true" && $CI_MERGE_REQUEST_APPROVED == "true"
- if: $ON_MR
when: manual
allow_failure: false
interruptible: true
variables:
TESTBED: zmq
MARKERS: "smoke"
PYTEST_ARGS: "-x"
RETINA_ARGS: "gnb.all.pcap=True gnb.all.mac_enable=True gnb.all.rlc_enable=True"
E2E_LOG_LEVEL: "debug"
needs:
- job: "smoke relwithdeb cached"
artifacts: true
optional: true
- job: "smoke relwithdeb clean"
artifacts: true
optional: true
- *txrx-lib
- *retina-needs
.zmq:
stage: zmq
extends: .e2e-run
variables:
TESTBED: "zmq"
E2E_LOG_LEVEL: "info"
needs:
- job: "basic relwithdeb"
artifacts: true
- *txrx-lib
- *retina-needs
srsue:
extends: .zmq
variables:
TESTBED: "zmq_srsue"
MARKERS: "zmq_srsue"
E2E_LOG_LEVEL: "info"
needs:
- job: "basic relwithdeb"
artifacts: true
- *txrx-lib
- *retina-needs
amari 1UE:
extends: .zmq
variables:
TESTBED: "zmq_single_ue"
MARKERS: "zmq_single_ue"
E2E_LOG_LEVEL: "info"
RETINA_ARGS: "gnb.all.pcap=True gnb.all.rlc_enable=True"
needs:
- job: "basic relwithdeb"
artifacts: true
- *txrx-lib
- *retina-needs
amari 1UE 4x4 mimo:
extends: .zmq
variables:
TESTBED: "zmq_4x4_mimo"
MARKERS: "zmq_4x4_mimo"
E2E_LOG_LEVEL: "info"
needs:
- job: "basic relwithdeb"
artifacts: true
- *txrx-lib
- *retina-needs
amari 4UE deb:
extends: .zmq
variables:
TESTBED: "zmq_deb"
MARKERS: "smoke"
E2E_LOG_LEVEL: "info"
needs:
- job: "basic package"
artifacts: true
- *txrx-lib
- *retina-needs
amari 32UE:
extends: .zmq
variables:
MARKERS: "zmq and not smoke"
E2E_LOG_LEVEL: "info"
RETINA_ARGS: "gnb.all.pcap=True gnb.all.rlc_enable=False"
needs:
- job: "basic relwithdeb"
artifacts: true
- *txrx-lib
- *retina-needs
parallel:
matrix:
- KEYWORDS:
[
"attach_detach",
"ping",
"iperf and udp and band:3",
"iperf and udp and not band:3",
"iperf and tcp and band:3",
"iperf and tcp and not band:3",
]
amari 32UE [reestablishment]:
extends: .zmq
variables:
MARKERS: "zmq and not smoke"
E2E_LOG_LEVEL: "info"
KEYWORDS: reestablishment
RETINA_ARGS: "gnb.all.pcap=True gnb.all.mac_enable=True gnb.all.rlc_enable=False"
allow_failure: true
needs:
- job: "basic relwithdeb"
artifacts: true
- *txrx-lib
- *retina-needs
amari 32UE asan:
extends: .zmq
variables:
MARKERS: "smoke"
RETINA_ARGS: "gnb.all.pcap=True gnb.all.mac_enable=True gnb.all.rlc_enable=True"
needs:
- job: "basic asan"
artifacts: true
- *txrx-lib
- *retina-needs
amari 32UE tsan:
extends: .zmq
variables:
MARKERS: "smoke"
RETINA_ARGS: "gnb.all.pcap=True gnb.all.mac_enable=True gnb.all.rlc_enable=True"
needs:
- job: "basic tsan"
artifacts: true
- *txrx-lib
- *retina-needs
amari 32UE memcheck:
extends: .zmq
variables:
MARKERS: "zmq_valgrind"
E2E_LOG_LEVEL: "warning"
RETINA_ARGS: "gnb.all.pcap=True gnb.all.mac_enable=True gnb.all.rlc_enable=True"
needs:
- job: "basic memcheck"
artifacts: true
- *txrx-lib
- *retina-needs
################################################################################
# TEST MODE
################################################################################
test mode ue:
stage: zmq
extends: .e2e-run
variables:
TESTBED: "test_mode"
MARKERS: "test_mode"
KEYWORDS: "test_ue"
E2E_LOG_LEVEL: "warning"
needs:
- job: "basic relwithdeb"
artifacts: true
- *txrx-lib
- *retina-needs
test mode ue tsan:
extends: test mode ue
when: manual
allow_failure: true
needs:
- job: "basic tsan"
artifacts: true
- *txrx-lib
- *retina-needs
test mode ue asan:
extends: test mode ue
needs:
- job: "basic asan"
artifacts: true
- *txrx-lib
- *retina-needs
test mode ue memcheck:
extends: test mode ue
needs:
- job: "basic memcheck"
artifacts: true
- *txrx-lib
- *retina-needs
test mode ru:
stage: zmq
extends: .e2e-run
when: manual
allow_failure: true
variables:
GROUP: "viavi"
TESTBED: "viavi"
MARKERS: "test_mode"
KEYWORDS: "test_ru"
E2E_LOG_LEVEL: "info"
needs:
- job: "basic avx512 dpdk"
artifacts: true
- *txrx-lib
- *retina-needs
test mode ru tsan:
extends: test mode ru
variables:
E2E_LOG_LEVEL: "warning"
when: manual
allow_failure: true
needs:
- job: "basic tsan"
artifacts: true
- *txrx-lib
- *retina-needs
test mode ru asan:
extends: test mode ru
variables:
E2E_LOG_LEVEL: "warning"
when: manual
allow_failure: true
needs:
- job: "basic asan"
artifacts: true
- *txrx-lib
- *retina-needs
test mode ru memcheck:
extends: test mode ru
variables:
E2E_LOG_LEVEL: "warning"
when: manual
allow_failure: true
needs:
- job: "basic memcheck"
artifacts: true
- *txrx-lib
- *retina-needs
################################################################################
# RF
################################################################################
.rf:
stage: rf
extends: .e2e-run
variables:
GROUP: "rf"
TESTBED: "rf_b200"
MARKERS: "rf"
E2E_LOG_LEVEL: "warning"
needs:
- job: "basic relwithdeb"
artifacts: true
- *retina-needs
amari b200 asan:
extends: .rf
variables:
MARKERS: "rf_not_crash"
needs:
- job: "basic asan"
artifacts: true
- *retina-needs
validate b200 config:
extends: .rf
variables:
MARKERS: "rf_b200"
validate n300 config:
extends: .rf
variables:
MARKERS: "rf_n300"
TESTBED: "android_n300"
################################################################################
# Android
###############################################################################
android b200:
stage: rf
extends: .e2e-run
variables:
GROUP: "rf"
TESTBED: "android_b200"
MARKERS: "android"
E2E_LOG_LEVEL: "warning"
KUBECONFIG_VAR_NAME: "RETINA_NAMESPACE_KUBECONFIG"
needs:
- job: "basic relwithdeb"
artifacts: true
- *retina-needs
android x300:
stage: rf
extends: .e2e-run
variables:
GROUP: "rf"
TESTBED: "android_x300"
MARKERS: "android_hp"
E2E_LOG_LEVEL: "info"
KUBECONFIG_VAR_NAME: "RETINA_NAMESPACE_KUBECONFIG"
needs:
- job: "basic relwithdeb"
artifacts: true
- *retina-needs
android n300:
extends: android x300
variables:
TESTBED: "android_n300"
################################################################################
# VIAVI
###############################################################################
viavi:
stage: rf
extends: .e2e-run
variables:
GROUP: "viavi"
TESTBED: "viavi"
MARKERS: "viavi"
E2E_LOG_LEVEL: "warning"
KUBECONFIG_VAR_NAME: "RETINA_NAMESPACE_KUBECONFIG"
RETINA_ARGS: "gnb.all.metrics_enable=True"
needs:
- job: "basic avx512 dpdk"
artifacts: true
- *retina-needs
################################################################################
# Garbage collector
################################################################################
.demolition:
extends:
- .prepare_test
rules:
- if: $CI_DESCRIPTION =~ /Nightly E2E Tests/
when: always
interruptible: false
image:
name: ${RETINA_REGISTRY_PREFIX}/launcher:${RETINA_VERSION}
entrypoint: ["/bin/sh", "-c"]
tags:
- "${RETINA_TAG}"
script:
- |
retina-garbage-collector --mode demolition
retina setup:
stage: ci
extends: .demolition
retina post:
stage: .post
extends: .demolition