summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_sim.py
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2016-03-06 13:24:25 +0200
committerimarom <imarom@cisco.com>2016-03-06 13:25:00 +0200
commit7143d71c90df1f9909f6b8a4d7d91a7a22340f68 (patch)
treeb28710e3f07f75117821cdcd01e837b8563c49de /scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_sim.py
parentb5cf4165ac6ca8e3a56a2f4f6bb4b28cfab33c98 (diff)
1. blazing fast regression
2. API checks for Python version
Diffstat (limited to 'scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_sim.py')
-rw-r--r--scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_sim.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_sim.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_sim.py
index abfdd9bc..395c5864 100644
--- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_sim.py
+++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_sim.py
@@ -428,9 +428,9 @@ def validate_args (parser, options):
parser.error("limit cannot be lower than number of DP cores")
-def main ():
+def main (args = None):
parser = setParserOptions()
- options = parser.parse_args()
+ options = parser.parse_args(args = args)
validate_args(parser, options)
@@ -466,13 +466,14 @@ def main ():
except KeyboardInterrupt as e:
print "\n\n*** Caught Ctrl + C... Exiting...\n\n"
- exit(1)
+ return (-1)
except STLError as e:
print e
- exit(1)
+ return (-1)
+
+ return (0)
- exit(0)
if __name__ == '__main__':
main()