diff options
Diffstat (limited to 'tests/topotests/lib/topotest.py')
| -rw-r--r-- | tests/topotests/lib/topotest.py | 30 |
1 files changed, 9 insertions, 21 deletions
diff --git a/tests/topotests/lib/topotest.py b/tests/topotests/lib/topotest.py index 104b215078..2a46115850 100644 --- a/tests/topotests/lib/topotest.py +++ b/tests/topotests/lib/topotest.py @@ -54,6 +54,7 @@ from mininet.term import makeTerm g_extra_config = {} + def gdb_core(obj, daemon, corefiles): gdbcmds = """ info threads @@ -545,7 +546,6 @@ def iproute2_is_vrf_capable(): stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE, - encoding="utf-8" ) iproute2_err = subp.communicate()[1].splitlines()[0].split()[0] @@ -1346,15 +1346,9 @@ class Router(Node): # Run a command in a new window (gnome-terminal, screen, tmux, xterm) def runInWindow(self, cmd, title=None): topo_terminal = os.getenv("FRR_TOPO_TERMINAL") - if topo_terminal or ( - "TMUX" not in os.environ and "STY" not in os.environ - ): + if topo_terminal or ("TMUX" not in os.environ and "STY" not in os.environ): term = topo_terminal if topo_terminal else "xterm" - makeTerm( - self, - title=title if title else cmd, - term=term, - cmd=cmd) + makeTerm(self, title=title if title else cmd, term=term, cmd=cmd) else: nscmd = "sudo nsenter -m -n -t {} {}".format(self.pid, cmd) if "TMUX" in os.environ: @@ -1363,9 +1357,7 @@ class Router(Node): cmd = "{} {}".format(wcmd, nscmd) elif "STY" in os.environ: if os.path.exists( - "/run/screen/S-{}/{}".format( - os.environ['USER'], os.environ['STY'] - ) + "/run/screen/S-{}/{}".format(os.environ["USER"], os.environ["STY"]) ): wcmd = "screen" else: @@ -1373,7 +1365,6 @@ class Router(Node): cmd = "{} {}".format(wcmd, nscmd) self.cmd(cmd) - def startRouter(self, tgen=None): # Disable integrated-vtysh-config self.cmd( @@ -1460,7 +1451,7 @@ class Router(Node): def startRouterDaemons(self, daemons=None): "Starts all FRR daemons for this router." - gdb_breakpoints = g_extra_config["gdb_breakpoints"] + gdb_breakpoints = g_extra_config["gdb_breakpoints"] gdb_daemons = g_extra_config["gdb_daemons"] gdb_routers = g_extra_config["gdb_routers"] @@ -1521,12 +1512,10 @@ class Router(Node): if ( (gdb_routers or gdb_daemons) - and (not gdb_routers - or self.name in gdb_routers - or "all" in gdb_routers) - and (not gdb_daemons - or daemon in gdb_daemons - or "all" in gdb_daemons) + and ( + not gdb_routers or self.name in gdb_routers or "all" in gdb_routers + ) + and (not gdb_daemons or daemon in gdb_daemons or "all" in gdb_daemons) ): if daemon == "snmpd": cmdopt += " -f " @@ -1547,7 +1536,6 @@ class Router(Node): self.cmd(" ".join([cmdenv, binary, cmdopt])) logger.info("{}: {} {} started".format(self, self.routertype, daemon)) - # Start Zebra first if "zebra" in daemons_list: start_daemon("zebra", "-s 90000000") |
