summaryrefslogtreecommitdiff
path: root/tests/topotests/bgp_communities_topo1/test_bgp_communities.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/topotests/bgp_communities_topo1/test_bgp_communities.py')
-rw-r--r--tests/topotests/bgp_communities_topo1/test_bgp_communities.py14
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