edits to duration loop, doesn't need to pause when toggling 'another iteration'

Signed-off-by: Dipti <dipti.dhond@candelatech.com>
This commit is contained in:
Dipti
2021-02-23 22:41:35 -08:00
parent cb757f5d28
commit 12ec1f640c

View File

@@ -17,6 +17,8 @@ from LANforge import LFUtils
from LANforge.lfcli_base import LFCliBase from LANforge.lfcli_base import LFCliBase
from LANforge.LFUtils import * from LANforge.LFUtils import *
from realm import Realm from realm import Realm
import pprint
from pprint import pprint
""" """
cvScenario.lanforge_db = args.lanforge_db cvScenario.lanforge_db = args.lanforge_db
@@ -66,7 +68,7 @@ class RunCvScenario(LFCliBase):
if (port_counter != 0) and (attempts == 0): if (port_counter != 0) and (attempts == 0):
print("There appears to be a vAP in this database, quitting.") print("There appears to be a vAP in this database, quitting.")
pprint(alias_map); pprint(alias_map)
exit(1) exit(1)
data = { data = {
@@ -76,38 +78,33 @@ class RunCvScenario(LFCliBase):
"clean_chambers": "yes" "clean_chambers": "yes"
} }
self.json_post("/cli-json/load", data) self.json_post("/cli-json/load", data)
sleep(1) sleep(5)
self._pass("Loaded scenario %s" % self.lanforge_db, True) self._pass("Loaded scenario %s" % self.lanforge_db, True)
return True return True
def start(self, debug_=False): def start(self, debug_=False):
# /gui_cli takes commands keyed on 'cmd', so we create an array of commands # /gui_cli takes commands keyed on 'cmd', so we create an array of commands
commands = [ commands = [
"cv apply '%s'" % self.cv_scenario, #"cv apply '%s'" % self.cv_scenario,
"sleep 5", "sleep 5",
"cv build", "cv build",
"sleep 5",
"cv is_built", "cv is_built",
"sleep 2", "sleep 2",
"cv sync", "cv sync",
"sleep 1", "sleep 1",
"cv load '%s' test_ref" % self.cv_test, "cv create '%s' test_ref" % self.cv_test,
#"cv create '%s' test_ref" % self.cv_test, "sleep 5",
"sleep 4",
"cv load test_ref '%s'" % self.test_profile, "cv load test_ref '%s'" % self.test_profile,
"sleep 2", "sleep 2",
"cv click test_ref 'Auto Save Report'", "cv click test_ref 'Auto Save Report'",
"sleep 4", "sleep 4",
"cv click test_ref Start", "cv click test_ref Start",
"sleep 1", "sleep 2",
"cv click test_ref 'Another Iteration'", "cv click test_ref 'Another Iteration'",
"sleep 400", #sleep for test duration for however long 1 test time x num iterations takes "sleep 240", #sleep for (test duration for 1 time test takes x num iterations requested) - this example is 2 iterations
#"cv click test_ref 'Pause'", #pause for test "cv click test_ref 'Another Iteration'", #unselect Another Iteration before test ends
#"sleep 5", "sleep 50" #finish test
"cv click test_ref 'Another Iteration'", #unselect Another Iteration
"cv click test_ref 'Pause'", #pause test
#"sleep 100",
#"cv click test_ref 'Start'",
#"sleep 30",
"cv get test_ref 'Report Location:'", "cv get test_ref 'Report Location:'",
"sleep 5", "sleep 5",
"cv click test_ref 'Save HTML'", "cv click test_ref 'Save HTML'",