summaryrefslogtreecommitdiffstats
path: root/tests/topotests/conftest.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/topotests/conftest.py')
-rwxr-xr-xtests/topotests/conftest.py36
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/topotests/conftest.py b/tests/topotests/conftest.py
index 0afebde..23eab68 100755
--- a/tests/topotests/conftest.py
+++ b/tests/topotests/conftest.py
@@ -17,6 +17,7 @@ from pathlib import Path
import lib.fixtures
import pytest
+from lib.common_config import generate_support_bundle
from lib.micronet_compat import Mininet
from lib.topogen import diagnose_env, get_topogen
from lib.topolog import get_test_logdir, logger
@@ -103,6 +104,12 @@ def pytest_addoption(parser):
)
parser.addoption(
+ "--gdb-use-emacs",
+ action="store_true",
+ help="Use emacsclient to run gdb instead of a shell",
+ )
+
+ parser.addoption(
"--logd",
action="append",
metavar="DAEMON[,ROUTER[,...]",
@@ -167,6 +174,24 @@ def pytest_addoption(parser):
help="Options to pass to `perf record`.",
)
+ parser.addoption(
+ "--rr-daemons",
+ metavar="DAEMON[,DAEMON...]",
+ help="Comma-separated list of daemons to run `rr` on, or 'all'",
+ )
+
+ parser.addoption(
+ "--rr-routers",
+ metavar="ROUTER[,ROUTER...]",
+ help="Comma-separated list of routers to run `rr` on, or 'all'",
+ )
+
+ parser.addoption(
+ "--rr-options",
+ metavar="OPTS",
+ help="Options to pass to `rr record`.",
+ )
+
rundir_help = "directory for running in and log files"
parser.addini("rundir", rundir_help, default="/tmp/topotests")
parser.addoption("--rundir", metavar="DIR", help=rundir_help)
@@ -203,6 +228,12 @@ def pytest_addoption(parser):
)
parser.addoption(
+ "--valgrind-leak-kinds",
+ metavar="KIND[,KIND...]",
+ help="Comma-separated list of valgrind leak kinds or 'all'",
+ )
+
+ parser.addoption(
"--valgrind-memleaks",
action="store_true",
help="Run all daemons under valgrind for memleak detection",
@@ -568,6 +599,11 @@ def pytest_runtest_setup(item):
module = item.parent.module
script_dir = os.path.abspath(os.path.dirname(module.__file__))
os.environ["PYTEST_TOPOTEST_SCRIPTDIR"] = script_dir
+ os.environ["CONFIGDIR"] = script_dir
+
+
+def pytest_exception_interact(node, call, report):
+ generate_support_bundle()
def pytest_runtest_makereport(item, call):