Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2991,13 +2991,17 @@ def _remove_entry(table_name, key_name, config):


@pytest.fixture(scope="module", autouse=True)
def temporarily_disable_route_check(request, duthosts):
def temporarily_disable_route_check(request, tbinfo, duthosts):
check_flag = False
for m in request.node.iter_markers():
if m.name == "disable_route_check":
check_flag = True
break

if 't2' not in tbinfo['topo']['name']:
logger.info("Topology is not T2, skipping temporarily_disable_route_check fixture")
check_flag = False

def wait_for_route_check_to_pass(dut):

def run_route_check():
Expand Down
11 changes: 7 additions & 4 deletions tests/pc/test_po_cleanup.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,13 @@ def ignore_expected_loganalyzer_exceptions(enum_rand_one_per_hwsku_frontend_host


@pytest.fixture(autouse=True)
def disable_route_check_for_duthost(duthosts, enum_rand_one_per_hwsku_frontend_hostname):
duthost = duthosts[enum_rand_one_per_hwsku_frontend_hostname]
logging.info("Stopping route check on DUT {}".format(duthost.hostname))
stop_route_checker_on_duthost(duthost)
def disable_route_check_for_duthost(tbinfo, duthosts, enum_rand_one_per_hwsku_frontend_hostname):
if 't2' not in tbinfo['topo']['name']:
logging.info("Topology is not T2, skipping disabling route check")
else:
duthost = duthosts[enum_rand_one_per_hwsku_frontend_hostname]
logging.info("Stopping route check on DUT {}".format(duthost.hostname))
stop_route_checker_on_duthost(duthost)

yield

Expand Down
Loading