prplos/.gitlab/scripts
Matthias FRANCK 803f205f39
ci: testbed-cdrouter.py: fix re.sub decode issue by passing utf-8 string
When running the changes done in commit 140ad37e2ab0 ("cdrouter:
wireless: make wifiBeaconPhy configurable"), we can see:

Traceback (most recent call last):
  File ".gitlab/scripts/testbed-cdrouter.py", line 441, in <module>
    main()
  File ".gitlab/scripts/testbed-cdrouter.py", line 437, in main
    args.func(cdr)
  File ".gitlab/scripts/testbed-cdrouter.py", line 345, in config_import
    content = self.replace_env_config_variables(content)
  File ".gitlab/scripts/testbed-cdrouter.py", line 330, in replace_env_config_variables
    text = re.sub(pattern, value, text)
  File "/usr/lib/python3.7/re.py", line 192, in sub
    return _compile(pattern, flags).sub(repl, string, count)
TypeError: cannot use a string pattern on a bytes-like object

The re.sub() command fails because a non utf-8 encoded string is
passed. Let's therefore adapt the method that is called for opening a
file to always return a utf-8 decoded string.

Fixes: 140ad37e2ab0 ("cdrouter: wireless: make wifiBeaconPhy configurable")
Signed-off-by: Matthias FRANCK <matthias.franck@softathome.com>
2025-07-31 15:20:33 +00:00
..
build.d ci: build: enable exception tracing on arm64 targets 2025-07-31 10:36:01 +00:00
dut-init ci: cdrouter: update dynamicdns server index 2025-07-31 15:19:55 +00:00
cdrouter-pretty-failures.awk
prpl-jira.py
README.md
requirements.txt
testbed-cdrouter.py ci: testbed-cdrouter.py: fix re.sub decode issue by passing utf-8 string 2025-07-31 15:20:33 +00:00
testbed-device.py ci: testbed-device.py: MXL25641-HDK-6: add VLAN bridge port 2025-07-31 10:36:13 +00:00

Content

This directory contains files used mainly during testing on the GitLab CI.

requirements.txt

This requirements.txt file is used for specifying what Python packages are required to run the scripts in this directory. Usually used with pip install -f requirements.txt command.

prpl-jira.py

This helper Python script creates new or updates existing Jira ticket when something goes wrong during GitLab CI testing process. Currently only supports reporting of build test failures.

Needs Python version 3.6+ due to use of f-strings feature.

testbed-device.py

This helper Python scripts allows managing of device under test (DUT) via labgrid framework.