Add x710 and xl710 tests for testpmd
[csit.git] / resources / libraries / python / TrafficGenerator.py
index 86cf093..68bd372 100644 (file)
@@ -184,7 +184,7 @@ class TrafficGenerator(object):
         self._node = tg_node
 
         if tg_node['subtype'] == NodeSubTypeTG.TREX:
-            trex_path = "/opt/trex-core-2.09"
+            trex_path = "/opt/trex-core-2.22"
 
             ssh = SSH()
             ssh.connect(tg_node)
@@ -252,7 +252,7 @@ class TrafficGenerator(object):
             while max_startup_retries > 0:
                 # kill T-rex only if it is already running
                 (ret, _, _) = ssh.exec_command(
-                    "sh -c 'pgrep t-rex && sudo pkill t-rex'")
+                    "sh -c 'pgrep t-rex && sudo pkill t-rex && sleep 3'")
 
                 # configure T-rex
                 (ret, stdout, stderr) = ssh.exec_command(
@@ -273,7 +273,8 @@ class TrafficGenerator(object):
 
                 # get T-rex server info
                 (ret, _, _) = ssh.exec_command(
-                    "sh -c '{0}/resources/tools/t-rex/t-rex-server-info.py'"\
+                    "sh -c 'sleep 3; "
+                    "{0}/resources/tools/t-rex/t-rex-server-info.py'"\
                     .format(Constants.REMOTE_FW_DIR),
                     timeout=120)
                 if int(ret) == 0:
@@ -302,7 +303,7 @@ class TrafficGenerator(object):
             ssh = SSH()
             ssh.connect(node)
             (ret, stdout, stderr) = ssh.exec_command(
-                "sh -c 'sudo pkill t-rex'")
+                "sh -c 'sudo pkill t-rex && sleep 3'")
             if int(ret) != 0:
                 logger.error('pkill t-rex failed: {0}'.format(stdout + stderr))
                 raise RuntimeError('pkill t-rex failed')