diff options
| author | naveen <nguggarigoud@vmware.com> | 2020-08-18 19:52:45 +0530 |
|---|---|---|
| committer | nguggarigoud <nguggarigoud@vmware.com> | 2020-09-15 15:44:10 +0530 |
| commit | 3dfd384ec4f3d7cdcc43373c6ff6c197fe81c81b (patch) | |
| tree | 80bc4523d2ca96067188a934a41df7f858f1fa9e /tests/topotests/bgp_communities_topo1/test_bgp_communities.py | |
| parent | eb5e807234ae269614887097507f7a82206478e3 (diff) | |
tests: Moving kernel version check to API.
Signed-off-by: naveen <nguggarigoud@vmware.com>
Diffstat (limited to 'tests/topotests/bgp_communities_topo1/test_bgp_communities.py')
| -rw-r--r-- | tests/topotests/bgp_communities_topo1/test_bgp_communities.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/topotests/bgp_communities_topo1/test_bgp_communities.py b/tests/topotests/bgp_communities_topo1/test_bgp_communities.py index 2726f65ad9..88c5e0df19 100644 --- a/tests/topotests/bgp_communities_topo1/test_bgp_communities.py +++ b/tests/topotests/bgp_communities_topo1/test_bgp_communities.py @@ -31,7 +31,6 @@ import sys import time import json import pytest -import platform # Save the Current Working Directory to find configuration files. CWD = os.path.dirname(os.path.realpath(__file__)) @@ -41,7 +40,7 @@ sys.path.append(os.path.join(CWD, "../")) # Import topogen and topotest helpers from mininet.topo import Topo from lib.topogen import Topogen, get_topogen -from lib.topotest import version_cmp + # Import topoJson from lib, to create topology and initial configuration from lib.common_config import ( start_topology, @@ -55,6 +54,7 @@ from lib.common_config import ( create_route_maps, create_prefix_lists, create_route_maps, + required_linux_kernel_version ) from lib.topolog import logger from lib.bgp import ( @@ -103,6 +103,11 @@ def setup_module(mod): * `mod`: module name """ + # Required linux kernel version for this suite to run. + result = required_linux_kernel_version('4.15') + if result: + pytest.skip(result) + testsuite_run_time = time.asctime(time.localtime(time.time())) logger.info("Testsuite start time: {}".format(testsuite_run_time)) logger.info("=" * 40) @@ -120,11 +125,6 @@ def setup_module(mod): # Creating configuration from JSON build_config_from_json(tgen, topo) - if version_cmp(platform.release(), '4.19') < 0: - error_msg = ('These tests will not run. (have kernel "{}", ' - 'requires kernel >= 4.19)'.format(platform.release())) - pytest.skip(error_msg) - # Checking BGP convergence global BGP_CONVERGENCE global ADDR_TYPES |
