@@ -24,10 +24,11 @@ (declare (unit dashboard-tests)) (declare (uses common)) (declare (uses db)) (declare (uses gutils)) +(declare (uses ezsteps)) (include "common_records.scm") (include "db_records.scm") (include "run_records.scm") @@ -256,31 +257,26 @@ (let ((htmlviewercmd (configf:lookup *configdat* "setup" "htmlviewercmd"))) (if htmlviewercmd (system (conc "(" htmlviewercmd " " lfilename " ) &")) (iup:send-url lfilename)))) -(define (dashboard-tests:run-a-step +(define (dashboard-tests:run-a-step info) + #t) -(define (dashboard-tests:step-run-control test-id stepname teststeps) +(define (dashboard-tests:step-run-control testdat stepname testconfig) (iup:dialog ;; #:close_cb (lambda (a)(exit)) ; #:expand "YES" #:title stepname (iup:vbox ; #:expand "YES" (iup:label (conc "Step: " stepname "\nNB// These buttons only run the test step\nfor the purpose of debugging.\nNot all database updates are done.")) (iup:button "Re-run" #:expand "HORIZONTAL" #:action (lambda (obj) - (print "Rerun " stepname))) + (ezsteps:run-from testdat stepname #f))) (iup:button "Re-run and continue" #:expand "HORIZONTAL" #:action (lambda (obj) - (let ((inprocess #f)) - (for-each - (lambda (stepn) - (let ((curr-step-name (vector-ref stepn 0))) - (if (equal? curr-step-name stepname)(set! inprocess #t)) - (if inprocess (print "Continue " curr-step-name)))) - teststeps)))) + (ezsteps:run-from testdat stepname #f))) ;; (iup:button "Refresh test data" ;; #:expand "HORIZONTAL" ;; #:action (lambda (obj) ;; (print "Refresh test data " stepname)) ))) @@ -307,11 +303,11 @@ "runname") #f)) ;; These next two are intentional bad values to ensure errors if they should not ;; get filled in properly. (logfile "/this/dir/better/not/exist") (rundir logfile) - (testdat-path (conc rundir "/testdat.db")) ;; this gets recalculated until found + (testdat-path (conc rundir "/testdat.db")) ;; this gets recalculated until found (teststeps (if testdat (db:get-compressed-steps test-id work-area: rundir) '())) (testfullname (if testdat (db:test-get-fullname testdat) "Gathering data ...")) (testname (if testdat (db:test-get-testname testdat) "n/a")) (testmeta (if testdat (let ((tm (open-run-close db:testmeta-get-record #f testname))) @@ -489,11 +485,11 @@ (fname (iup:attribute obj mtrx-rc))) ;; col)))) (if (eq? col 6) (view-a-log fname) (iup:show (dashboard-tests:step-run-control - test-id + testdat (iup:attribute obj (conc lin ":" 1)) teststeps)))))))) ;; (let loop ((count 0)) ;; (iup:attribute-set! steps-matrix "FITTOTEXT" (conc "L" count)) ;; (if (< count 30)