summaryrefslogtreecommitdiff
path: root/tests/topotests/lib/topogen.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/topotests/lib/topogen.py')
-rw-r--r--tests/topotests/lib/topogen.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/topotests/lib/topogen.py b/tests/topotests/lib/topogen.py
index 25edfe0324..8688a13aef 100644
--- a/tests/topotests/lib/topogen.py
+++ b/tests/topotests/lib/topogen.py
@@ -908,7 +908,7 @@ class TopoExaBGP(TopoHost):
# Disable linter branch warning. It is expected to have these here.
# pylint: disable=R0912
-def diagnose_env():
+def diagnose_env_linux():
"""
Run diagnostics in the running environment. Returns `True` when everything
is ok, otherwise `False`.
@@ -1066,3 +1066,14 @@ def diagnose_env():
logger.removeHandler(fhandler)
return ret
+
+def diagnose_env_freebsd():
+ return True
+
+def diagnose_env():
+ if sys.platform.startswith("linux"):
+ return diagnose_env_linux()
+ elif sys.platform.startswith("freebsd"):
+ return diagnose_env_freebsd()
+
+ return False