Skip to content

Commit d36a7f5

Browse files
cyw233selldinesh
authored andcommitted
fix: only disable route check for T2 (#21582)
* fix: only disable route check for T2 Signed-off-by: Chenyang Wang <[email protected]> * Empty commit to re-trigger the pipeline Signed-off-by: Chenyang Wang <[email protected]> --------- Signed-off-by: Chenyang Wang <[email protected]> Signed-off-by: selldinesh <[email protected]>
1 parent 7fad320 commit d36a7f5

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

tests/conftest.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3013,13 +3013,17 @@ def _remove_entry(table_name, key_name, config):
30133013

30143014

30153015
@pytest.fixture(scope="module", autouse=True)
3016-
def temporarily_disable_route_check(request, duthosts):
3016+
def temporarily_disable_route_check(request, tbinfo, duthosts):
30173017
check_flag = False
30183018
for m in request.node.iter_markers():
30193019
if m.name == "disable_route_check":
30203020
check_flag = True
30213021
break
30223022

3023+
if 't2' not in tbinfo['topo']['name']:
3024+
logger.info("Topology is not T2, skipping temporarily_disable_route_check fixture")
3025+
check_flag = False
3026+
30233027
def wait_for_route_check_to_pass(dut):
30243028

30253029
def run_route_check():

tests/pc/test_po_cleanup.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,13 @@ def ignore_expected_loganalyzer_exceptions(enum_rand_one_per_hwsku_frontend_host
4040

4141

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

4851
yield
4952

0 commit comments

Comments
 (0)