summaryrefslogtreecommitdiffstats
path: root/scripts/automation/regression/stateful_tests
diff options
context:
space:
mode:
authorYaroslav Brustinov <ybrustin@cisco.com>2016-05-15 10:54:39 +0300
committerYaroslav Brustinov <ybrustin@cisco.com>2016-05-15 10:54:39 +0300
commite75dc535b163329b2c2619a55405924919d42887 (patch)
tree61d52876ca04d341495d4affea21bf1b7e99c36c /scripts/automation/regression/stateful_tests
parent361a7a79ce71dced4bc005c85ca2c4e272cd8f9d (diff)
regression and master daemon updates
Diffstat (limited to 'scripts/automation/regression/stateful_tests')
-rwxr-xr-xscripts/automation/regression/stateful_tests/trex_general_test.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/scripts/automation/regression/stateful_tests/trex_general_test.py b/scripts/automation/regression/stateful_tests/trex_general_test.py
index 38e97597..33b954fc 100755
--- a/scripts/automation/regression/stateful_tests/trex_general_test.py
+++ b/scripts/automation/regression/stateful_tests/trex_general_test.py
@@ -274,9 +274,16 @@ class CTRexGeneral_Test(unittest.TestCase):
# raise
def unzip_client_package(self):
+ client_pkg_files = glob('%s/trex_client*.tar.gz' % CTRexScenario.scripts_path)
+ if not len(client_pkg_files):
+ raise Exception('Could not find client package')
+ if len(client_pkg_files) > 1:
+ raise Exception('Found more than one client packages')
if not os.path.exists('%s/trex_client' % CTRexScenario.scripts_path):
print('\nUnzipping package')
- CTRexScenario.trex.master_daemon.unpack_client()
+ return_code, _, stderr = misc_methods.run_command("tar -xzf %s -C %s" % (client_pkg_files[0], CTRexScenario.scripts_path))
+ if return_code:
+ raise Exception('Could not untar the client package: %s' % stderr)
else:
print('\nClient package is untarred')
@@ -304,7 +311,7 @@ class CTRexGeneral_Test(unittest.TestCase):
self.trex.force_kill(confirm = False)
if not self.is_loopback:
print('')
- if self.trex: # stateful
+ if not self.stl_trex: # stateful
self.router.load_clean_config()
self.router.clear_counters()
self.router.clear_packet_drop_stats()