diff options
author | Miroslav Miklus <mmiklus@cisco.com> | 2016-02-23 22:02:06 +0100 |
---|---|---|
committer | Stefan Kobza <skobza@cisco.com> | 2016-02-25 09:41:47 +0000 |
commit | d4d0312773dbb88b65500b75f3628f365ae5f3f7 (patch) | |
tree | 5a0d33d8a8898fca6247731fd7d26fdd02fcc720 /resources/libraries/python | |
parent | afe018f552088c2bafbbf3e2e9bd7734db70e283 (diff) |
Performance suite: introduced suite variables
- perf suite variables
- T-REX setup fix
Change-Id: I608581e45d0e5f80e8f75c2a07c994bf0e0d0df3
Signed-off-by: Miroslav Miklus <mmiklus@cisco.com>
Diffstat (limited to 'resources/libraries/python')
-rw-r--r-- | resources/libraries/python/TrafficGenerator.py | 11 |
1 files changed, 8 insertions, 3 deletions
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): |