Fix AOTS launcher menu: run operation added
authorEduardo Ramos Testillano (eramedu) <eduardo.ramos.testillano@ericsson.com>
Tue, 28 Apr 2020 22:42:56 +0000 (00:42 +0200)
committerEduardo Ramos Testillano (eramedu) <eduardo.ramos.testillano@ericsson.com>
Tue, 28 Apr 2020 22:42:56 +0000 (00:42 +0200)
example/diameter/launcher/deployments/aots-setup/launcher.py

index 88317d6..6d800e0 100755 (executable)
@@ -641,19 +641,20 @@ def interactive_execution():
     2.  Look
 
     Test cases execution:
-    3.  Start with test rate
-    4.  Start next N test cases
-    5.  In-progress limit
+    3.  Run test
+    4.  Start with test rate
+    5.  Start next N test cases
+    6.  In-progress limit
 
     Low level execution: test case steps
-    6.  Execute next N steps
+    7.  Execute next N steps
 
     Status & cycling:
-    7.  Reset
-    8.  Pool repeats
-    9.  Reset statistics & counters
-    10. Auto reset
-    11. Reports configuration
+    8.  Reset
+    9.  Pool repeats
+    10. Reset statistics & counters
+    11. Auto reset
+    12. Reports configuration
     ''')
 
     opt=input("Input option: \n")
@@ -676,6 +677,13 @@ def interactive_execution():
       adml_operation("\"test|look{}\"".format(_id))
 
     elif opt=="h3":
+      print("Run specific test case for id provided.")
+    elif opt=="3":
+      _id=input("Input the test case id: ")
+      if _id: _id="|" + _id
+      adml_operation("\"test|run{}\"".format(_id))
+
+    elif opt=="h4":
       print('''
 Starts/resume the provided number of test ticks per second (ttps). The ADML starts
 with the event trigger system suspended, and this operation is neccessary to begin
@@ -694,22 +702,22 @@ per second. To reach greater rates ADML will join synchronously the needed numbe
 new time-triggered test cases per a single event, writting a warning-level trace to
 advice about the risk of burst sendings and recommend launching multiple instances
 to achieve such load with a lower rate per instance.''')
-    elif opt=="3":
+    elif opt=="4":
       ttps=input("Input the test ticks per second (0: stops the test rate clock): ")
       adml_operation("\"test|ttps|{}\"".format(ttps))
 
-    elif opt=="h4":
+    elif opt=="h5":
       print('''
 Forces the execution of the next test case(s) without waiting for test manager tick.
 Provide an integer value for 'sync-amount' to send a burst synchronous amount of the
 next programmed test cases (1 by default). This event works regardless the timer tick
 function, but it is normally used with the test manager tick stopped.''')
-    elif opt=="4":
+    elif opt=="5":
       amount=input("Input the number of tests to execute synchronously [1 by default]: ")
       if not amount: amount=1
       adml_operation("\"test|next|{}\"".format(amount))
 
-    elif opt=="h5":
+    elif opt=="h6":
       print('''
 In-progress limit of test cases. No new test cases will be launched over this value
 (test Manager tick work will be ignored). Zero-value is equivalent to stop the clock.
@@ -718,7 +726,7 @@ amount of in-progress test cases will be shown.
 
 Default is 1 to ensure sequential execution for testcases (function test mode).
 For system test, it is recommended to set '-1' (no limit).''')
-    elif opt=="5":
+    elif opt=="6":
       print("\nTypical 'in-progress limit' values:")
       print("-1: no limit")
       print(" 0: similar to stop the test rate clock")
@@ -727,7 +735,7 @@ For system test, it is recommended to set '-1' (no limit).''')
       if limit: limit = "|" + limit
       adml_operation("\"test|ip-limit{}\"".format(limit))
 
-    elif opt=="h6":
+    elif opt=="h7":
       print('''
 Makes interactive a specific test case id. The amount is the margin of execution steps
 to be done. With amount of '0' the test case is selected to be interactive, but no step
@@ -737,56 +745,56 @@ of 0, implies no execution steps margin, which could be useful to 'freeze' a tes
 middle of its execution.  You could also provide -1 to make it non-interactive resuming
 it from the current step.
 By default, current test case id is selected for interaction.''')
-    elif opt=="6":
+    elif opt=="7":
       amount=input("Input the number of steps to execute (-1: resumes the test case; 0: freezes it) [1 by default]: ")
       if not amount: amount = 1
       test_id=input("Input the test id [current by default (remember to set a valid pointer with 'go to')]: ")
       if test_id: test_id = "|" + test_id
       adml_operation("\"test|interact|{}{}\"".format(amount, test_id))
 
-    elif opt=="h7":
+    elif opt=="h8":
       print('''
 Reset the test case for id provided, all the tests when missing. It could be hard/soft:
 - hard: you probably may need to stop the load rate before. This operation initializes
   all test cases regardless their states.
 - soft: only for finished cases (those with 'Success' or 'Failed' states). It does not
   affect to test cases with 'InProgress' state.''')
-    elif opt=="7":
+    elif opt=="8":
       rtype=input("Input the reset type (soft/hard) [hard]: ")
       if not rtype: rtype = "hard"
       test_id=input("Input the test id [all tests by default]: ")
       if test_id: test_id = "|" + test_id
       adml_operation("\"test|reset|{}{}\"".format(rtype, test_id))
 
-    elif opt=="h8":
+    elif opt=="h9":
       print('''
 Restarts the whole programmed test list when finished the amount number of times (repeats
 forever if value -1 is provided). This is disabled by default (amount = 0): testing trigger
 system will enter suspended state until new ttps operation is received and a soft reset has
 been done before. Test cases state & data will be reset (when achieved again), but general
 statistics and counters will continue measuring until reset with 'collect' operation.''')
-    elif opt=="8":
+    elif opt=="9":
       amount=input("Input the number of cycle repeats (-1: repeats forever; 0: disables repetitions): ")
       adml_operation("\"test|repeats|{}\"".format(amount))
 
-    elif opt=="h9":
+    elif opt=="h10":
       print('''
 Reset statistics and counters to start a new test stage of performance measurement.
 This affects to final logs retrieved on exit (option 0).''')
-    elif opt=="9":
+    elif opt=="10":
       adml_operation("\"collect\"")
 
-    elif opt=="h10":
+    elif opt=="h11":
       print('''
 When cycling, current test cases can be soft (default) or hard reset. If no timeout has
 been configured for the test case, hard reset could prevent stuck on the next cycle for
 those test cases still in progress.''')
-    elif opt=="10":
+    elif opt=="11":
       rtype=input("Input the reset type (soft/hard) [hard]: ")
       if not rtype: rtype = "hard"
       adml_operation("\"test|auto-reset|{}\"".format(rtype))
 
-    elif opt=="h11":
+    elif opt=="h12":
       print('''
 Enables/disables report generation for a certain test case state: initialized, in-progress,
 failed or success (also 'all' and 'none' reserved words could be used). This applies to report
@@ -801,7 +809,7 @@ tests are going to fail then you could enable only such failed dumps. Anyway you
 the reports visibility to fit your needs in a given situation.
 
 Also you could enable hexadecimal representation for diameter messages on reports.''')
-    elif opt=="11":
+    elif opt=="12":
       print("\nInput the report target operation, capital letters to enable:")
       rtype=input("(I/i)nitialized, in-(P/p)rogress, (F/f)ailed, (S/s)uccess, (A/a)ll, (N/n)one [A: all will be enabled by default]: ")
       if not rtype: rtype = "A"