summaryrefslogtreecommitdiffstats
path: root/scripts/automation
diff options
context:
space:
mode:
authorYaroslav Brustinov <ybrustin@cisco.com>2016-06-06 14:36:09 +0300
committerYaroslav Brustinov <ybrustin@cisco.com>2016-06-06 14:36:09 +0300
commitf2aeea5212180bc0b9efce725adaf0d832f6f199 (patch)
treed4c32b233612bc8252ebc704cb125386f5bfcd40 /scripts/automation
parent1454985e5408bdf796a9c9978622f2ba66ec04d8 (diff)
regression: reduce 1 json request
Diffstat (limited to 'scripts/automation')
-rwxr-xr-xscripts/automation/regression/trex_unit_test.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/scripts/automation/regression/trex_unit_test.py b/scripts/automation/regression/trex_unit_test.py
index b32279e8..83650164 100755
--- a/scripts/automation/regression/trex_unit_test.py
+++ b/scripts/automation/regression/trex_unit_test.py
@@ -203,11 +203,10 @@ class CTRexTestConfiguringPlugin(Plugin):
print('Could not restart TRex daemon server')
sys.exit(-1)
- trex_cmds = CTRexScenario.trex.get_trex_cmds()
- if trex_cmds:
- if self.kill_running:
- CTRexScenario.trex.kill_all_trexes()
- else:
+ if self.kill_running:
+ CTRexScenario.trex.kill_all_trexes()
+ else:
+ if CTRexScenario.trex.get_trex_cmds():
print('TRex is already running')
sys.exit(-1)