summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)