Index: Makefile ================================================================== --- Makefile +++ Makefile @@ -227,121 +227,20 @@ @echo Installing to PREFIX=$(PREFIX) $(INSTALL) mtest $(PREFIX)/bin/.$(ARCHSTR)/mtest utils/mk_wrapper $(PREFIX) mtest $(PREFIX)/bin/megatest chmod a+x $(PREFIX)/bin/megatest -$(PREFIX)/bin/.$(ARCHSTR)/ndboard : ndboard - $(INSTALL) ndboard $(PREFIX)/bin/.$(ARCHSTR)/ndboard - -$(PREFIX)/bin/newdashboard : $(PREFIX)/bin/.$(ARCHSTR)/ndboard utils/mk_wrapper - utils/mk_wrapper $(PREFIX) ndboard $(PREFIX)/bin/newdashboard - chmod a+x $(PREFIX)/bin/newdashboard - -# mtutil - -$(PREFIX)/bin/.$(ARCHSTR)/mtut : mtut - $(INSTALL) mtut $(PREFIX)/bin/.$(ARCHSTR)/mtut - -install-mtut : mtut - $(INSTALL) mtut $(PREFIX)/bin/mtut - -$(PREFIX)/bin/mtutil : $(PREFIX)/bin/.$(ARCHSTR)/mtut utils/mk_wrapper - utils/mk_wrapper $(PREFIX) mtut $(PREFIX)/bin/mtutil - chmod a+x $(PREFIX)/bin/mtutil - -# mtexec - -mtexec: $(OFILES) $(MOFILES) megatest-fossil-hash.scm mtexec.scm - csc $(CSCOPTS) $(OFILES) $(MOFILES) mtexec.scm -o mtexec - -$(PREFIX)/bin/.$(ARCHSTR)/mtexec : mtexec - $(INSTALL) mtexec $(PREFIX)/bin/.$(ARCHSTR)/mtexec - -$(PREFIX)/bin/mtexec : $(PREFIX)/bin/.$(ARCHSTR)/mtexec utils/mk_wrapper - utils/mk_wrapper $(PREFIX) mtexec $(PREFIX)/bin/mtexec - chmod a+x $(PREFIX)/bin/mtexec - -# tcmt - -$(PREFIX)/bin/.$(ARCHSTR)/tcmt : tcmt - $(INSTALL) tcmt $(PREFIX)/bin/.$(ARCHSTR)/tcmt - -$(PREFIX)/bin/tcmt : $(PREFIX)/bin/.$(ARCHSTR)/tcmt utils/mk_wrapper - utils/mk_wrapper $(PREFIX) tcmt $(PREFIX)/bin/tcmt - chmod a+x $(PREFIX)/bin/tcmt - -$(PREFIX)/bin/mt_laststep : utils/mt_laststep - $(INSTALL) $< $@ - chmod a+x $@ - -$(PREFIX)/bin/mt_runstep : utils/mt_runstep - $(INSTALL) $< $@ - chmod a+x $@ - -$(PREFIX)/bin/serialize-env: serialize-env.scm - csc serialize-env.scm - $(INSTALL) serialize-env $@ - -$(PREFIX)/bin/mt_ezstep : utils/mt_ezstep - $(INSTALL) $< $@ - chmod a+x $@ - -$(PREFIX)/bin/mt_xterm : utils/mt_xterm - $(INSTALL) $< $@ - chmod a+x $@ - -$(PREFIX)/bin/nbfake : utils/nbfake - $(INSTALL) $< $@ - chmod a+x $@ - -$(PREFIX)/bin/remrun : utils/remrun - $(INSTALL) $< $@ - chmod a+x $@ - -$(PREFIX)/bin/viewscreen : utils/viewscreen - $(INSTALL) $< $@ - chmod a+x $@ - -$(PREFIX)/bin/nbfind : utils/nbfind - $(INSTALL) $< $@ - chmod a+x $@ - -$(PREFIX)/bin/mtrunner : utils/mtrunner - $(INSTALL) $< $@ - chmod a+x $@ - -$(PREFIX)/bin/mt-old-to-new.sh : utils/mt-old-to-new.sh - $(INSTALL) $< $@ - chmod a+x $@ - -$(PREFIX)/bin/mt-new-to-old.sh : utils/mt-new-to-old.sh - $(INSTALL) $< $@ - chmod a+x $@ - - -deploytarg/nbfake : utils/nbfake - $(INSTALL) $< $@ - chmod a+x $@ - -deploytarg/viewscreen : utils/viewscreen - $(INSTALL) $< $@ - chmod a+x $@ - -deploytarg/nbfind : utils/nbfind - $(INSTALL) $< $@ - chmod a+x $@ - -$(PREFIX)/bin/mtest-reaper: helpers/mtest-reaper.scm helpers/ducttape-lib.scm helpers/inteldate.scm helpers/mimetypes.scm - make -C helpers $@ PREFIX=$(PREFIX) INSTALL=$(INSTALL) ARCHSTR=$(ARCHSTR) - -mtest-reaper: $(PREFIX)/bin/mtest-reaper - -# install dashboard as dboard so wrapper script can be called dashboard $(PREFIX)/bin/.$(ARCHSTR)/dboard : dboard $(FILES) utils/mk_wrapper utils/mk_wrapper $(PREFIX) dboard $(PREFIX)/bin/dashboard chmod a+x $(PREFIX)/bin/dashboard $(INSTALL) dboard $(PREFIX)/bin/.$(ARCHSTR)/dboard + +# install dashboard as dboard so wrapper script can be called dashboard +$(PREFIX)/bin/.$(ARCHSTR)/ndboard : ndboard $(FILES) utils/mk_wrapper + utils/mk_wrapper $(PREFIX) ndboard $(PREFIX)/bin/newdashboard + chmod a+x $(PREFIX)/bin/newdashboard + $(INSTALL) ndboard $(PREFIX)/bin/.$(ARCHSTR)/ndboard $(PREFIX)/bin/.$(ARCHSTR)/lib/libpangox-1.0.so : lib/libpangox-1.0.so if [[ $(ARCHSTR) == 12.5 ]]; then \ mkdir -p $(PREFIX)/bin/.$(ARCHSTR)/lib; \ $(INSTALL) lib/libpangox-1.0.so $(PREFIX)/bin/.$(ARCHSTR)/lib/libpangox-1.0.so; \ @@ -358,11 +257,12 @@ mkdir -p $(PREFIX)/bin/.$(ARCHSTR)/lib; \ $(INSTALL) lib/libxcb-xlib.so.0 $(PREFIX)/bin/.$(ARCHSTR)/lib/libxcb-xlib.so.0; \ fi install : $(PREFIX)/bin/.$(ARCHSTR) $(PREFIX)/bin/.$(ARCHSTR)/mtest $(PREFIX)/bin/megatest \ - $(PREFIX)/bin/.$(ARCHSTR)/dboard $(PREFIX)/bin/dashboard $(HELPERS) $(PREFIX)/bin/nbfake \ + $(PREFIX)/bin/.$(ARCHSTR)/dboard $(PREFIX)/bin/.$(ARCHSTR)/ndboard $(PREFIX)/bin/dashboard \ + $(HELPERS) $(PREFIX)/bin/nbfake \ $(PREFIX)/bin/.$(ARCHSTR)/mtexec $(PREFIX)/bin/mtexec $(PREFIX)/bin/serialize-env \ $(PREFIX)/bin/nbfind $(PREFIX)/bin/mtrunner $(PREFIX)/bin/viewscreen $(PREFIX)/bin/mt_xterm \ $(PREFIX)/bin/mt-old-to-new.sh $(PREFIX)/bin/mt-new-to-old.sh \ $(PREFIX)/share/docs/megatest_manual.html $(PREFIX)/bin/remrun \ $(PREFIX)/share/docs/megatest_manual.html $(PREFIX)/bin/remrun $(PREFIX)/bin/mtutil \ @@ -369,11 +269,10 @@ $(PREFIX)/bin/tcmt $(PREFIX)/share/db/mt-pg.sql \ $(PREFIX)/share/js/jquery-3.1.0.slim.min.js \ $(PREFIX)/bin/.$(ARCHSTR)/lib/libpangox-1.0.so \ $(PREFIX)/bin/.$(ARCHSTR)/lib/libpangox-1.0.so.0 \ $(PREFIX)/bin/.$(ARCHSTR)/lib/libxcb-xlib.so.0 - $(PREFIX)/bin/.$(ARCHSTR)/ndboard # $(PREFIX)/bin/newdashboard $(PREFIX)/bin/.$(ARCHSTR) : mkdir -p $(PREFIX)/bin/.$(ARCHSTR) Index: dashboard.scm ================================================================== --- dashboard.scm +++ dashboard.scm @@ -16,10 +16,28 @@ ;; You should have received a copy of the GNU General Public License ;; along with Megatest. If not, see . ;; ;;====================================================================== +(declare (uses common)) +(declare (uses margs)) +(declare (uses keys)) +(declare (uses items)) +(declare (uses db)) +(declare (uses configf)) +(declare (uses process)) +(declare (uses launch)) +(declare (uses runs)) +(declare (uses dashboard-tests)) +(declare (uses treemod)) +(declare (uses dcommon)) +(declare (uses dashboard-context-menu)) +(declare (uses vg)) +(declare (uses subrun)) +(declare (uses mt)) +(declare (uses dbfile)) + (use format) (require-library iup) (import (prefix iup iup:)) @@ -27,28 +45,11 @@ (import canvas-draw-iup) (use ducttape-lib) (use sqlite3 srfi-1 posix regex regex-case srfi-69 typed-records sparse-vectors) ;; defstruct (import (prefix sqlite3 sqlite3:)) (import dbfile) - -(declare (uses common)) -(declare (uses margs)) -(declare (uses keys)) -(declare (uses items)) -(declare (uses db)) -(declare (uses configf)) -(declare (uses process)) -(declare (uses launch)) -(declare (uses runs)) -(declare (uses dashboard-tests)) -(declare (uses tree)) -(declare (uses dcommon)) -(declare (uses dashboard-context-menu)) -(declare (uses vg)) -(declare (uses subrun)) -(declare (uses mt)) -(declare (uses dbfile)) +(import treemod) (include "common_records.scm") (include "db_records.scm") (include "run_records.scm") (include "task_records.scm") Index: newdashboard.scm ================================================================== --- newdashboard.scm +++ newdashboard.scm @@ -38,10 +38,11 @@ data-structures format (prefix iup iup:) canvas-draw canvas-draw-iup + matchable srfi-1 posix regex regex-case srfi-69 typed-records sparse-vectors ;; defstruct treemod (prefix mtargs args:) @@ -110,18 +111,31 @@ (iup:attribute-set! *tim* "TIME" 300) (iup:attribute-set! *tim* "RUN" "YES") ;; areas ;; + +(define *areas* (make-hash-table)) +(defstruct area + path + ) + (define (get-areas-file) (conc (get-environment-variable "HOME")"/.ndboard/areas.scm")) (define (get-areas) (let* ((areas-file (get-areas-file))) (if (file-exists? areas-file) (with-input-from-file areas-file read)))) +(define (register-area areadat) + (hash-table-set! *areas* (car areadat) + (make-area (cdr areadat)))) + +(define (get-area-info area-name) + (hash-table-ref/default *areas* area-name #f)) + ;; gui utils ;; (define (message-window msg) (iup:show (iup:dialog @@ -160,11 +174,19 @@ #:expand "YES" #:addexpanded "YES" #:size "10x" #:selection-cb (lambda (obj id state) - (print "do nothing...")))) + (let* ((path (tree:node->path obj id))) + (match path + ((treename)(print "nothing to do here")) + ((treename area) + + #f ;; read the megatest area targets and fill out the tree + )) + + (print "obj: "obj", id: "id", state: "state", path: "path))))) (define (runs window-id) (iup:hbox (add-widget "main-tree" (main-tree)) ;; @@ -173,11 +195,12 @@ (define (runs-init) (let* ((areas (get-areas)) (tb (get-widget "main-tree"))) (for-each (lambda (areadat) - (tree:add-node tb "Areas" `(,(car areadat)))) + (tree:add-node tb "Areas" `(,(car areadat))) + (register-area areadat)) areas))) ;; Browse and control a single run ;; (define (runcontrol window-id)