Update T-rex version to v2.03 with installation from robot 79/1379/6
authorpmikus <pmikus@cisco.com>
Fri, 3 Jun 2016 07:00:59 +0000 (08:00 +0100)
committerDave Wallace <dwallacelf@gmail.com>
Fri, 3 Jun 2016 14:22:44 +0000 (14:22 +0000)
- JIRA: CSIT-132

- Update T-rex version to v2.03 with installation from robot

Change-Id: I7e222a61f88b1313273e6866dfc78d62b4d8ac93
Signed-off-by: pmikus <pmikus@cisco.com>
resources/libraries/python/TrafficGenerator.py
resources/tools/t-rex/t-rex-installer.sh
resources/tools/t-rex/t-rex-stateless-stop.py
resources/tools/t-rex/t-rex-stateless.py

index 267f5d2..3f5cbe6 100644 (file)
@@ -132,8 +132,6 @@ class TrafficGenerator(object):
         :return: nothing
         """
 
-        trex_path = "/opt/trex-core-2.02"
-
         topo = Topology()
 
         if tg_node['type'] != NodeType.TG:
@@ -141,9 +139,19 @@ class TrafficGenerator(object):
         self._node = tg_node
 
         if tg_node['subtype'] == NodeSubTypeTG.TREX:
+            trex_path = "/opt/trex-core-2.03"
+
             ssh = SSH()
             ssh.connect(tg_node)
 
+            (ret, stdout, stderr) = ssh.exec_command(
+                "sudo sh -c '/tmp/openvpp-testing/resources/tools/t-rex/"
+                "t-rex-installer.sh'", timeout=300)
+            if int(ret) != 0:
+                logger.error('trex installation failed: {0}'.format(
+                    stdout + stderr))
+                raise RuntimeError('Installation of TG failed')
+
             if1_pci = topo.get_interface_pci_addr(tg_node, tg_if1)
             if2_pci = topo.get_interface_pci_addr(tg_node, tg_if2)
             if1_mac = topo.get_interface_mac(tg_node, tg_if1)
index b7e9261..1bf665c 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-TREX_VERSION="2.02"
+TREX_VERSION="2.03"
 
 TREX_DOWNLOAD_REPO="https://github.com/cisco-system-traffic-generator/trex-core/archive/"
 TREX_DOWNLOAD_PACKAGE="v${TREX_VERSION}.zip"
@@ -24,7 +24,7 @@ cleanup () {
 
 trap cleanup EXIT
 
-test -d ${TREX_INSTALL_DIR} && echo "T-REX aleready installed: ${TREX_INSTALL_DIR}" && exit 1
+test -d ${TREX_INSTALL_DIR} && echo "T-REX aleready installed: ${TREX_INSTALL_DIR}" && exit 0
 
 wget -P ${WORKING_DIR} ${TREX_PACKAGE_URL}
 test $? -eq 0 || exit 1
index ed5ed7f..4f222a7 100755 (executable)
@@ -28,7 +28,7 @@ Functionality:
 
 import sys
 
-sys.path.insert(0, "/opt/trex-core-2.02/scripts/automation/"+\
+sys.path.insert(0, "/opt/trex-core-2.03/scripts/automation/"+\
                    "trex_control_plane/stl/")
 from trex_stl_lib.api import *
 
index c68e2c4..77895d7 100755 (executable)
@@ -48,7 +48,7 @@ import string
 import struct
 import sys
 
-sys.path.insert(0, "/opt/trex-core-2.02/scripts/automation/"+\
+sys.path.insert(0, "/opt/trex-core-2.03/scripts/automation/"+\
                    "trex_control_plane/stl/")
 from trex_stl_lib.api import *
 

©2016 FD.io a Linux Foundation Collaborative Project. All Rights Reserved.
Linux Foundation is a registered trademark of The Linux Foundation. Linux is a registered trademark of Linus Torvalds.
Please see our privacy policy and terms of use.