File tree Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -593,6 +593,25 @@ Here's an example of launching ``vtysh`` on routers ``rt1`` and ``rt2``.
593
593
594
594
sudo -E pytest --vtysh=rt1,rt2 all-protocol-startup
595
595
596
+ Ignoring Backtrace Detection
597
+ """"""""""""""""""""""""""""
598
+
599
+ By default, topotests automatically check for backtraces in daemon log files after
600
+ each test execution. If backtraces are detected, the test will fail. However, in
601
+ some scenarios you may want to disable this automatic backtrace detection.
602
+
603
+ To disable backtrace detection during test execution, use the ``--ignore-backtraces ``
604
+ CLI option:
605
+
606
+ .. code :: shell
607
+
608
+ sudo -E pytest --ignore-backtraces all-protocol-startup
609
+
610
+ This option is useful when:
611
+ - Running tests in environments where backtraces are expected or acceptable
612
+ - Debugging specific issues where backtrace detection interferes with test execution
613
+ - Running tests with known issues that produce backtraces but are not critical
614
+
596
615
.. _debug_with_gdb :
597
616
598
617
Debugging with GDB
Original file line number Diff line number Diff line change @@ -265,6 +265,12 @@ def pytest_addoption(parser):
265
265
help = "Spawn vtysh on all routers on test failure" ,
266
266
)
267
267
268
+ parser .addoption (
269
+ "--ignore-backtraces" ,
270
+ action = "store_true" ,
271
+ help = "Ignore backtrace detection during test execution" ,
272
+ )
273
+
268
274
269
275
def check_for_valgrind_memleaks ():
270
276
assert topotest .g_pytest_config .option .valgrind_memleaks
@@ -469,7 +475,8 @@ def pytest_runtest_call(item: pytest.Item) -> None:
469
475
# Let the default pytest_runtest_call execute the test function
470
476
yield
471
477
472
- check_for_backtraces ()
478
+ if not item .config .option .ignore_backtraces :
479
+ check_for_backtraces ()
473
480
check_for_core_dumps ()
474
481
475
482
# Check for leaks if requested
You can’t perform that action at this time.
0 commit comments