3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-25 09:39:25 +01:00

test-runner: have start_iwd take a storage dir

Allow the storage directory (default /tmp/iwd) to be configured
just like the state directory. This is in order to support multiple
IWD instances which require separate storage directories for network
provisioning files.
This commit is contained in:
James Prestwood 2020-12-10 09:45:19 -08:00 committed by Denis Kenzior
parent 3f686da550
commit 41b8a32dfc

View File

@ -559,7 +559,7 @@ class Namespace:
self._bus = dbus.bus.BusConnection(address_or_type=self.dbus_address) self._bus = dbus.bus.BusConnection(address_or_type=self.dbus_address)
def start_iwd(self, config_dir = '/tmp'): def start_iwd(self, config_dir = '/tmp', storage_dir = '/tmp/iwd'):
args = [] args = []
iwd_radios = ','.join([r.name for r in self.radios if r.use == 'iwd']) iwd_radios = ','.join([r.name for r in self.radios if r.use == 'iwd'])
@ -575,7 +575,7 @@ class Namespace:
env = os.environ.copy() env = os.environ.copy()
env['CONFIGURATION_DIRECTORY'] = config_dir env['CONFIGURATION_DIRECTORY'] = config_dir
env['STATE_DIRECTORY'] = '/tmp/iwd' env['STATE_DIRECTORY'] = storage_dir
if self.is_verbose('iwd-dhcp'): if self.is_verbose('iwd-dhcp'):
env['IWD_DHCP_DEBUG'] = '1' env['IWD_DHCP_DEBUG'] = '1'