Comment: | Bunch of cleanup. Ran pretty well, no worse than last commit and maybe bit better. Got as far as y/b/a and w/b/a |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | v1.80 |
Files: | files | file ages | folders |
SHA1: |
7bfbd680037e33b17f086ff9ff2c6ef3 |
User & Date: | matt on 2023-04-06 19:19:35 |
Other Links: | branch diff | manifest | tags |
2023-04-06
| ||
19:26 | Some cleanup and more added to plot units as graph (c1077 and 198ba). check-in: 2336d19a47 user: matt tags: v1.80 | |
19:19 | Bunch of cleanup. Ran pretty well, no worse than last commit and maybe bit better. Got as far as y/b/a and w/b/a check-in: 7bfbd68003 user: matt tags: v1.80 | |
16:37 | merge-fork check-in: c574c7b21b user: matt tags: v1.80 | |
Modified Makefile from [497ade23e7] to [519656cadd].
︙ | ︙ | |||
20 21 22 23 24 25 26 | SHELL=/bin/bash PREFIX=$(PWD) CSCOPTS= INSTALL=install SRCFILES = common.scm items.scm launch.scm ods.scm runconfig.scm \ server.scm configf.scm db.scm keys.scm margs.scm \ process.scm runs.scm tasks.scm tests.scm genexample.scm \ | | | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | SHELL=/bin/bash PREFIX=$(PWD) CSCOPTS= INSTALL=install SRCFILES = common.scm items.scm launch.scm ods.scm runconfig.scm \ server.scm configf.scm db.scm keys.scm margs.scm \ process.scm runs.scm tasks.scm tests.scm genexample.scm \ tdb.scm mt.scm \ ezsteps.scm lock-queue.scm rmt.scm api.scm \ subrun.scm archive.scm env.scm \ diff-report.scm cgisetup/models/pgdb.scm # module source files MSRCFILES = dbfile.scm debugprint.scm mtargs.scm commonmod.scm dbmod.scm \ tcp-transportmod.scm rmtmod.scm portlogger.scm |
︙ | ︙ | |||
121 122 123 124 125 126 127 | # include makefile.inc TCMTOBJS = \ api.o \ archive.o \ cgisetup/models/pgdb.o \ | < < | 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | # include makefile.inc TCMTOBJS = \ api.o \ archive.o \ cgisetup/models/pgdb.o \ common.o \ configf.o \ db.o \ env.o \ items.o \ keys.o \ launch.o \ lock-queue.o \ margs.o \ mt.o \ ods.o \ |
︙ | ︙ | |||
197 198 199 200 201 202 203 | mofiles-made : $(MOFILES) make $(MOIMPFILES) touch mofiles-made megatest.o : megatest-fossil-hash.scm megatest-version.scm $(MOFILES) $(MOIMPFILES) | | | 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | mofiles-made : $(MOFILES) make $(MOIMPFILES) touch mofiles-made megatest.o : megatest-fossil-hash.scm megatest-version.scm $(MOFILES) $(MOIMPFILES) rmt.scm common.scm configf.scm dashboard-guimonitor.scm dashboard-tests.scm dashboard.scm db.scm dcommon.scm ezsteps.scm index-tree.scm items.scm keys.scm launch.scm megatest.scm monitor.scm mt.scm newdashboard.scm runconfig.scm runs.scm server.scm tdb.scm tests.scm tree.scm : common_records.scm megatest-version.scm common_records.scm : altdb.scm mofiles/dbfile.o : mofiles/commonmod.o # mofiles/stml2.o : mofiles/cookie.o # configf.o : mofiles/commonmod.o |
︙ | ︙ | |||
500 501 502 503 504 505 506 | if csi -ne '(import mysql-client)'&> /dev/null;then \ echo "(import mysql-client)(hash-table-set! *available-db* 'mysql #t)" >> altdb.scm; \ fi if csi -ne '(import postgresql)'&> /dev/null;then \ echo "(import postgresql)(hash-table-set! *available-db* 'postgresql #t)" >> altdb.scm;\ fi | | | | 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 | if csi -ne '(import mysql-client)'&> /dev/null;then \ echo "(import mysql-client)(hash-table-set! *available-db* 'mysql #t)" >> altdb.scm; \ 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 synchash.o tasks.o tdb.o tests.o tree.o # create a pdf dot graphviz diagram from notations in rmt.scm rmt.pdf : rmt.scm grep ';;DOT' rmt.scm | sed -e 's/.*;;DOT //' > rmt.dot;dot -Tpdf rmt.dot -o rmt.pdf buildmanual: cd docs/manual && make |
︙ | ︙ |
Modified api.scm from [ff600f6f10] to [9b08184ae6].
︙ | ︙ | |||
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | (declare (unit api)) (declare (uses rmt)) (declare (uses db)) (declare (uses debugprint)) (declare (uses dbmod)) (declare (uses dbfile)) (declare (uses tasks)) (declare (uses tcp-transportmod)) (import dbmod) (import dbfile) (import debugprint) (import tcp-transportmod) (use srfi-69 posix matchable s11n) | > > | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | (declare (unit api)) (declare (uses rmt)) (declare (uses db)) (declare (uses debugprint)) (declare (uses dbmod)) (declare (uses dbfile)) (declare (uses tasks)) (declare (uses rmtmod)) (declare (uses tcp-transportmod)) (import dbmod) (import dbfile) (import debugprint) (import rmtmod) (import tcp-transportmod) (use srfi-69 posix matchable s11n) |
︙ | ︙ |
Modified archive.scm from [d5e209de94] to [e07377cf5e].
︙ | ︙ | |||
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | (declare (unit archive)) (declare (uses db)) (declare (uses debugprint)) (declare (uses mtargs)) (declare (uses common)) (declare (uses commonmod)) (use (prefix sqlite3 sqlite3:) srfi-1 posix regex regex-case srfi-69 format md5 message-digest srfi-18) (import commonmod debugprint (prefix mtargs args:)) (include "common_records.scm") (include "db_records.scm") ;;====================================================================== ;; | > > | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | (declare (unit archive)) (declare (uses db)) (declare (uses debugprint)) (declare (uses mtargs)) (declare (uses common)) (declare (uses commonmod)) (declare (uses rmtmod)) (use (prefix sqlite3 sqlite3:) srfi-1 posix regex regex-case srfi-69 format md5 message-digest srfi-18) (import commonmod debugprint rmtmod (prefix mtargs args:)) (include "common_records.scm") (include "db_records.scm") ;;====================================================================== ;; |
︙ | ︙ |
Renamed and modified client.scm [091f168690] to attic/client.scm [f0a5f3a990].
︙ | ︙ | |||
40 41 42 43 44 45 46 | ) (import client) (include "common_records.scm") (include "db_records.scm") | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 40 41 42 43 44 45 46 | ) (import client) (include "common_records.scm") (include "db_records.scm") |
Renamed and modified http-transport.scm [8c4ecd6362] to attic/http-transport.scm [235baaba81].
︙ | ︙ | |||
27 28 29 30 31 32 33 | ;; (declare (uses daemon)) (declare (uses portlogger)) (declare (uses rmt)) (declare (uses dbfile)) (declare (uses commonmod)) (declare (uses mtargs)) | | | | > > | > > > > | | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | ;; (declare (uses daemon)) (declare (uses portlogger)) (declare (uses rmt)) (declare (uses dbfile)) (declare (uses commonmod)) (declare (uses mtargs)) (module http-transport * (import srfi-1 posix regex regex-case srfi-69 hostinfo md5 message-digest posix-extras spiffy uri-common intarweb http-client spiffy-request-vars intarweb spiffy-directory-listing (srfi 18) extras tcp s11n) (import scheme chicken (prefix mtargs args:) debugprint) ;; Configurations for server (tcp-buffer-size 2048) (max-connections 2048) (include "common_records.scm") |
︙ | ︙ | |||
695 696 697 698 699 700 701 | (conc "<table>" (string-intersperse (map (lambda (stat) (conc "<tr><td>" (car stat) "</td><td>" (cadr stat) "</td></tr>")) stats) " ") "</table>"))) | > | 701 702 703 704 705 706 707 708 | (conc "<table>" (string-intersperse (map (lambda (stat) (conc "<tr><td>" (car stat) "</td><td>" (cadr stat) "</td></tr>")) stats) " ") "</table>"))) ) |
Modified common.scm from [758312d94b] to [dad201907b].
︙ | ︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | ;; You should have received a copy of the GNU General Public License ;; along with Megatest. If not, see <http://www.gnu.org/licenses/>. ;;====================================================================== (declare (unit common)) (declare (uses commonmod)) (declare (uses debugprint)) (declare (uses mtargs)) (use srfi-1 data-structures posix regex-case (prefix base64 base64:) format dot-locking csv-xml z3 udp ;; sql-de-lite hostinfo md5 message-digest typed-records directory-utils stack matchable regex posix (srfi 18) extras ;; tcp (prefix nanomsg nmsg:) (prefix sqlite3 sqlite3:) pkts (prefix dbi dbi:) ) (use posix-extras pathname-expand files) (import commonmod debugprint (prefix mtargs args:)) (include "common_records.scm") ;; (require-library margs) ;; (include "margs.scm") | > > | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | ;; You should have received a copy of the GNU General Public License ;; along with Megatest. If not, see <http://www.gnu.org/licenses/>. ;;====================================================================== (declare (unit common)) (declare (uses commonmod)) (declare (uses rmtmod)) (declare (uses debugprint)) (declare (uses mtargs)) (use srfi-1 data-structures posix regex-case (prefix base64 base64:) format dot-locking csv-xml z3 udp ;; sql-de-lite hostinfo md5 message-digest typed-records directory-utils stack matchable regex posix (srfi 18) extras ;; tcp (prefix nanomsg nmsg:) (prefix sqlite3 sqlite3:) pkts (prefix dbi dbi:) ) (use posix-extras pathname-expand files) (import commonmod debugprint rmtmod (prefix mtargs args:)) (include "common_records.scm") ;; (require-library margs) ;; (include "margs.scm") |
︙ | ︙ | |||
172 173 174 175 176 177 178 | ;; (define *db-access-mutex* (make-mutex)) ;; moved to dbfile ;; (define *db-transaction-mutex* (make-mutex)) (define *db-cache-path* #f) ;; (define *db-with-db-mutex* (make-mutex)) (define *db-api-call-time* (make-hash-table)) ;; hash of command => (list of times) ;; SERVER | < | 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | ;; (define *db-access-mutex* (make-mutex)) ;; moved to dbfile ;; (define *db-transaction-mutex* (make-mutex)) (define *db-cache-path* #f) ;; (define *db-with-db-mutex* (make-mutex)) (define *db-api-call-time* (make-hash-table)) ;; hash of command => (list of times) ;; SERVER (define *transport-type* 'http) ;; override with [server] transport http|rpc|nmsg (define *runremote* #f) ;; if set up for server communication this will hold <host port> ;; (define *max-cache-size* 0) (define *logged-in-clients* (make-hash-table)) (define *server-id* #f) (define *server-info* #f) ;; good candidate for easily convert to non-global (define *time-to-exit* #f) |
︙ | ︙ |
Modified commonmod.scm from [e30eedddba] to [bbd943f11f].
︙ | ︙ | |||
109 110 111 112 113 114 115 116 117 118 119 120 121 122 | (currtime (current-seconds))) (if (> (- currtime lasttime) waitval) (begin (hash-table-set! *common:denoise* key currtime) #t) #f))) ;;====================================================================== ;; config file utils ;;====================================================================== (define (lookup cfgdat section var) (if (hash-table? cfgdat) (let ((sectdat (hash-table-ref/default cfgdat section '()))) | > > > > > > > > > > > > | 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | (currtime (current-seconds))) (if (> (- currtime lasttime) waitval) (begin (hash-table-set! *common:denoise* key currtime) #t) #f))) ;; KEEP THIS ONE ;; ;; client:get-signature (define *my-client-signature* #f) (define (client:get-signature) (if *my-client-signature* *my-client-signature* (let ((sig (conc (get-host-name) " " (current-process-id)))) (set! *my-client-signature* sig) *my-client-signature*))) ;;====================================================================== ;; config file utils ;;====================================================================== (define (lookup cfgdat section var) (if (hash-table? cfgdat) (let ((sectdat (hash-table-ref/default cfgdat section '()))) |
︙ | ︙ |
Modified dashboard-context-menu.scm from [7b1d8c53c1] to [8f34d70b32].
︙ | ︙ | |||
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | (declare (unit dashboard-context-menu)) (declare (uses common)) (declare (uses commonmod)) (declare (uses db)) (declare (uses gutils)) (declare (uses rmt)) (declare (uses ezsteps)) ;; (declare (uses sdb)) ;; (declare (uses filedb)) (declare (uses subrun)) (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 debugprint) (define (dboard:launch-testpanel run-id test-id) (let* ((dboardexe (common:find-local-megatest "dashboard")) (cmd (conc dboardexe " -test " run-id "," test-id " &"))) | > > | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | (declare (unit dashboard-context-menu)) (declare (uses common)) (declare (uses commonmod)) (declare (uses db)) (declare (uses gutils)) (declare (uses rmt)) (declare (uses rmtmod)) (declare (uses ezsteps)) ;; (declare (uses sdb)) ;; (declare (uses filedb)) (declare (uses subrun)) (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 rmtmod debugprint) (define (dboard:launch-testpanel run-id test-id) (let* ((dboardexe (common:find-local-megatest "dashboard")) (cmd (conc dboardexe " -test " run-id "," test-id " &"))) |
︙ | ︙ |
Modified dashboard-tests.scm from [5b3bc1a5e0] to [d3d14d0eb8].
︙ | ︙ | |||
25 26 27 28 29 30 31 | (declare (unit dashboard-tests)) (declare (uses common)) (declare (uses commonmod)) (declare (uses db)) (declare (uses gutils)) (declare (uses rmt)) (declare (uses ezsteps)) | | < | | > | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | (declare (unit dashboard-tests)) (declare (uses common)) (declare (uses commonmod)) (declare (uses db)) (declare (uses gutils)) (declare (uses rmt)) (declare (uses ezsteps)) (declare (uses subrun)) (declare (uses debugprint)) (declare (uses rmtmod)) (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:)) (import commonmod rmtmod debugprint) (include "common_records.scm") (include "db_records.scm") (include "run_records.scm") ;;====================================================================== |
︙ | ︙ |
Modified dashboard.scm from [c3567cb885] to [b98c976a8a].
︙ | ︙ | |||
33 34 35 36 37 38 39 | (declare (uses tree)) (declare (uses dcommon)) (declare (uses dashboard-context-menu)) (declare (uses vg)) (declare (uses subrun)) (declare (uses mt)) (declare (uses dbmod)) | | > | 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | (declare (uses tree)) (declare (uses dcommon)) (declare (uses dashboard-context-menu)) (declare (uses vg)) (declare (uses subrun)) (declare (uses mt)) (declare (uses dbmod)) (declare (uses rmtmod)) (declare (uses dbfile)) (declare (uses commonmod)) (declare (uses commonmod.import)) (use format) (require-library iup) (import (prefix iup iup:)) (use canvas-draw) (import canvas-draw-iup (prefix sqlite3 sqlite3:)) (use ducttape-lib) (use sqlite3 srfi-1 posix regex regex-case srfi-69 typed-records sparse-vectors) ;; defstruct (import commonmod (prefix mtargs args:) dbmod dbfile rmtmod debugprint) (include "common_records.scm") (include "db_records.scm") (include "run_records.scm") (include "task_records.scm") (include "megatest-version.scm") |
︙ | ︙ |
Modified db.scm from [7419185287] to [144c7b38b3].
︙ | ︙ | |||
27 28 29 30 31 32 33 | (declare (unit db)) (declare (uses common)) (declare (uses debugprint)) (declare (uses dbmod)) (declare (uses dbfile)) (declare (uses keys)) (declare (uses ods)) | < > | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | (declare (unit db)) (declare (uses common)) (declare (uses debugprint)) (declare (uses dbmod)) (declare (uses dbfile)) (declare (uses keys)) (declare (uses ods)) (declare (uses mt)) (declare (uses commonmod)) (declare (uses mtargs)) (declare (uses rmtmod)) (import commonmod (prefix mtargs args:)) (use (srfi 18) extras tcp |
︙ | ︙ | |||
68 69 70 71 72 73 74 75 76 77 78 79 80 81 | (define *number-of-writes* 0) (define *number-non-write-queries* 0) (import debugprint) (import dbmod) (import dbfile) ;; record for keeping state,status and count for doing roll-ups in ;; iterated tests ;; (defstruct dbr:counts (state #f) (status #f) | > | 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | (define *number-of-writes* 0) (define *number-non-write-queries* 0) (import debugprint) (import dbmod) (import dbfile) (import rmtmod) ;; record for keeping state,status and count for doing roll-ups in ;; iterated tests ;; (defstruct dbr:counts (state #f) (status #f) |
︙ | ︙ |
Modified dbfile.scm from [fea599cbbf] to [133c3d1663].
︙ | ︙ | |||
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | ;; 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 <http://www.gnu.org/licenses/>. ;;====================================================================== (declare (unit dbfile)) (declare (uses debugprint)) (declare (uses commonmod)) (module dbfile * (import scheme chicken data-structures extras | > > | | | > > > | | | | | | | | | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | ;; 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 <http://www.gnu.org/licenses/>. ;;====================================================================== (use srfi-18) (declare (unit dbfile)) (declare (uses debugprint)) (declare (uses commonmod)) (module dbfile * (import scheme chicken data-structures extras matchable (prefix sqlite3 sqlite3:) posix typed-records srfi-18 srfi-1 srfi-69 stack files ports commonmod debugprint ) ;; parameters ;; (define dbfile:testsuite-name (make-parameter #f)) (define keep-age-param (make-parameter 10)) ;; qif file age, if over move to attic (define num-run-dbs (make-parameter 10)) ;; number of db's in .mtdb |
︙ | ︙ | |||
1075 1076 1077 1078 1079 1080 1081 | ;;====================================================================== ;; call with dbinit=db:initialize-main-db ;; (define (db:open-db dbstruct run-id dbinit) ;; (mutex-lock! *db-open-mutex*) (let* ((dbdat (dbfile:open-db dbstruct run-id dbinit))) | < < < < | 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 | ;;====================================================================== ;; call with dbinit=db:initialize-main-db ;; (define (db:open-db dbstruct run-id dbinit) ;; (mutex-lock! *db-open-mutex*) (let* ((dbdat (dbfile:open-db dbstruct run-id dbinit))) (set! *db-write-access* (not (dbr:dbdat-read-only dbdat))) ;; (mutex-unlock! *db-open-mutex*) dbdat)) (define dbfile:db-init-proc (make-parameter #f)) ;; in xmaxima this gives a curve close to what I want: |
︙ | ︙ |
Modified dcommon.scm from [95103187aa] to [a11732c8dd].
︙ | ︙ | |||
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | ;;====================================================================== (declare (unit dcommon)) (declare (uses gutils)) (declare (uses db)) (declare (uses commonmod)) (use format) (require-library iup) (import (prefix iup iup:)) (use canvas-draw) (import canvas-draw-iup) (use regex typed-records matchable) (import commonmod debugprint) ;; (declare (uses synchash)) (include "megatest-version.scm") (include "common_records.scm") (include "db_records.scm") (include "key_records.scm") | > > | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | ;;====================================================================== (declare (unit dcommon)) (declare (uses gutils)) (declare (uses db)) (declare (uses commonmod)) (declare (uses rmtmod)) (use format) (require-library iup) (import (prefix iup iup:)) (use canvas-draw) (import canvas-draw-iup) (use regex typed-records matchable) (import commonmod rmtmod debugprint) ;; (declare (uses synchash)) (include "megatest-version.scm") (include "common_records.scm") (include "db_records.scm") (include "key_records.scm") |
︙ | ︙ |
Modified diff-report.scm from [e0510f4e99] to [ce1fe2b5f1].
︙ | ︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | ;; along with Megatest. If not, see <http://www.gnu.org/licenses/>. ;; (declare (unit diff-report)) (declare (uses common)) (declare (uses debugprint)) (declare (uses rmt)) (declare (uses commonmod)) (import commonmod debugprint) (include "common_records.scm") (use matchable) (use fmt) (use ducttape-lib) (define css "") | > > | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | ;; along with Megatest. If not, see <http://www.gnu.org/licenses/>. ;; (declare (unit diff-report)) (declare (uses common)) (declare (uses debugprint)) (declare (uses rmt)) (declare (uses rmtmod)) (declare (uses commonmod)) (import commonmod rmtmod debugprint) (include "common_records.scm") (use matchable) (use fmt) (use ducttape-lib) (define css "") |
︙ | ︙ |
Modified ezsteps.scm from [f2352857f1] to [00800cd5a5].
︙ | ︙ | |||
21 22 23 24 25 26 27 | (declare (unit ezsteps)) (declare (uses db)) (declare (uses common)) (declare (uses debugprint)) (declare (uses items)) (declare (uses runconfig)) | | < | > | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | (declare (unit ezsteps)) (declare (uses db)) (declare (uses common)) (declare (uses debugprint)) (declare (uses items)) (declare (uses runconfig)) (declare (uses commonmod)) (declare (uses rmtmod)) (declare (uses mtargs)) (use srfi-1 posix regex srfi-69 directory-utils call-with-environment-variables posix-extras z3 csv typed-records pathname-expand matchable) (import commonmod debugprint rmtmod (prefix mtargs args:)) (include "common_records.scm") (include "key_records.scm") (include "db_records.scm") (include "run_records.scm") |
︙ | ︙ |
Modified genexample.scm from [9396be098b] to [1c75f5d6f9].
︙ | ︙ | |||
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | ;; along with Megatest. If not, see <http://www.gnu.org/licenses/>. ;;====================================================================== (declare (unit genexample)) (declare (uses mtargs)) (declare (uses debugprint)) (use posix regex matchable) (import (prefix mtargs args:) debugprint) (include "db_records.scm") (define genexample:example-logpro #<<EOF ;; You should have at least one expect:required. This ensures that your process ran | > > | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | ;; along with Megatest. If not, see <http://www.gnu.org/licenses/>. ;;====================================================================== (declare (unit genexample)) (declare (uses mtargs)) (declare (uses debugprint)) (declare (uses rmtmod)) (use posix regex matchable) (import (prefix mtargs args:) rmtmod debugprint) (include "db_records.scm") (define genexample:example-logpro #<<EOF ;; You should have at least one expect:required. This ensures that your process ran |
︙ | ︙ |
Modified launch.scm from [c6034a07ae] to [b617c96ace].
︙ | ︙ | |||
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | (declare (unit launch)) (declare (uses subrun)) (declare (uses common)) (declare (uses debugprint)) (declare (uses commonmod)) (declare (uses configf)) (declare (uses db)) (declare (uses ezsteps)) (declare (uses dbfile)) (declare (uses mtargs)) (use regex regex-case base64 sqlite3 srfi-18 directory-utils posix-extras z3 call-with-environment-variables csv) (use typed-records pathname-expand matchable) (import (prefix base64 base64:) (prefix sqlite3 sqlite3:) (prefix mtargs args:) debugprint) (include "common_records.scm") (include "key_records.scm") (include "db_records.scm") (include "megatest-fossil-hash.scm") | > > | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | (declare (unit launch)) (declare (uses subrun)) (declare (uses common)) (declare (uses debugprint)) (declare (uses commonmod)) (declare (uses configf)) (declare (uses db)) (declare (uses rmtmod)) (declare (uses ezsteps)) (declare (uses dbfile)) (declare (uses mtargs)) (use regex regex-case base64 sqlite3 srfi-18 directory-utils posix-extras z3 call-with-environment-variables csv) (use typed-records pathname-expand matchable) (import (prefix base64 base64:) (prefix sqlite3 sqlite3:) (prefix mtargs args:) rmtmod debugprint) (include "common_records.scm") (include "key_records.scm") (include "db_records.scm") (include "megatest-fossil-hash.scm") |
︙ | ︙ |
Modified megatest.scm from [46ccc9ab0a] to [1aad76e09c].
︙ | ︙ | |||
32 33 34 35 36 37 38 | (declare (uses mtargs)) (declare (uses mtargs.import)) (declare (uses debugprint)) (declare (uses debugprint.import)) (declare (uses runs)) (declare (uses launch)) (declare (uses server)) | < | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | (declare (uses mtargs)) (declare (uses mtargs.import)) (declare (uses debugprint)) (declare (uses debugprint.import)) (declare (uses runs)) (declare (uses launch)) (declare (uses server)) (declare (uses tests)) (declare (uses genexample)) ;; (declare (uses daemon)) (declare (uses db)) ;; (declare (uses dcommon)) |
︙ | ︙ | |||
898 899 900 901 902 903 904 | (if out-file (close-output-port out-port)) (exit) ;; yes, bending the rules here - need to exit since this is a utility )) (if (args:get-arg "-ping") (let* ((server-id (string->number (args:get-arg "-ping"))) ;; extract run-id (i.e. no ":" (host:port (args:get-arg "-ping"))) | > > | | 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 | (if out-file (close-output-port out-port)) (exit) ;; yes, bending the rules here - need to exit since this is a utility )) (if (args:get-arg "-ping") (let* ((server-id (string->number (args:get-arg "-ping"))) ;; extract run-id (i.e. no ":" (host:port (args:get-arg "-ping"))) (debug:print 0 *default-log-port* "NOT YET REIMPLEMENTED FOR TCP/INMEM") ;; bug (exit))) ;; (server:ping (or server-id host:port) #f do-exit: #t))) ;;====================================================================== ;; Capture, save and manipulate environments ;;====================================================================== ;; NOTE: Keep these above the section where the server or client code is setup |
︙ | ︙ | |||
954 955 956 957 958 959 960 | ;; (if (args:get-arg "-server") (let* (;; (run-id (args:get-arg "-run-id")) (dbfname (args:get-arg "-db")) (tl (launch:setup)) (keys (keys:config-get-fields *configdat*))) (case (rmt:transport-mode) | < | 955 956 957 958 959 960 961 962 963 964 965 966 967 968 | ;; (if (args:get-arg "-server") (let* (;; (run-id (args:get-arg "-run-id")) (dbfname (args:get-arg "-db")) (tl (launch:setup)) (keys (keys:config-get-fields *configdat*))) (case (rmt:transport-mode) ((tcp) (let* ((timeout (server:expiration-timeout))) (debug:print 0 *default-log-port* "INFO: Running using tcp method with server timeout of "timeout) (tt-server-timeout-param timeout) (if dbfname (tt:start-server tl #f dbfname api:tcp-dispatch-request-make-handler keys) (begin |
︙ | ︙ | |||
978 979 980 981 982 983 984 985 986 987 988 989 990 991 | (begin (adjutant-run) (set! *didsomething* #t))) (if (or (args:get-arg "-list-servers") (args:get-arg "-kill-servers")) (let ((tl (launch:setup))) (if tl ;; all roads from here exit (let* ((servers (server:choose-server *toppath* 'all-valid)) ;; (server:get-list *toppath*)) (fmtstr "~33a~22a~20a~20a~8a\n")) (if (not servers) (begin (debug:print-info 1 *default-log-port* "No servers found") (exit) | > > | 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 | (begin (adjutant-run) (set! *didsomething* #t))) (if (or (args:get-arg "-list-servers") (args:get-arg "-kill-servers")) (let ((tl (launch:setup))) (debug:print 0 *default-log-port* "NOT YET REIMPLEMENTED FOR TCP/INMEM") ;; BUG (exit) (if tl ;; all roads from here exit (let* ((servers (server:choose-server *toppath* 'all-valid)) ;; (server:get-list *toppath*)) (fmtstr "~33a~22a~20a~20a~8a\n")) (if (not servers) (begin (debug:print-info 1 *default-log-port* "No servers found") (exit) |
︙ | ︙ | |||
2217 2218 2219 2220 2221 2222 2223 | (begin (debug:print 0 *default-log-port* "Failed to setup, exiting") (exit 1))) (if (args:get-arg "-runstep")(debug:print-info 1 *default-log-port* "Running -runstep, first change to directory " work-area)) (change-directory work-area) ;; can setup as client for server mode now | < | 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 | (begin (debug:print 0 *default-log-port* "Failed to setup, exiting") (exit 1))) (if (args:get-arg "-runstep")(debug:print-info 1 *default-log-port* "Running -runstep, first change to directory " work-area)) (change-directory work-area) ;; can setup as client for server mode now (if (args:get-arg "-load-test-data") ;; has sub commands that are rdb: ;; DO NOT put this one into either rmt: or open-run-close (tdb:load-test-data run-id test-id)) (if (args:get-arg "-setlog") (let ((logfname (args:get-arg "-setlog"))) |
︙ | ︙ | |||
2533 2534 2535 2536 2537 2538 2539 | (if (args:get-arg "-import-sexpr") (begin (launch:setup) (rmt:import-sexpr (args:get-arg "-import-sexpr")) (set! *didsomething* #t))) | < < < < < | 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 | (if (args:get-arg "-import-sexpr") (begin (launch:setup) (rmt:import-sexpr (args:get-arg "-import-sexpr")) (set! *didsomething* #t))) (if (args:get-arg "-sync-to-megatest.db") (let* ((duh (launch:setup)) (dbstruct (db:setup #t)) (tmpdbpth (dbr:dbstruct-tmppath dbstruct)) (lockfile (conc tmpdbpth ".lock")) (locked (common:simple-file-lock lockfile)) (res (if locked |
︙ | ︙ |
Modified mt.scm from [86c22fd19d] to [9ff41cb92d].
︙ | ︙ | |||
26 27 28 29 30 31 32 | (declare (uses common)) (declare (uses items)) (declare (uses runconfig)) (declare (uses tests)) (declare (uses server)) (declare (uses runs)) (declare (uses rmt)) | | | > | 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | (declare (uses common)) (declare (uses items)) (declare (uses runconfig)) (declare (uses tests)) (declare (uses server)) (declare (uses runs)) (declare (uses rmt)) (declare (uses rmtmod)) (import debugprint rmtmod) (include "common_records.scm") (include "key_records.scm") (include "db_records.scm") (include "run_records.scm") (include "test_records.scm") |
︙ | ︙ |
Modified rmt.scm from [7b6e5d850e] to [7c73e45fa8].
︙ | ︙ | |||
19 20 21 22 23 24 25 | ;;====================================================================== (use format typed-records) ;; RADT => purpose of json format?? (declare (unit rmt)) (declare (uses debugprint)) (declare (uses api)) | < < | < < < < < < < < < < < < < < | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | ;;====================================================================== (use format typed-records) ;; RADT => purpose of json format?? (declare (unit rmt)) (declare (uses debugprint)) (declare (uses api)) (declare (uses commonmod)) (declare (uses dbfile)) (declare (uses dbmod)) (declare (uses tcp-transportmod)) (include "common_records.scm") (declare (uses rmtmod)) ;; used by http-transport (import dbfile rmtmod commonmod debugprint ;; dbmemmod dbfile dbmod tcp-transportmod) ;; http - use the old http + in /tmp db ;; tcp - use tcp transport with inmem db ;; nfs - use direct to disk access (read-only) ;; (define rmt:transport-mode (make-parameter 'tcp)) ;; ;; THESE ARE ALL CALLED ON THE CLIENT SIDE!!! ;; ;; generate entries for ~/.megatestrc with the following ;; ;; grep define ../rmt.scm | grep rmt: |perl -pi -e 's/\(define\s+\((\S+)\W.*$/\1/'|sort -u ;;====================================================================== ;; S U P P O R T F U N C T I O N S ;;====================================================================== (define (rmt:on-homehost? runremote) (let* ((hh-dat (remote-hh-dat runremote))) (if (pair? hh-dat) (cdr hh-dat) (begin (debug:print-info 0 *default-log-port* "hh-dat="hh-dat) #f)))) |
︙ | ︙ | |||
147 148 149 150 151 152 153 | (if (not runremote) (let* ((newremote (make-and-init-remote areapath))) (set! *runremote* newremote) (set! runremote newremote))) (let* ((dbfname (conc (dbfile:run-id->dbnum run-id)".db"))) ;;(dbfile:run-id->path areapath run-id))) (tt:handler runremote cmd run-id params attemptnum area-dat areapath readonly-mode dbfname testsuite mtexe))) | < < < | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | (if (not runremote) (let* ((newremote (make-and-init-remote areapath))) (set! *runremote* newremote) (set! runremote newremote))) (let* ((dbfname (conc (dbfile:run-id->dbnum run-id)".db"))) ;;(dbfile:run-id->path areapath run-id))) (tt:handler runremote cmd run-id params attemptnum area-dat areapath readonly-mode dbfname testsuite mtexe))) (define (rmt:print-db-stats) (let ((fmtstr "~40a~7-d~9-d~20,2-f")) ;; "~20,2-f" (debug:print 18 *default-log-port* "DB Stats\n========") (debug:print 18 *default-log-port* (format #f "~40a~8a~10a~10a" "Cmd" "Count" "TotTime" "Avg")) (for-each (lambda (cmd) (let ((cmd-dat (hash-table-ref *db-stats* cmd))) |
︙ | ︙ | |||
396 397 398 399 400 401 402 | (if qry-is-write (let ((start-time (current-seconds))) (mutex-lock! *db-multi-sync-mutex*) / (set! *db-last-access* start-time) ;; THIS IS PROBABLY USELESS? (we are on a client) (mutex-unlock! *db-multi-sync-mutex*))))) res)) | < < < < < < < | 213 214 215 216 217 218 219 220 221 222 223 224 225 226 | (if qry-is-write (let ((start-time (current-seconds))) (mutex-lock! *db-multi-sync-mutex*) / (set! *db-last-access* start-time) ;; THIS IS PROBABLY USELESS? (we are on a client) (mutex-unlock! *db-multi-sync-mutex*))))) res)) ;;====================================================================== ;; ;; A C T U A L A P I C A L L S ;; ;;====================================================================== ;;====================================================================== |
︙ | ︙ | |||
429 430 431 432 433 434 435 | (define (rmt:login run-id) (rmt:send-receive 'login run-id (list *toppath* megatest-version (client:get-signature)))) ;; This login does no retries under the hood - it acts a bit like a ping. ;; Deprecated for nmsg-transport. ;; | | | < < < < < < | 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 | (define (rmt:login run-id) (rmt:send-receive 'login run-id (list *toppath* megatest-version (client:get-signature)))) ;; This login does no retries under the hood - it acts a bit like a ping. ;; Deprecated for nmsg-transport. ;; ;; (define (rmt:login-no-auto-client-setup runremote) ;; (rmt:send-receive-no-auto-client-setup runremote 'login 0 (list *toppath* megatest-version (client:get-signature)))) ;; given a hostname, return a pair of cpu load and update time representing latest intelligence from tests running on that host (define (rmt:get-latest-host-load hostname) (rmt:send-receive 'get-latest-host-load 0 (list hostname))) (define (rmt:sdb-qry qry val run-id) |
︙ | ︙ | |||
1032 1033 1034 1035 1036 1037 1038 | (if runremote (begin (tt-ro-mode-set! runremote ro-mode) (tt-ro-mode-checked-set! runremote #t) ro-mode) ro-mode)))))) | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 836 837 838 839 840 841 842 | (if runremote (begin (tt-ro-mode-set! runremote ro-mode) (tt-ro-mode-checked-set! runremote #t) ro-mode) ro-mode)))))) |
Modified rmtmod.scm from [7e567e8daa] to [5ddda54a47].
︙ | ︙ | |||
41 42 43 44 45 46 47 48 49 50 51 52 53 54 | (defstruct alldat (areapath #f) (ulexdat #f) ) ;; hold the send-receive proc in this parameter (define rmtmod:send-receive #f) ;; (make-parameter #f)) ;;====================================================================== ;; import an sexpr file into the db ;;====================================================================== (define (rmt:import-sexpr sexpr-file) (if (file-exists? sexpr-file) | > > > > > > > > > > > > | 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | (defstruct alldat (areapath #f) (ulexdat #f) ) ;; hold the send-receive proc in this parameter (define rmtmod:send-receive #f) ;; (make-parameter #f)) ;;====================================================================== ;; M I S C ;;====================================================================== ;; hand off a call to one of the db:queries statements ;; added run-id to make looking up the correct db possible ;; (define (rmt:general-call stmtname run-id . params) (rmtmod:send-receive 'general-call run-id (append (list stmtname run-id) params))) ;;====================================================================== ;; import an sexpr file into the db ;;====================================================================== (define (rmt:import-sexpr sexpr-file) (if (file-exists? sexpr-file) |
︙ | ︙ | |||
95 96 97 98 99 100 101 | (define (rmt:insert-test run-id test-rec) (let* ((testname (alist-ref "testname" test-rec equal?)) (item-path (alist-ref "item_path" test-rec equal?))) (debug:print 0 *default-log-port* " Insert test in run "run-id": "testname"/"item-path) (rmtmod:send-receive 'insert-test run-id test-rec))) | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | < < < < | 107 108 109 110 111 112 113 114 115 116 | (define (rmt:insert-test run-id test-rec) (let* ((testname (alist-ref "testname" test-rec equal?)) (item-path (alist-ref "item_path" test-rec equal?))) (debug:print 0 *default-log-port* " Insert test in run "run-id": "testname"/"item-path) (rmtmod:send-receive 'insert-test run-id test-rec))) ) |
Modified runs.scm from [399ccd6fb7] to [39982c26f9].
︙ | ︙ | |||
25 26 27 28 29 30 31 | (declare (uses items)) (declare (uses runconfig)) (declare (uses tests)) (declare (uses server)) (declare (uses mt)) (declare (uses archive)) (declare (uses mtargs)) | | < > | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | (declare (uses items)) (declare (uses runconfig)) (declare (uses tests)) (declare (uses server)) (declare (uses mt)) (declare (uses archive)) (declare (uses mtargs)) (declare (uses rmtmod)) (use (prefix sqlite3 sqlite3:) srfi-1 posix regex regex-case srfi-69 (srfi 18) posix-extras directory-utils pathname-expand typed-records format sxml-serializer sxml-modifications matchable) (include "common_records.scm") (include "key_records.scm") (include "db_records.scm") (include "run_records.scm") (include "test_records.scm") ;; (include "debugger.scm") (import commonmod debugprint rmtmod (prefix mtargs args:)) ;; use this struct to facilitate refactoring ;; (defstruct runs:dat reglen regfull |
︙ | ︙ |
Modified server.scm from [ca005a962e] to [a78488d9e1].
︙ | ︙ | |||
20 21 22 23 24 25 26 | (declare (uses commonmod)) (declare (uses debugprint)) (declare (uses common)) (declare (uses db)) (declare (uses tasks)) ;; tasks are where stuff is maintained about what is running. ;; (declare (uses synchash)) | < | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | (declare (uses commonmod)) (declare (uses debugprint)) (declare (uses common)) (declare (uses db)) (declare (uses tasks)) ;; tasks are where stuff is maintained about what is running. ;; (declare (uses synchash)) ;;(declare (uses rpc-transport)) (declare (uses launch)) ;; (declare (uses daemon)) (declare (uses mtargs)) (require-extension (srfi 18) extras tcp s11n) |
︙ | ︙ | |||
663 664 665 666 667 668 669 | (begin (debug:print-info 0 *default-log-port* "Unable to get host and/or port from " servr ", exn=" exn) #f) (match-let (((hostname port start-time server-id pid) servr)) (tasks:kill-server hostname pid)))) | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 | (begin (debug:print-info 0 *default-log-port* "Unable to get host and/or port from " servr ", exn=" exn) #f) (match-let (((hostname port start-time server-id pid) servr)) (tasks:kill-server hostname pid)))) ;; ;; called in megatest.scm, host-port is string hostname:port ;; ;; ;; ;; NOTE: This is NOT called directly from clients as not all transports support a client running ;; ;; in the same process as the server. ;; ;; ;; (define (server:ping host:port server-id #!key (do-exit #f)) ;; (let* ((host-port (cond ;; ((string? host:port) ;; (let ((slst (string-split host:port ":"))) ;; (if (eq? (length slst) 2) ;; (list (car slst)(string->number (cadr slst))) ;; #f))) ;; (else ;; #f)))) ;; (cond ;; ((and (list? host-port) ;; (eq? (length host-port) 2)) ;; (let* ((myrunremote (make-and-init-remote *toppath*)) ;; (iface (car host-port)) ;; (port (cadr host-port)) ;; (server-dat (client:connect iface port server-id myrunremote)) ;; (login-res (rmt:login-no-auto-client-setup myrunremote))) ;; (http-transport:close-connections myrunremote) ;; (if (and (list? login-res) ;; (car login-res)) ;; (begin ;; ;; (print "LOGIN_OK") ;; (if do-exit (exit 0)) ;; #t) ;; (begin ;; ;; (print "LOGIN_FAILED") ;; (if do-exit (exit 1)) ;; #f)))) ;; (else ;; (if host:port ;; (debug:print 0 *default-log-port* "ERROR: bad host:port "host:port)) ;; (if do-exit ;; (exit 1) ;; #f))))) ;; ;; ;; run ping in separate process, safest way in some cases ;; ;; ;; (define (server:ping-server ifaceport) ;; (with-input-from-pipe ;; (conc (common:get-megatest-exe) " -ping " ifaceport) ;; (lambda () ;; (let loop ((inl (read-line)) ;; (res "NOREPLY")) ;; (if (eof-object? inl) ;; (case (string->symbol res) ;; ((NOREPLY) #f) ;; ((LOGIN_OK) #t) ;; (else #f)) ;; (loop (read-line) inl)))))) ;; ;; ;; NOT USED (well, ok, reference in rpc-transport but otherwise not used). ;; ;; ;; (define (server:login toppath) ;; (lambda (toppath) ;; (set! *db-last-access* (current-seconds)) ;; might not be needed. ;; (if (equal? *toppath* toppath) ;; #t ;; #f))) ;; timeout is hms string: 1h 5m 3s, default is 1 minute ;; This is currently broken. Just use the number of hours with no unit. ;; Default is 60 seconds. ;; (define (server:expiration-timeout) (let* ((tmo (configf:lookup *configdat* "server" "timeout"))) |
︙ | ︙ |
Modified synchash.scm from [6d4566e942] to [6e3717b1e0].
︙ | ︙ | |||
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | (use format) (use srfi-1 srfi-69 sqlite3) (import (prefix sqlite3 sqlite3:)) (declare (unit synchash)) (declare (uses db)) (declare (uses server)) (include "db_records.scm") (define (synchash:make) (make-hash-table)) ;; given an alist of objects '((id obj) ...) ;; 1. remove unchanged objects from the list ;; 2. create a list of removed objects by id | > > > > | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | (use format) (use srfi-1 srfi-69 sqlite3) (import (prefix sqlite3 sqlite3:)) (declare (unit synchash)) (declare (uses db)) (declare (uses server)) (declare (uses rmtmod)) (include "db_records.scm") (import rmtmod) (define (synchash:make) (make-hash-table)) ;; given an alist of objects '((id obj) ...) ;; 1. remove unchanged objects from the list ;; 2. create a list of removed objects by id |
︙ | ︙ |
Modified tasks.scm from [e380911710] to [252d38622d].
︙ | ︙ | |||
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | ;; strftime('%m/%d/%Y %H:%M:%S','now','localtime') (declare (unit tasks)) (declare (uses debugprint)) (declare (uses dbfile)) (declare (uses db)) (declare (uses rmt)) (declare (uses common)) (declare (uses pgdb)) (declare (uses commonmod)) (declare (uses mtargs)) (use sqlite3 srfi-1 posix regex regex-case srfi-69 dot-locking format) (import (prefix sqlite3 sqlite3:)) (import commonmod debugprint (prefix mtargs args:)) (import dbfile) ;; (import pgdb) ;; pgdb is a module (include "task_records.scm") (include "db_records.scm") | > > | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | ;; strftime('%m/%d/%Y %H:%M:%S','now','localtime') (declare (unit tasks)) (declare (uses debugprint)) (declare (uses dbfile)) (declare (uses db)) (declare (uses rmt)) (declare (uses rmtmod)) (declare (uses common)) (declare (uses pgdb)) (declare (uses commonmod)) (declare (uses mtargs)) (use sqlite3 srfi-1 posix regex regex-case srfi-69 dot-locking format) (import (prefix sqlite3 sqlite3:)) (import commonmod debugprint rmtmod (prefix mtargs args:)) (import dbfile) ;; (import pgdb) ;; pgdb is a module (include "task_records.scm") (include "db_records.scm") |
︙ | ︙ |
Modified tcmt.scm from [b22bc233eb] to [2cd967b1fa].
︙ | ︙ | |||
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | ;; ;; 1. Run the megatest process and pass it all the needed parameters ;; 2. Every five seconds check for state/status changes and print the info ;; (declare (uses mtargs)) (declare (uses rmt)) (declare (uses common)) ;; (declare (uses megatest-version)) (declare (uses commonmod)) (use srfi-1 posix srfi-69 srfi-18 regex defstruct) (use trace) ;; (trace-call-sites #t) (import commonmod (prefix mtargs args:)) (include "megatest-version.scm") (include "megatest-fossil-hash.scm") (include "db_records.scm") (define origargs (cdr (argv))) | > > | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | ;; ;; 1. Run the megatest process and pass it all the needed parameters ;; 2. Every five seconds check for state/status changes and print the info ;; (declare (uses mtargs)) (declare (uses rmt)) (declare (uses rmtmod)) (declare (uses common)) ;; (declare (uses megatest-version)) (declare (uses commonmod)) (use srfi-1 posix srfi-69 srfi-18 regex defstruct) (use trace) ;; (trace-call-sites #t) (import commonmod rmtmod (prefix mtargs args:)) (include "megatest-version.scm") (include "megatest-fossil-hash.scm") (include "db_records.scm") (define origargs (cdr (argv))) |
︙ | ︙ |
Modified tdb.scm from [a4bdcfd23f] to [9e1aed8275].
︙ | ︙ | |||
23 24 25 26 27 28 29 | ;;====================================================================== (declare (unit tdb)) (declare (uses debugprint)) (declare (uses common)) (declare (uses keys)) (declare (uses ods)) | < > > | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | ;;====================================================================== (declare (unit tdb)) (declare (uses debugprint)) (declare (uses common)) (declare (uses keys)) (declare (uses ods)) (declare (uses mt)) (declare (uses db)) (declare (uses commonmod)) (declare (uses mtargs)) (declare (uses rmtmod)) (require-extension (srfi 18) extras tcp) (use sqlite3 srfi-1 posix regex regex-case srfi-69 csv-xml s11n md5 message-digest base64) (import (prefix sqlite3 sqlite3:)) (import (prefix base64 base64:)) (import commonmod debugprint rmtmod (prefix mtargs args:)) (include "common_records.scm") (include "db_records.scm") (include "key_records.scm") (include "run_records.scm") |
︙ | ︙ |
Modified tests.scm from [d000d0a092] to [45e41fe8dc].
︙ | ︙ | |||
32 33 34 35 36 37 38 39 40 41 42 43 | ;; (declare (uses dcommon)) ;; needed for the steps processing (declare (uses items)) (declare (uses runconfig)) ;; (declare (uses sdb)) (declare (uses server)) ;;(declare (uses stml2)) (declare (uses mtargs)) (use sqlite3 srfi-1 posix regex regex-case srfi-69 dot-locking tcp directory-utils) (import (prefix sqlite3 sqlite3:)) (import commonmod (prefix mtargs args:) | > | > | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | ;; (declare (uses dcommon)) ;; needed for the steps processing (declare (uses items)) (declare (uses runconfig)) ;; (declare (uses sdb)) (declare (uses server)) ;;(declare (uses stml2)) (declare (uses mtargs)) (declare (uses rmtmod)) (use sqlite3 srfi-1 posix regex regex-case srfi-69 dot-locking tcp directory-utils) (import (prefix sqlite3 sqlite3:)) (import commonmod (prefix mtargs args:) debugprint rmtmod) (require-library stml) (include "common_records.scm") (include "key_records.scm") (include "db_records.scm") (include "run_records.scm") (include "test_records.scm") |
︙ | ︙ |