From b81bb36960f375d50e5278707213fb96f649f786 Mon Sep 17 00:00:00 2001 From: Christian Hopps Date: Wed, 10 May 2023 09:44:16 +0000 Subject: [PATCH] tests: update to munet 0.13.3, restoring GNU screen functionality Signed-off-by: Christian Hopps --- tests/topotests/lib/micronet_compat.py | 2 +- tests/topotests/munet/base.py | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/topotests/lib/micronet_compat.py b/tests/topotests/lib/micronet_compat.py index c5c2adc545..d648a120ab 100644 --- a/tests/topotests/lib/micronet_compat.py +++ b/tests/topotests/lib/micronet_compat.py @@ -273,7 +273,7 @@ ff02::2\tip6-allrouters shellopt = self.cfgopt.get_option_list("--shell") if "all" in shellopt or "." in shellopt: - self.run_in_window("bash") + self.run_in_window("bash", title="munet") # This is expected by newer munet CLI code self.config_dirname = "" diff --git a/tests/topotests/munet/base.py b/tests/topotests/munet/base.py index eb4b088442..c6ae70e09b 100644 --- a/tests/topotests/munet/base.py +++ b/tests/topotests/munet/base.py @@ -1241,9 +1241,13 @@ class Commander: # pylint: disable=R0904 # XXX not appropriate for ssh cmd = ["sudo", "-Eu", os.environ["SUDO_USER"]] + cmd - if not isinstance(nscmd, str): - nscmd = shlex.join(nscmd) - cmd.append(nscmd) + if title: + cmd.append("-t") + cmd.append(title) + + if isinstance(nscmd, str): + nscmd = shlex.split(nscmd) + cmd.extend(nscmd) elif "DISPLAY" in os.environ: cmd = [get_exec_path_host("xterm")] if "SUDO_USER" in os.environ: -- 2.39.5