cdrouter: wireless: make wifiBeaconPhy configurable
With the new wnc-freedom wifi7 box, the wifiBeaconPhy testvar of CDRouter needs to include "be" as well. Let's make this configurable in the CI by introducing a CDROUTER_CONFIG_WIFI_BEACON_PHY variable that can be set uniquely for every box. Signed-off-by: Matthias FRANCK <matthias.franck@softathome.com>
This commit is contained in:
parent
049d0acfc3
commit
bef6276786
@ -10,6 +10,7 @@
|
||||
when: never
|
||||
- when: manual
|
||||
variables:
|
||||
CDROUTER_CONFIG_WIFI_BEACON_PHY: 'ax b g n'
|
||||
CDROUTER_TEST_CONFIG: generic
|
||||
DUT_SLEEP_AFTER_BOOT: 90
|
||||
CDROUTER_LAN_INTERFACE: eth1
|
||||
|
||||
@ -35,6 +35,7 @@ CDRouter-Wireless Freedom initramfs:
|
||||
<<: *wnc_freedom
|
||||
variables:
|
||||
CDROUTER_TEST_CONFIG: wireless
|
||||
CDROUTER_CONFIG_WIFI_BEACON_PHY: 'ax b be g n'
|
||||
DUT_INIT_SCRIPTS: |
|
||||
.gitlab/scripts/dut-init/cdrouter-dut-flush-dns-relay-cache.sh
|
||||
.gitlab/scripts/dut-init/cdrouter-dut-configure-wireless.sh
|
||||
|
||||
@ -308,6 +308,7 @@ class TestbedCDRouter:
|
||||
def config_check(self):
|
||||
self.connect()
|
||||
content = self.file_content(self.configs_path)
|
||||
content = self.replace_env_config_variables(content)
|
||||
check = self.cdr.configs.check_config(content)
|
||||
if not check.errors:
|
||||
logging.info("OK, no errors!")
|
||||
@ -322,6 +323,13 @@ class TestbedCDRouter:
|
||||
|
||||
exit(1)
|
||||
|
||||
def replace_env_config_variables(self, text):
|
||||
for var, value in os.environ.items():
|
||||
if var.startswith('CDROUTER_CONFIG_'):
|
||||
pattern = f'@{var}@'
|
||||
text = re.sub(pattern, value, text)
|
||||
return text
|
||||
|
||||
def config_import(self):
|
||||
self.connect()
|
||||
name = self.args.name or self.args.filename
|
||||
@ -334,6 +342,7 @@ class TestbedCDRouter:
|
||||
pass
|
||||
|
||||
content = self.file_content(self.configs_path)
|
||||
content = self.replace_env_config_variables(content)
|
||||
config = Config(contents=content, name=name)
|
||||
self.cdr.configs.create(config)
|
||||
logging.info("Imported config '{}' from '{}'".format(name, self.args.filename))
|
||||
|
||||
@ -451,7 +451,7 @@ SECTION "Base Configuration" {
|
||||
# testvar wifiBeaconWpaCipher CCMP-128
|
||||
# testvar wifiBeaconRsnCipher CCMP-128
|
||||
# testvar wifiBeaconWpaGroupCipher CCMP-128
|
||||
testvar wifiBeaconPhy "ax b be g n"
|
||||
testvar wifiBeaconPhy "@CDROUTER_CONFIG_WIFI_BEACON_PHY@"
|
||||
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user