From d4d0312773dbb88b65500b75f3628f365ae5f3f7 Mon Sep 17 00:00:00 2001 From: Miroslav Miklus Date: Tue, 23 Feb 2016 22:02:06 +0100 Subject: Performance suite: introduced suite variables - perf suite variables - T-REX setup fix Change-Id: I608581e45d0e5f80e8f75c2a07c994bf0e0d0df3 Signed-off-by: Miroslav Miklus --- resources/libraries/python/TrafficGenerator.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'resources/libraries/python') diff --git a/resources/libraries/python/TrafficGenerator.py b/resources/libraries/python/TrafficGenerator.py index 4b71b59cc7..e63b8bc5a3 100644 --- a/resources/libraries/python/TrafficGenerator.py +++ b/resources/libraries/python/TrafficGenerator.py @@ -34,8 +34,8 @@ class TrafficGenerator(object): def initialize_traffic_generator(node, interface1, interface2): """TG initialization :param node: Traffic generator node - :param interface1: PCI address of first interface - :param interface2: PCI address of second interface + :param interface1: interface name of first interface + :param interface2: interface name of second interface :type node: dict :type interface1: str :type interface2: str @@ -54,12 +54,17 @@ class TrafficGenerator(object): "sh -c 'cd {0}/scripts/ && " "sudo ./trex-cfg'"\ .format(trex_path)) + if int(ret) != 0: + logger.error('trex-cfg failed: {0}'.format(stdout + stderr)) + raise RuntimeError('trex-cfg failed') - (ret, stdout, stderr) = ssh.exec_command( + (ret, _, _) = ssh.exec_command( "sh -c 'cd {0}/scripts/ && " "sudo nohup ./t-rex-64 -i -c 4 --iom 0 > /dev/null 2>&1 &'" "> /dev/null"\ .format(trex_path)) + if int(ret) != 0: + raise RuntimeError('t-rex-64 startup failed') @staticmethod def teardown_traffic_generator(node): -- cgit 1.2.3-korg