Index: Makefile ================================================================== --- Makefile +++ Makefile @@ -95,11 +95,11 @@ # MSRCFILES = ducttape-lib.scm pkts.scm stml2.scm cookie.scm mutils.scm \ # mtargs.scm commonmod.scm dbmod.scm adjutant.scm ulex.scm \ # rmtmod.scm apimod.scm GUISRCF = dashboard-context-menu.scm \ - dashboard-guimonitor.scm gutils.scm tree.scm + dashboard-guimonitor.scm tree.scm OFILES = $(SRCFILES:%.scm=%.o) GOFILES = $(GUISRCF:%.scm=%.o) MOFILES = $(addprefix mofiles/,$(MSRCFILES:%.scm=%.o)) @@ -474,14 +474,10 @@ fi if csi -ne '(import postgresql)'&> /dev/null;then \ echo "(import postgresql)(hash-table-set! *available-db* 'postgresql #t)" >> altdb.scm;\ fi -# portlogger-example : portlogger-example.scm api.o archive.o common.o configf.o dashboard-tests.o dashboard-context-menu.o db.o dcommon.o ezsteps.o genexample.o gutils.o items.o keys.o launch.o lock-queue.o margs.o mt.o ods.o portlogger.o process.o rmt.o runconfig.o runs.o server.o synchash.o tasks.o tdb.o tests.o tree.o -# csc $(CSCOPTS) portlogger-example.scm api.o archive.o common.o configf.o dashboard-tests.o dashboard-context-menu.o db.o dcommon.o ezsteps.o genexample.o gutils.o items.o keys.o launch.o lock-queue.o margs.o mt.o ods.o portlogger.o process.o rmt.o runconfig.o runs.o server.o sync-hash.o tasks.o tdb.o tests.o tree.o - -# IMPORTSTUBS = $(*import.scm:%.scm=%) unitdeps.dot : *mod.scm ./utils/plot-uses Makefile ./utils/plot-uses todot processmod.import,dbfile.import,dbmod.import,configfmod.import,mtmod.import,procesmod.import,commonmod.import,mtargs.import,mtargs,debugprint $$(ls *.scm|grep -v import) > unitdeps.dot # ./utils/plot-uses todot commonmod,portlogger,stml2,debugprint,mtargs apimod.scm commonmod.scm configfmod.scm dbmod.scm megatestmod.scm mtmod.scm processmod.scm rmtmod.scm servermod.scm tcp-transportmod.scm > uses.dot ; dot uses.dot -Tpdf -o uses.pdf Index: dashboard-context-menu.scm ================================================================== --- dashboard-context-menu.scm +++ dashboard-context-menu.scm @@ -17,40 +17,37 @@ ;; along with Megatest. If not, see . ;;====================================================================== (declare (unit dashboard-context-menu)) -;; (declare (uses common)) -(declare (uses commonmod)) -(declare (uses configfmod)) -(declare (uses gutils)) -(declare (uses rmtmod)) -(declare (uses ezsteps)) -;; (declare (uses sdb)) -;; (declare (uses filedb)) -(declare (uses subrun)) -(declare (uses testsmod)) -(declare (uses subrunmod)) -(declare (uses megatestmod)) - -(use format fmt) -(require-library iup) -(import (prefix iup iup:)) - -(use canvas-draw) - -(use srfi-1 posix regex regex-case srfi-69) -(use (prefix sqlite3 sqlite3:)) - -;; (include "common_records.scm") -;; (include "db_records.scm") -(include "run_records.scm") - -(import commonmod - configfmod - rmtmod - testsmod - subrunmod - debugprint - megatestmod - ) - +;; (declare (uses commonmod)) +;; (declare (uses configfmod)) +;; (declare (uses rmtmod)) +;; (declare (uses ezsteps)) +;; (declare (uses subrun)) +;; (declare (uses testsmod)) +;; (declare (uses subrunmod)) +;; (declare (uses megatestmod)) +;; +;; (use format fmt) +;; (require-library iup) +;; (import (prefix iup iup:)) +;; +;; (use canvas-draw) +;; +;; (use srfi-1 posix regex regex-case srfi-69) +;; (use (prefix sqlite3 sqlite3:)) +;; +;; ;; (include "common_records.scm") +;; ;; (include "db_records.scm") +;; ;; (include "run_records.scm") +;; +;; (import commonmod +;; configfmod +;; rmtmod +;; testsmod +;; subrunmod +;; debugprint +;; megatestmod +;; ) +;; +;; Index: dashboard-tests.scm ================================================================== --- dashboard-tests.scm +++ dashboard-tests.scm @@ -21,11 +21,10 @@ ;;====================================================================== ;; Test info panel ;;====================================================================== (declare (unit dashboard-tests)) -;; (declare (uses common)) (declare (uses commonmod)) (declare (uses configfmod)) (declare (uses debugprint)) (declare (uses rmtmod)) (declare (uses megatestmod)) @@ -33,11 +32,10 @@ (declare (uses dbfile)) (declare (uses tasksmod)) (declare (uses testsmod)) (declare (uses dcommon)) -(declare (uses gutils)) (declare (uses ezsteps)) (declare (uses subrun)) (declare (uses runsmod)) (declare (uses subrunmod)) @@ -66,8 +64,8 @@ subrunmod ) ;; (include "common_records.scm") ;; (include "db_records.scm") -(include "run_records.scm") +;; (include "run_records.scm") ) Index: dashboard.scm ================================================================== --- dashboard.scm +++ dashboard.scm @@ -76,11 +76,11 @@ (declare (uses runs)) (declare (uses dashboard-tests)) (declare (uses tree)) (declare (uses dcommon)) (declare (uses dashboard-context-menu)) -(declare (uses vg)) +(declare (uses vgmod)) (declare (uses subrun)) (declare (uses mt)) (use format) @@ -105,11 +105,11 @@ stml2 megatestmod tasksmod runsmod testsmod - vg + vgmod dcommon ) (include "common_records.scm") ;; (include "db_records.scm") Index: dcommon.scm ================================================================== --- dcommon.scm +++ dcommon.scm @@ -18,19 +18,17 @@ ;; ;;====================================================================== (declare (unit dcommon)) -(declare (uses gutils)) (declare (uses dbmod)) (declare (uses commonmod)) (declare (uses configfmod)) (declare (uses rmtmod)) (declare (uses testsmod)) (declare (uses mtargs)) (declare (uses vgmod)) -;; (declare (uses vgmod.import)) (declare (uses ezstepsmod)) (declare (uses rmtmod)) (declare (uses subrunmod)) (declare (uses megatestmod)) (declare (uses runsmod)) @@ -421,24 +419,24 @@ (col-name (conc target "/" runname)) (res (hash-table-ref/default runs-index col-name #f))) (if res res (if force-set - (let ((max-col-num (+ 1 (common:max (cons-1 (hash-table-values runs-index)))))) + (let ((max-col-num (+ 1 (common:max (cons -1 (hash-table-values runs-index)))))) (hash-table-set! runs-index col-name max-col-num) max-col-num))))) -(define (dcommon:runsdat-get-row-num dat testname itempath force-set) - (let* ((tests-index (dboard:runsdat-runs-index dat)) - (row-name (conc testname "/" itempath)) - (res (hash-table-ref/default runs-index row-name #f))) - (if res - res - (if force-set - (let ((max-row-num (+ 1 (common:max (cons -1 (hash-table-values tests-index)))))) - (hash-table-set! runs-index row-name max-row-num) - max-row-num))))) +;; (define (dcommon:runsdat-get-row-num dat testname itempath force-set) +;; (let* ((tests-index (dboard:runsdat-runs-index dat)) +;; (row-name (conc testname "/" itempath)) +;; (res (hash-table-ref/default runs-index row-name #f))) +;; (if res +;; res +;; (if force-set +;; (let ((max-row-num (+ 1 (common:max (cons -1 (hash-table-values tests-index)))))) +;; (hash-table-set! runs-index row-name max-row-num) +;; max-row-num))))) (define (dcommon:rundat-copy-tests-to-by-name rundat) (let ((src-ht (dboard:rundat-tests rundat)) (trg-ht (dboard:rundat-tests-by-name rundat))) (if (and (hash-table? src-ht)(hash-table? trg-ht)) @@ -785,11 +783,11 @@ )) (colnames (list "Id" "MTver" "Pid" "Host" "Interface:OutPort" "RunTime" "State" "RunId")) (updater (lambda () (if (dashboard:monitor-changed? commondat tabdat) (let ((servers (case (rmt:transport-mode) - ((http)(server:choose-server *toppath* 'all-valid)) ;; (server:get-list *toppath* limit: 10))) + ;; ((http)(server:choose-server *toppath* 'all-valid)) ;; (server:get-list *toppath* limit: 10))) (else '())))) (iup:attribute-set! servers-matrix "NUMLIN" (length servers)) ;; (set! colnum 0) ;; (for-each (lambda (colname) ;; ;; (print "colnum: " colnum " colname: " colname) @@ -1915,10 +1913,11 @@ (keys (rmt:get-keys)) ;; to be removed when targets handling is refactored (runs (make-sparse-vector)) ;; id => runrec (runsbynum (make-vector 100 #f)) ;; vector num => runrec (targ-runid (make-hash-table)) ;; area/target/runname => run-id ;; not sure this will be needed (tests (make-hash-table)) ;; test[/itempath] => list of test rec + (path-run-ids (make-hash-table)) ;; referenced but not set anywhere in new run viewer, maybe get rid of this whole attempt? ;; run sql filters (targ-sql-filt "%") (runname-sql-filt "%") (run-state-sql-filt "%") @@ -1991,21 +1990,21 @@ status ;; test status ) ;; default is to NOT set the cell if the column and row names are not pre-existing ;; -(define (dboard:runsdat-set-test-cell dat target runname testname itempath test-id state status #!key (force-set #f)) - (let* ((col-num (dcommon:runsdat-get-col-num dat target runname force-set)) - (row-num (dcommon:runsdat-get-row-num dat testname itempath force-set))) - (if (and row-num col-num) - (let ((tdat (make-dboard:testdat - id: test-id - state: state - status: status))) - (sparse-array-set! (dboard:runsdat-matrix-dat dat) col-num row-num tdat) - tdat) - #f))) +;; (define (dboard:runsdat-set-test-cell dat target runname testname itempath test-id state status #!key (force-set #f)) +;; (let* ((col-num (dcommon:runsdat-get-col-num dat target runname force-set)) +;; (row-num (dcommon:runsdat-get-row-num dat testname itempath force-set))) +;; (if (and row-num col-num) +;; (let ((tdat (make-dboard:testdat +;; id: test-id +;; state: state +;; status: status))) +;; (sparse-array-set! (dboard:runsdat-matrix-dat dat) col-num row-num tdat) +;; tdat) +;; #f))) (define *dashboard-mode* (string->symbol (or (configf:lookup *configdat* "dashboard" "mode") "dashboard"))) (define *exit-started* #f) DELETED gutils.scm Index: gutils.scm ================================================================== --- gutils.scm +++ /dev/null @@ -1,27 +0,0 @@ -';;====================================================================== -;; Copyright 2006-2012, Matthew Welland. -;; -;; This file is part of Megatest. -;; -;; Megatest is free software: you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; Megatest is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with Megatest. If not, see . -;; -;;====================================================================== - -(require-library iup) -(import (prefix iup iup:)) -(use canvas-draw) - -(use srfi-1 regex regex-case srfi-69) -(declare (unit gutils)) - Index: mtargs/mtargs.scm ================================================================== --- mtargs/mtargs.scm +++ mtargs/mtargs.scm @@ -24,10 +24,11 @@ get-arg-from get-args usage print-args any-defined? + remove-arg-from-ht ) (import scheme) ;; gives us cond-expand in chicken-4 (cond-expand Index: tree.scm ================================================================== --- tree.scm +++ tree.scm @@ -17,29 +17,30 @@ ;; along with Megatest. If not, see . ;; ;;====================================================================== (declare (unit tree)) -(declare (uses mtargs)) -(declare (uses debugprint)) -(declare (uses launch)) -(declare (uses gutils)) -(declare (uses server)) -(declare (uses dcommon)) - - -(use format) -(require-library iup) -(import (prefix iup iup:)) -(use canvas-draw) - -(use sqlite3 srfi-1 posix regex regex-case srfi-69) -(import (prefix sqlite3 sqlite3:)) - -(import (prefix mtargs args:) - debugprint) - -;; (include "megatest-version.scm") -;; (include "common_records.scm") -;; (include "db_records.scm") -;; (include "key_records.scm") - +;; (declare (uses mtargs)) +;; (declare (uses debugprint)) +;; (declare (uses launch)) +;; (declare (uses gutils)) +;; (declare (uses server)) +;; (declare (uses dcommon)) +;; +;; +;; (use format) +;; (require-library iup) +;; (import (prefix iup iup:)) +;; (use canvas-draw) +;; +;; (use sqlite3 srfi-1 posix regex regex-case srfi-69) +;; (import (prefix sqlite3 sqlite3:)) +;; +;; (import (prefix mtargs args:) +;; debugprint) +;; +;; ;; (include "megatest-version.scm") +;; ;; (include "common_records.scm") +;; ;; (include "db_records.scm") +;; ;; (include "key_records.scm") +;; +;;