mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-09-06 09:04:55 +00:00
test-client: pass LIBNM_CLIENT_DEBUG to nmcli
For debugging libnm, LIBNM_CLIENT_DEBUG can be very useful. As the tests compare stdout/stderr from nmcli with expected output, just enabling it will break the tests. However, in combination with LIBNM_CLIENT_DEBUG_FILE this can be very useful. Preserve and pass on the environment variables, if set.
This commit is contained in:
parent
6dbb215793
commit
1630009234
|
@ -996,7 +996,12 @@ class TestNmcli(unittest.TestCase):
|
|||
self.fail("invalid language %s" % (lang))
|
||||
|
||||
env = {}
|
||||
for k in ["LD_LIBRARY_PATH", "DBUS_SESSION_BUS_ADDRESS"]:
|
||||
for k in [
|
||||
"LD_LIBRARY_PATH",
|
||||
"DBUS_SESSION_BUS_ADDRESS",
|
||||
"LIBNM_CLIENT_DEBUG",
|
||||
"LIBNM_CLIENT_DEBUG_FILE",
|
||||
]:
|
||||
val = os.environ.get(k, None)
|
||||
if val is not None:
|
||||
env[k] = val
|
||||
|
|
Loading…
Reference in a new issue