Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip test scripts in PR testing using pytest markers. #15872

Closed
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
3 changes: 2 additions & 1 deletion tests/cacl/test_ebtables_application.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

pytestmark = [
pytest.mark.disable_loganalyzer, # disable automatic loganalyzer globally
pytest.mark.topology('any')
pytest.mark.topology('any'),
pytest.mark.device_type('physical')
]


Expand Down
3 changes: 2 additions & 1 deletion tests/drop_packets/test_configurable_drop_counters.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@


pytestmark = [
pytest.mark.topology('any')
pytest.mark.topology('any'),
pytest.mark.device_type('physical')
]

PACKET_COUNT = 1000
Expand Down
3 changes: 2 additions & 1 deletion tests/dualtor/test_orchagent_slb.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@


pytestmark = [
pytest.mark.topology("dualtor")
pytest.mark.topology("dualtor"),
pytest.mark.device_type('physical')
]


Expand Down
3 changes: 2 additions & 1 deletion tests/dualtor_io/test_grpc_server_failure.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@


pytestmark = [
pytest.mark.topology("dualtor")
pytest.mark.topology("dualtor"),
pytest.mark.device_type('physical')
]


Expand Down
3 changes: 2 additions & 1 deletion tests/dualtor_io/test_normal_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@


pytestmark = [
pytest.mark.topology("dualtor")
pytest.mark.topology("dualtor"),
pytest.mark.device_type('physical')
]


Expand Down
3 changes: 2 additions & 1 deletion tests/dualtor_io/test_tor_failure.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
logger = logging.getLogger(__name__)

pytestmark = [
pytest.mark.topology("dualtor")
pytest.mark.topology("dualtor"),
pytest.mark.device_type('physical')
]


Expand Down
3 changes: 2 additions & 1 deletion tests/dualtor_mgmt/test_egress_drop_nvidia.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
from tests.common.plugins.allure_wrapper import allure_step_wrapper as allure

pytestmark = [
pytest.mark.topology('dualtor')
pytest.mark.topology('dualtor'),
pytest.mark.device_type('physical')
]

logger = logging.getLogger(__name__)
Expand Down
3 changes: 2 additions & 1 deletion tests/ecmp/test_ecmp_sai_value.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
pytestmark = [
pytest.mark.asic('broadcom'),
pytest.mark.topology('t0', 't1'),
pytest.mark.disable_loganalyzer
pytest.mark.disable_loganalyzer,
pytest.mark.device_type('physical')
]

seed_cmd = [
Expand Down
3 changes: 2 additions & 1 deletion tests/ecmp/test_fgnhg.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
pytestmark = [
pytest.mark.topology('t0'),
pytest.mark.asic('mellanox'),
pytest.mark.disable_loganalyzer
pytest.mark.disable_loganalyzer,
pytest.mark.device_type('physical')
]

logger = logging.getLogger(__name__)
Expand Down
1 change: 1 addition & 0 deletions tests/generic_config_updater/test_pfcwd_interval.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
pytestmark = [
pytest.mark.asic('mellanox'),
pytest.mark.topology('any'),
pytest.mark.device_type('physical')
]

logger = logging.getLogger(__name__)
Expand Down
5 changes: 4 additions & 1 deletion tests/ixia/ecn/test_dequeue_ecn.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
from tests.common.cisco_data import get_markings_dut, setup_markings_dut
from tests.ixia.ptf_utils import get_sai_attributes

pytestmark = [pytest.mark.topology('tgen')]
pytestmark = [
pytest.mark.topology('tgen'),
pytest.mark.device_type('physical')
]


def test_dequeue_ecn(request, ixia_api, ixia_testbed_config, conn_graph_facts, # noqa F811
Expand Down
5 changes: 4 additions & 1 deletion tests/ixia/ecn/test_red_accuracy.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
from files.helper import run_ecn_test, is_ecn_marked
from tests.common.cisco_data import get_markings_dut, setup_markings_dut

pytestmark = [pytest.mark.topology('tgen')]
pytestmark = [
pytest.mark.topology('tgen'),
pytest.mark.device_type('physical')
]


def test_red_accuracy(request, ixia_api, ixia_testbed_config, conn_graph_facts, # noqa F811
Expand Down
3 changes: 2 additions & 1 deletion tests/ixia/ixanvl/test_bgp_conformance.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

pytestmark = [
pytest.mark.topology('tgen'),
pytest.mark.disable_loganalyzer
pytest.mark.disable_loganalyzer,
pytest.mark.device_type('physical')
]


Expand Down
5 changes: 4 additions & 1 deletion tests/ixia/pfc/test_global_pause.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@

from .files.helper import run_pfc_test

pytestmark = [pytest.mark.topology('tgen')]
pytestmark = [
pytest.mark.topology('tgen'),
pytest.mark.device_type('physical')
]


def test_global_pause(ixia_api, ixia_testbed_config, conn_graph_facts, fanout_graph_facts, # noqa F811
Expand Down
5 changes: 4 additions & 1 deletion tests/ixia/pfc/test_pfc_congestion.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
all_prio_list,
lossless_prio_list)

pytestmark = [pytest.mark.topology('tgen')]
pytestmark = [
pytest.mark.topology('tgen'),
pytest.mark.device_type('physical')
]


def test_pfc_congestion(ixia_api, # noqa: F811
Expand Down
5 changes: 4 additions & 1 deletion tests/ixia/pfc/test_pfc_pause_lossless.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@

logger = logging.getLogger(__name__)

pytestmark = [pytest.mark.topology('tgen')]
pytestmark = [
pytest.mark.topology('tgen'),
pytest.mark.device_type('physical')
]


def test_pfc_pause_single_lossless_prio(ixia_api,
Expand Down
5 changes: 4 additions & 1 deletion tests/ixia/pfc/test_pfc_pause_lossy.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@

logger = logging.getLogger(__name__)

pytestmark = [pytest.mark.topology('tgen')]
pytestmark = [
pytest.mark.topology('tgen'),
pytest.mark.device_type('physical')
]


def test_pfc_pause_single_lossy_prio(ixia_api, ixia_testbed_config, conn_graph_facts, # noqa F811
Expand Down
5 changes: 4 additions & 1 deletion tests/ixia/pfcwd/test_pfcwd_a2a.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
from .files.pfcwd_multi_node_helper import run_pfcwd_multi_node_test
from .files.helper import skip_pfcwd_test

pytestmark = [pytest.mark.topology('tgen')]
pytestmark = [
pytest.mark.topology('tgen'),
pytest.mark.device_type('physical')
]


@pytest.mark.parametrize("trigger_pfcwd", [True, False])
Expand Down
5 changes: 4 additions & 1 deletion tests/ixia/pfcwd/test_pfcwd_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@

logger = logging.getLogger(__name__)

pytestmark = [pytest.mark.topology('tgen')]
pytestmark = [
pytest.mark.topology('tgen'),
pytest.mark.device_type('physical')
]

DEPENDENT_SERVICES = ['teamd', 'snmp', 'dhcp_relay', 'radv']

Expand Down
5 changes: 4 additions & 1 deletion tests/ixia/pfcwd/test_pfcwd_burst_storm.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@

logger = logging.getLogger(__name__)

pytestmark = [pytest.mark.topology('tgen')]
pytestmark = [
pytest.mark.topology('tgen'),
pytest.mark.device_type('physical')
]


def test_pfcwd_burst_storm_single_lossless_prio(ixia_api, ixia_testbed_config, conn_graph_facts, # noqa F811
Expand Down
5 changes: 4 additions & 1 deletion tests/ixia/pfcwd/test_pfcwd_m2o.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
from .files.pfcwd_multi_node_helper import run_pfcwd_multi_node_test
from .files.helper import skip_pfcwd_test

pytestmark = [pytest.mark.topology('tgen')]
pytestmark = [
pytest.mark.topology('tgen'),
pytest.mark.device_type('physical')
]


@pytest.mark.parametrize("trigger_pfcwd", [True, False])
Expand Down
5 changes: 4 additions & 1 deletion tests/ixia/pfcwd/test_pfcwd_runtime_traffic.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@

from .files.pfcwd_runtime_traffic_helper import run_pfcwd_runtime_traffic_test

pytestmark = [pytest.mark.topology('tgen')]
pytestmark = [
pytest.mark.topology('tgen'),
pytest.mark.device_type('physical')
]


def test_pfcwd_runtime_traffic(ixia_api, ixia_testbed_config, conn_graph_facts, fanout_graph_facts, # noqa F811
Expand Down
3 changes: 2 additions & 1 deletion tests/ixia/test_ixia_traffic.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@

pytestmark = [
pytest.mark.topology('tgen'),
pytest.mark.disable_loganalyzer
pytest.mark.disable_loganalyzer,
pytest.mark.device_type('physical')
]


Expand Down
3 changes: 2 additions & 1 deletion tests/ixia/test_tgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@

pytestmark = [
pytest.mark.topology('tgen'),
pytest.mark.disable_loganalyzer
pytest.mark.disable_loganalyzer,
pytest.mark.device_type('physical')
]


Expand Down
3 changes: 2 additions & 1 deletion tests/k8s/test_config_reload.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
from tests.common.config_reload import config_reload

pytestmark = [
pytest.mark.topology('any')
pytest.mark.topology('any'),
pytest.mark.device_type('physical')
]


Expand Down
3 changes: 2 additions & 1 deletion tests/k8s/test_disable_flag.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
from tests.common.helpers.assertions import pytest_assert

pytestmark = [
pytest.mark.topology('any')
pytest.mark.topology('any'),
pytest.mark.device_type('physical')
]


Expand Down
3 changes: 2 additions & 1 deletion tests/k8s/test_join_available_master.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
WAIT_FOR_SYNC = 60

pytestmark = [
pytest.mark.topology('any')
pytest.mark.topology('any'),
pytest.mark.device_type('physical')
]


Expand Down
1 change: 1 addition & 0 deletions tests/macsec/test_interop_wan_isis.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
pytestmark = [
pytest.mark.macsec_required,
pytest.mark.topology("wan-pub-isis"),
pytest.mark.device_type('physical')
]


Expand Down
3 changes: 2 additions & 1 deletion tests/mclag/test_mclag_l3.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
from mclag_helpers import DEFAULT_SESSION_TIMEOUT, NEW_SESSION_TIMEOUT

pytestmark = [
pytest.mark.topology('t0-mclag')
pytest.mark.topology('t0-mclag'),
pytest.mark.device_type('physical')
]


Expand Down
3 changes: 2 additions & 1 deletion tests/mvrf/test_mgmtvrf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
from tests.common.devices.ptf import PTFHost

pytestmark = [
pytest.mark.topology("any")
pytest.mark.topology("any"),
pytest.mark.device_type('physical')
]

logger = logging.getLogger(__name__)
Expand Down
3 changes: 2 additions & 1 deletion tests/nat/test_dynamic_nat.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
from tests.common.helpers.assertions import pytest_assert

pytestmark = [
pytest.mark.topology('t0')
pytest.mark.topology('t0'),
pytest.mark.device_type('physical')
]


Expand Down
3 changes: 2 additions & 1 deletion tests/nat/test_static_nat.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@


pytestmark = [
pytest.mark.topology('t0')
pytest.mark.topology('t0'),
pytest.mark.device_type('physical')
]


Expand Down
3 changes: 2 additions & 1 deletion tests/ospf/test_ospf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
logger = logging.getLogger(__name__)

pytestmark = [
pytest.mark.topology('t0')
pytest.mark.topology('t0'),
pytest.mark.device_type('physical')
]


Expand Down
3 changes: 2 additions & 1 deletion tests/ospf/test_ospf_bfd.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
logger = logging.getLogger(__name__)

pytestmark = [
pytest.mark.topology('t0', 't1')
pytest.mark.topology('t0', 't1'),
pytest.mark.device_type('physical')
]


Expand Down
3 changes: 2 additions & 1 deletion tests/pfc_asym/test_pfc_asym.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
import pytest

pytestmark = [
pytest.mark.topology('t0')
pytest.mark.topology('t0'),
pytest.mark.device_type('physical')
]


Expand Down
3 changes: 2 additions & 1 deletion tests/platform_tests/mellanox/test_check_sfp_eeprom.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

pytestmark = [
pytest.mark.asic('mellanox', 'nvidia-bluefield'),
pytest.mark.topology('any')
pytest.mark.topology('any'),
pytest.mark.device_type('physical')
]

SHOW_EEPOMR_CMDS = ["show interface transceiver eeprom -d",
Expand Down
3 changes: 2 additions & 1 deletion tests/platform_tests/mellanox/test_check_sfp_presence.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@

pytestmark = [
pytest.mark.asic('mellanox', 'nvidia-bluefield'),
pytest.mark.topology('any')
pytest.mark.topology('any'),
pytest.mark.device_type('physical')
]


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@

pytestmark = [
pytest.mark.asic('mellanox'),
pytest.mark.topology('any')
pytest.mark.topology('any'),
pytest.mark.device_type('physical')
]


Expand Down
Loading
Loading