summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/automation/regression/stateful_tests/trex_general_test.py6
-rw-r--r--scripts/automation/regression/stateless_tests/stl_client_test.py2
-rw-r--r--scripts/automation/regression/stateless_tests/stl_general_test.py3
-rw-r--r--scripts/automation/regression/stateless_tests/stl_rx_test.py2
-rw-r--r--scripts/automation/regression/trex.py1
5 files changed, 10 insertions, 4 deletions
diff --git a/scripts/automation/regression/stateful_tests/trex_general_test.py b/scripts/automation/regression/stateful_tests/trex_general_test.py
index 86fe93e7..82b1d9d1 100755
--- a/scripts/automation/regression/stateful_tests/trex_general_test.py
+++ b/scripts/automation/regression/stateful_tests/trex_general_test.py
@@ -80,9 +80,9 @@ class CTRexGeneral_Test(unittest.TestCase):
device_cfg.set_tftp_config(CTRexScenario.router_cfg['tftp_config_dict'])
CTRexScenario.router.load_platform_data_from_file(device_cfg)
CTRexScenario.router.launch_connection(device_cfg)
- running_image = CTRexScenario.router.get_running_image_details()['image']
- print('Current router image: %s' % running_image)
if CTRexScenario.router_cfg['forceImageReload']:
+ running_image = CTRexScenario.router.get_running_image_details()['image']
+ print('Current router image: %s' % running_image)
needed_image = device_cfg.get_image_name()
if not CTRexScenario.router.is_image_matches(needed_image):
print('Setting router image: %s' % needed_image)
@@ -96,7 +96,7 @@ class CTRexGeneral_Test(unittest.TestCase):
self.fail('Unable to set router image: %s, current image is: %s' % (needed_image, running_image))
else:
print('Matches needed image: %s' % needed_image)
- CTRexScenario.router_image = running_image
+ CTRexScenario.router_image = running_image
if self.modes:
print(termstyle.green('\t!!!\tRunning with modes: %s, not suitable tests will be skipped.\t!!!' % list(self.modes)))
diff --git a/scripts/automation/regression/stateless_tests/stl_client_test.py b/scripts/automation/regression/stateless_tests/stl_client_test.py
index c5e0c3c6..ed125cde 100644
--- a/scripts/automation/regression/stateless_tests/stl_client_test.py
+++ b/scripts/automation/regression/stateless_tests/stl_client_test.py
@@ -46,6 +46,8 @@ class STLClient_Test(CStlGeneral_Test):
@classmethod
def tearDownClass(cls):
+ if CTRexScenario.stl_init_error:
+ return
# connect back at end of tests
if not cls.is_connected():
CTRexScenario.stl_trex.connect()
diff --git a/scripts/automation/regression/stateless_tests/stl_general_test.py b/scripts/automation/regression/stateless_tests/stl_general_test.py
index 4ff1eec9..82738f96 100644
--- a/scripts/automation/regression/stateless_tests/stl_general_test.py
+++ b/scripts/automation/regression/stateless_tests/stl_general_test.py
@@ -85,7 +85,8 @@ class STLBasic_Test(CStlGeneral_Test):
@nottest
def test_connectivity(self):
if not self.is_loopback:
- CTRexScenario.router.load_clean_config()
+ if CTRexScenario.router_cfg['forceImageReload']:
+ CTRexScenario.router.load_clean_config()
CTRexScenario.router.configure_basic_interfaces()
CTRexScenario.router.config_pbr(mode = "config")
diff --git a/scripts/automation/regression/stateless_tests/stl_rx_test.py b/scripts/automation/regression/stateless_tests/stl_rx_test.py
index 9725e821..80e6bee6 100644
--- a/scripts/automation/regression/stateless_tests/stl_rx_test.py
+++ b/scripts/automation/regression/stateless_tests/stl_rx_test.py
@@ -41,6 +41,8 @@ class STLRX_Test(CStlGeneral_Test):
@classmethod
def tearDownClass(cls):
+ if CTRexScenario.stl_init_error:
+ return
# connect back at end of tests
if not cls.is_connected():
CTRexScenario.stl_trex.connect()
diff --git a/scripts/automation/regression/trex.py b/scripts/automation/regression/trex.py
index a0a1d42d..9541ad76 100644
--- a/scripts/automation/regression/trex.py
+++ b/scripts/automation/regression/trex.py
@@ -38,6 +38,7 @@ class CTRexScenario:
is_copied = False
GAManager = None
no_daemon = False
+ router_image = None
class CTRexRunner:
"""This is an instance for generating a CTRexRunner"""