summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKlement Sekera <klement.sekera@gmail.com>2024-03-08 10:24:46 +0100
committerOle Tr�an <otroan@employees.org>2024-03-12 19:33:12 +0000
commitceed1e3b816ebcf103b07e5a2dd004aabb2c4145 (patch)
tree5d256850bddb9f4289b43872c6c1072bea44df75
parentc3148b1be8f519c80c4417c21b978dfef72b351b (diff)
tests: use proper unit test skip instead of prints
Using unittest skip instead of print unclutters display by not printing skip messages when not applicable, e.g. when somebody runs tests which are unrelated to netns tests, e.g. with FILTER=vapi. Type: fix Fixes: e416893a59 Change-Id: Ie09e213249aa47da7e4ff484c3d072fbce3c2001 Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
-rw-r--r--test/vm_vpp_interfaces.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/test/vm_vpp_interfaces.py b/test/vm_vpp_interfaces.py
index ed2d55b834a..cb48fee6f6a 100644
--- a/test/vm_vpp_interfaces.py
+++ b/test/vm_vpp_interfaces.py
@@ -126,7 +126,7 @@ def create_test(test_name, test, ip_version, mtu):
)
)
else:
- print(
+ return unittest.skip(
f"Skipping test:{test_name} as mtu:{mtu} is "
f"invalid for TCP/IPv{ip_version}"
)
@@ -146,8 +146,6 @@ def generate_vpp_interface_tests(tests, test_class):
generated tests are set as attributes.
"""
- if config.skip_netns_tests:
- print("Skipping netns tests")
for test in tests:
for ip_version in test_config["ip_versions"]:
for mtu in test_config["mtus"]: