Skip to content

Commit

Permalink
tests: detect all daemons correctly when using frr.conf
Browse files Browse the repository at this point in the history
Signed-off-by: Jafar Al-Gharaibeh <[email protected]>
  • Loading branch information
Jafaral committed Aug 30, 2024
1 parent 77e1a26 commit 02256fd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/topotests/lib/topogen.py
Original file line number Diff line number Diff line change
Expand Up @@ -832,10 +832,10 @@ def load_frr_config(self, source, daemons=None):
for daemon in self.RD:
# This will not work for all daemons
daemonstr = self.RD.get(daemon).rstrip("d")
if daemonstr == "pim":
grep_cmd = "grep 'ip {}' {}".format(daemonstr, source_path)
if daemonstr == "path":
grep_cmd = "grep 'candidate-path' {}".format(source_path)
else:
grep_cmd = "grep 'router {}' {}".format(daemonstr, source_path)
grep_cmd = "grep -w '{}' {}".format(daemonstr, source_path)
result = self.run(grep_cmd, warn=False).strip()
if result:
self.load_config(daemon, "")
Expand Down

0 comments on commit 02256fd

Please sign in to comment.