Changes In Branch v1.65-real-new-runs-view-wip3 Through [a9196a3661] Excluding Merge-Ins
This is equivalent to a diff from 05a89e44c8 to a9196a3661
2021-02-26
| ||
20:48 | wip check-in: 00d480caad user: matt tags: v1.65-real-new-runs-view-wip3 | |
20:40 | wip converting more to modules check-in: a9196a3661 user: matt tags: v1.65-real-new-runs-view-wip3 | |
17:25 | WIP, does not compile check-in: 2ef57ca716 user: mrwellan tags: v1.65-real-new-runs-view-wip3 | |
2021-02-25
| ||
22:47 | Merged in wip2. Leaf check-in: 05a89e44c8 user: matt tags: v1.65-real-new-runs-view | |
22:36 | Merged some portlogger and module refactoring changes. check-in: b7a7d741be user: matt tags: v1.65-real-new-runs-view | |
Modified Makefile from [8832707063] to [59ec1092d4].
︙ | ︙ | |||
18 19 20 21 22 23 24 | # make install CSCOPTS='-accumulate-profile -profile-name $(PWD)/profile-ww$(shell date +%V.%u)' # rm <files>.o ; make install CSCOPTS='-profile' ; ... ; chicken-profile | less SHELL=/bin/bash PREFIX=$(PWD) CSCOPTS= INSTALL=install SRCFILES = common.scm items.scm launch.scm runconfig.scm \ | | | | | > | 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 | # make install CSCOPTS='-accumulate-profile -profile-name $(PWD)/profile-ww$(shell date +%V.%u)' # rm <files>.o ; make install CSCOPTS='-profile' ; ... ; chicken-profile | less SHELL=/bin/bash PREFIX=$(PWD) CSCOPTS= INSTALL=install SRCFILES = common.scm items.scm launch.scm runconfig.scm \ server.scm configf.scm db.scm \ process.scm runs.scm tests.scm genexample.scm \ http-transport.scm filedb.scm tdb.scm client.scm mt.scm \ ezsteps.scm lock-queue.scm sdb.scm rmt.scm api.scm \ subrun.scm archive.scm env.scm \ diff-report.scm # module source files MSRCFILES = dbmod.scm servermod.scm apimod.scm commonmod.scm rmtmod.scm ods.scm configfmod.scm transport.scm portlogger.scm tasks.scm pgdb.scm margsmod.scm MOFILES = $(addprefix mofiles/,$(MSRCFILES:%.scm=%.o)) MOIMPFILES = $(MSRCFILES:%.scm=%.import.o) # ftail.scm rmtmod.scm commonmod.scm removed # 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 DMSRCFILES = dcommonmod.scm DMOFILES = $(addprefix mofiles/,$(DMSRCFILES:%.scm=%.o)) |
︙ | ︙ | |||
110 111 112 113 114 115 116 | configf.o \ db.o \ env.o \ http-transport.o \ items.o \ launch.o \ lock-queue.o \ | < < | 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | configf.o \ db.o \ env.o \ http-transport.o \ items.o \ launch.o \ lock-queue.o \ mt.o \ process.o \ rmt.o \ runconfig.o \ runs.o \ server.o \ tdb.o \ tests.o \ subrun.o \ ezsteps.o # ods.o \ # mofiles/rmtmod.o \ |
︙ | ︙ | |||
187 188 189 190 191 192 193 | # common.o : mofiles/commonmod.o # # # commonmod.o dashboard.o megatest.o tcmt.o apimod.o : megatest-fossil-hash.scm # # tests.o db.o launch.o runs.o dashboard-tests.o \ # # commonmod.o dashboard.o megatest.o tcmt.o apimod.o : megatest-fossil-hash.scm # | | | | 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 | # common.o : mofiles/commonmod.o # # # commonmod.o dashboard.o megatest.o tcmt.o apimod.o : megatest-fossil-hash.scm # # tests.o db.o launch.o runs.o dashboard-tests.o \ # # commonmod.o dashboard.o megatest.o tcmt.o apimod.o : megatest-fossil-hash.scm # # tests.o db.o launch.o runs.o dashboard-tests.o dashboard-context-menu.o dashboard-guimonitor.o dashboard-main.o \ monitor.o dashboard.o archive.o megatest.o : db_records.scm megatest-fossil-hash.scm # dashboard.o : mofiles/apimod.o tests.o runs.o dashboard.o dashboard-tests.o dashboard-context-menu.o dashboard-main.o : run_records.scm db.o ezsteps.o launch.o megatest.o monitor.o runs-for-ref.o runs.o tests.o : key_records.scm tests.o mofiles/tasks.o dashboard-tasks.o : task_records.scm runs.o : test_records.scm # api.o rmt.o db.o : mofiles/apimod.o mofiles/dbmod.o mofiles/rmtmod.o mofiles/ods.o mofiles/commonmod.o common.o megatest.o dashboard.o : megatest-fossil-hash.scm megatest-version.scm # rmt.scm client.scm common.scm configf.scm dashboard-guimonitor.scm dashboard-tests.scm dashboard.scm db.scm dcommon.scm ezsteps.scm fs-transport.scm http-transport.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 |
︙ | ︙ | |||
459 460 461 462 463 464 465 | sd : datashare-testing/sd mkdir -p /tmp/$(USER)/datashare/disk1 /tmp/$(USER)/basepath xterm : sd (export BASEPATH=/tmp/$(USER)/basepath ; export PATH="$(PWD)/datashare-testing:$(PATH)" ; xterm &) datashare-testing/spublish : spublish.scm $(OFILES) megatest-version.scm | | | | | 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 | sd : datashare-testing/sd mkdir -p /tmp/$(USER)/datashare/disk1 /tmp/$(USER)/basepath xterm : sd (export BASEPATH=/tmp/$(USER)/basepath ; export PATH="$(PWD)/datashare-testing:$(PATH)" ; xterm &) datashare-testing/spublish : spublish.scm $(OFILES) megatest-version.scm csc $(CSCOPTS) spublish.scm mofiles/margsmod.o process.o common.o -o datashare-testing/spublish datashare-testing/sretrieve : sretrieve.scm $(OFILES) megatest-version.scm csc $(CSCOPTS) sretrieve.scm mofiles/margsmod.o process.o common.o -o datashare-testing/sretrieve datashare-testing/sauthorize : sauthorize.scm $(OFILES) megatest-version.scm csc $(CSCOPTS) sauthorize.scm mofiles/margsmod.o process.o common.o -o datashare-testing/sauthorize sauth-init: mkdir -p datashare-testing rm datashare-testing/sauthorize rm datashare-testing/sretrieve rm datashare-testing/spublish |
︙ | ︙ | |||
493 494 495 496 497 498 499 | if csi -ne '(use mysql-client)';then \ echo "(use mysql-client)(hash-table-set! *available-db* 'mysql #t)" >> altdb.scm; \ fi if csi -ne '(use postgresql)';then \ echo "(use postgresql)(hash-table-set! *available-db* 'postgresql #t)" >> altdb.scm;\ fi | | | | 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 | if csi -ne '(use mysql-client)';then \ echo "(use mysql-client)(hash-table-set! *available-db* 'mysql #t)" >> altdb.scm; \ fi if csi -ne '(use postgresql)';then \ echo "(use postgresql)(hash-table-set! *available-db* 'postgresql #t)" >> altdb.scm;\ fi portlogger-example : portlogger-example.scm api.o archive.o client.o common.o configf.o dashboard-tests.o dashboard-context-menu.o db.o dcommon.o ezsteps.o filedb.o genexample.o gutils.o http-transport.o items.o launch.o lock-queue.o mofiles/margsmod.o mt.o mofiles/portlogger.o process.o rmt.o runconfig.o runs.o sdb.o server.o synchash.o mofiles/tasks.o tdb.o tests.o tree.o csc $(CSCOPTS) portlogger-example.scm api.o archive.o client.o common.o configf.o dashboard-tests.o dashboard-context-menu.o db.o dcommon.o ezsteps.o filedb.o genexample.o gutils.o http-transport.o items.o launch.o lock-queue.o mofiles/margsmod.o mt.o mofiles/portlogger.o process.o rmt.o runconfig.o runs.o sdb.o server.o synchash.o mofiles/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 [d5cec96c4e] to [77e3c448d9].
︙ | ︙ | |||
32 33 34 35 36 37 38 | (declare (uses apimod)) (import apimod) (declare (uses dbmod)) (import dbmod) | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 32 33 34 35 36 37 38 | (declare (uses apimod)) (import apimod) (declare (uses dbmod)) (import dbmod) |
Modified apimod.scm from [62658751f7] to [585d40d9c0].
︙ | ︙ | |||
16 17 18 19 20 21 22 | ;; 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 apimod)) (declare (uses commonmod)) | | > | > > | 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 | ;; 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 apimod)) (declare (uses commonmod)) (declare (uses dbmod)) (declare (uses tasks)) (module apimod * (import scheme chicken data-structures extras) (import (prefix sqlite3 sqlite3:) posix typed-records srfi-18 srfi-69) (import commonmod) (import dbmod) (import tasks) ;; allow these queries through without starting a server ;; (define api:read-only-queries '(get-key-val-pairs get-var get-keys |
︙ | ︙ | |||
134 135 136 137 138 139 140 | testmeta-add-record testmeta-update-field ;; TASKS tasks-add tasks-set-state-given-param-key )) | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 | testmeta-add-record testmeta-update-field ;; TASKS tasks-add tasks-set-state-given-param-key )) ;; These are called by the server on recipt of /api calls ;; - keep it simple, only return the actual result of the call, i.e. no meta info here ;; ;; - returns #( flag result ) ;; (define (api:execute-requests dbstruct dat) (handle-exceptions exn (let ((call-chain (get-call-chain))) (debug:print 0 *default-log-port* "WARNING: api:execute-requests received an exception from peer, dat=" dat ", exn=" exn) (print-call-chain (current-error-port)) (debug:print 0 *default-log-port* " message: " ((condition-property-accessor 'exn 'message) exn)) (vector #f (vector exn call-chain dat))) ;; return some stuff for debug if an exception happens (cond ((not (vector? dat)) ;; it is an error to not receive a vector (vector #f (vector #f "remote must be called with a vector"))) ((> *api-process-request-count* 20) ;; 20) (debug:print 0 *default-log-port* "WARNING: api:execute-requests received an overloaded message.") (set! *server-overloaded* #t) (vector #f (vector #f 'overloaded))) ;; the inner vector is what gets returned. nope, don't know why. please refactor! (else (let* ((cmd-in (vector-ref dat 0)) (cmd (if (symbol? cmd-in) cmd-in (string->symbol cmd-in))) (params (vector-ref dat 1)) (start-t (current-milliseconds)) (readonly-mode (dbr:dbstruct-read-only dbstruct)) (readonly-command (member cmd api:read-only-queries)) (writecmd-in-readonly-mode (and readonly-mode (not readonly-command))) #;(foo (begin (common:telemetry-log (conc "api-in:"(->string cmd)) payload: `((params . ,params))) #t)) (res (if writecmd-in-readonly-mode (conc "attempt to run write command "cmd" on a read-only database") (case cmd ;;=============================================== ;; READ/WRITE QUERIES ;;=============================================== ((get-keys-write) (db:get-keys dbstruct)) ;; force a dummy "write" query to force server; for debug in -repl ;; SERVERS ((start-server) (apply server:kind-run params)) ((kill-server) (set! *server-run* #f)) ;; TESTS ;;((test-set-state-status-by-id) (apply mt:test-set-state-status-by-id dbstruct params)) ;;BB - commented out above because it was calling below, eventually, incorrectly (dbstruct passed to mt:test-set-state-status-by-id, which previosly did more, but now only passes thru to db:set-state-status-and-roll-up-items. ((test-set-state-status-by-id) ;; (define (db:set-state-status-and-roll-up-items dbstruct run-id test-name item-path state status comment) (db:set-state-status-and-roll-up-items dbstruct (list-ref params 0) ; run-id (list-ref params 1) ; test-name #f ; item-path (list-ref params 2) ; state (list-ref params 3) ; status (list-ref params 4) ; comment )) ((delete-test-records) (apply db:delete-test-records dbstruct params)) ((delete-old-deleted-test-records) (apply db:delete-old-deleted-test-records dbstruct params)) ((test-set-state-status) (apply db:test-set-state-status dbstruct params)) ((test-set-top-process-pid) (apply db:test-set-top-process-pid dbstruct params)) ((set-state-status-and-roll-up-items) (apply db:set-state-status-and-roll-up-items dbstruct params)) ((set-state-status-and-roll-up-run) (apply db:set-state-status-and-roll-up-run dbstruct params)) ((top-test-set-per-pf-counts) (apply db:top-test-set-per-pf-counts dbstruct params)) ((test-set-archive-block-id) (apply db:test-set-archive-block-id dbstruct params)) ;; RUNS ((register-run) (apply db:register-run dbstruct params)) ((set-tests-state-status) (apply db:set-tests-state-status dbstruct params)) ((delete-run) (apply db:delete-run dbstruct params)) ((lock/unlock-run) (apply db:lock/unlock-run dbstruct params)) ((update-run-event_time) (apply db:update-run-event_time dbstruct params)) ((update-run-stats) (apply db:update-run-stats dbstruct params)) ((set-var) (apply db:set-var dbstruct params)) ((inc-var) (apply db:inc-var dbstruct params)) ((dec-var) (apply db:dec-var dbstruct params)) ((del-var) (apply db:del-var dbstruct params)) ((add-var) (apply db:add-var dbstruct params)) ;; STEPS ((teststep-set-status!) (apply db:teststep-set-status! dbstruct params)) ((delete-steps-for-test!) (apply db:delete-steps-for-test! dbstruct params)) ;; TEST DATA ((test-data-rollup) (apply db:test-data-rollup dbstruct params)) ((csv->test-data) (apply db:csv->test-data dbstruct params)) ;; MISC ((sync-inmem->db) (let ((run-id (car params))) (db:sync-touched dbstruct run-id force-sync: #t))) ((mark-incomplete) (apply db:find-and-mark-incomplete dbstruct params)) ((create-all-triggers) (db:create-all-triggers dbstruct)) ((drop-all-triggers) (db:drop-all-triggers dbstruct)) ;; TESTMETA ((testmeta-add-record) (apply db:testmeta-add-record dbstruct params)) ((testmeta-update-field) (apply db:testmeta-update-field dbstruct params)) ((get-tests-tags) (db:get-tests-tags dbstruct)) ;; TASKS ((tasks-add) (apply tasks:add dbstruct params)) ((tasks-set-state-given-param-key) (apply tasks:set-state-given-param-key dbstruct params)) ((tasks-get-last) (apply tasks:get-last dbstruct params)) ;; NO SYNC DB ((no-sync-set) (apply db:no-sync-set *no-sync-db* params)) ((no-sync-get/default) (apply db:no-sync-get/default *no-sync-db* params)) ((no-sync-del!) (apply db:no-sync-del! *no-sync-db* params)) ((no-sync-get-lock) (apply db:no-sync-get-lock *no-sync-db* params)) ;; ARCHIVES ;; ((archive-get-allocations) ((archive-register-disk) (apply db:archive-register-disk dbstruct params)) ((archive-register-block-name)(apply db:archive-register-block-name dbstruct params)) ;; ((archive-allocate-testsuite/area-to-block)(apply db:archive-allocate-testsuite/area-to-block dbstruct block-id testsuite-name areakey)) ;;====================================================================== ;; READ ONLY QUERIES ;;====================================================================== ;; KEYS ((get-key-val-pairs) (apply db:get-key-val-pairs dbstruct params)) ((get-keys) (db:get-keys dbstruct)) ((get-key-vals) (apply db:get-key-vals dbstruct params)) ((get-target) (apply db:get-target dbstruct params)) ((get-targets) (db:get-targets dbstruct)) ;; ARCHIVES ((test-get-archive-block-info) (apply db:test-get-archive-block-info dbstruct params)) ;; TESTS ((test-toplevel-num-items) (apply db:test-toplevel-num-items dbstruct params)) ((get-test-info-by-id) (apply db:get-test-info-by-id dbstruct params)) ((test-get-rundir-from-test-id) (apply db:test-get-rundir-from-test-id dbstruct params)) ((get-count-tests-running-for-testname) (apply db:get-count-tests-running-for-testname dbstruct params)) ((get-count-tests-running) (apply db:get-count-tests-running dbstruct params)) ((get-count-tests-running-in-jobgroup) (apply db:get-count-tests-running-in-jobgroup dbstruct params)) ;; ((delete-test-step-records) (apply db:delete-test-step-records dbstruct params)) ;; ((get-previous-test-run-record) (apply db:get-previous-test-run-record dbstruct params)) ((get-matching-previous-test-run-records)(apply db:get-matching-previous-test-run-records dbstruct params)) ((test-get-logfile-info) (apply db:test-get-logfile-info dbstruct params)) ((test-get-records-for-index-file) (apply db:test-get-records-for-index-file dbstruct params)) ((get-testinfo-state-status) (apply db:get-testinfo-state-status dbstruct params)) ((test-get-top-process-pid) (apply db:test-get-top-process-pid dbstruct params)) ((test-get-paths-matching-keynames-target-new) (apply db:test-get-paths-matching-keynames-target-new dbstruct params)) ((get-prereqs-not-met) (apply db:get-prereqs-not-met dbstruct params)) ((get-count-tests-running-for-run-id) (apply db:get-count-tests-running-for-run-id dbstruct params)) ((get-not-completed-cnt) (apply db:get-not-completed-cnt dbstruct params)) ;; ((synchash-get) (apply synchash:server-get dbstruct params)) ((get-raw-run-stats) (apply db:get-raw-run-stats dbstruct params)) ((get-test-times) (apply db:get-test-times dbstruct params)) ;; RUNS ((get-run-info) (apply db:get-run-info dbstruct params)) ((get-run-status) (apply db:get-run-status dbstruct params)) ((get-run-state) (apply db:get-run-state dbstruct params)) ((set-run-status) (apply db:set-run-status dbstruct params)) ((set-run-state-status) (apply db:set-run-state-status dbstruct params)) ((update-tesdata-on-repilcate-db) (apply db:update-tesdata-on-repilcate-db dbstruct params)) ((get-tests-for-run) (apply db:get-tests-for-run dbstruct params)) ((get-tests-for-run-state-status) (apply db:get-tests-for-run-state-status dbstruct params)) ((get-test-id) (apply db:get-test-id dbstruct params)) ((get-tests-for-run-mindata) (apply db:get-tests-for-run-mindata dbstruct params)) ;; ((get-tests-for-runs-mindata) (apply db:get-tests-for-runs-mindata dbstruct params)) ((get-runs) (apply db:get-runs dbstruct params)) ((simple-get-runs) (apply db:simple-get-runs dbstruct params)) ((get-num-runs) (apply db:get-num-runs dbstruct params)) ((get-runs-cnt-by-patt) (apply db:get-runs-cnt-by-patt dbstruct params)) ((get-all-run-ids) (db:get-all-run-ids dbstruct)) ((get-prev-run-ids) (apply db:get-prev-run-ids dbstruct params)) ((get-run-ids-matching-target) (apply db:get-run-ids-matching-target dbstruct params)) ((get-runs-by-patt) (apply db:get-runs-by-patt dbstruct params)) ((get-run-name-from-id) (apply db:get-run-name-from-id dbstruct params)) ((get-main-run-stats) (apply db:get-main-run-stats dbstruct params)) ((get-var) (apply db:get-var dbstruct params)) ((get-run-stats) (apply db:get-run-stats dbstruct params)) ((get-run-times) (apply db:get-run-times dbstruct params)) ;; STEPS ((get-steps-data) (apply db:get-steps-data dbstruct params)) ((get-steps-for-test) (apply db:get-steps-for-test dbstruct params)) ((get-steps-info-by-id) (apply db:get-steps-info-by-id dbstruct params)) ;; TEST DATA ((read-test-data) (apply db:read-test-data dbstruct params)) ((read-test-data-varpatt) (apply db:read-test-data-varpatt dbstruct params)) ((get-data-info-by-id) (apply db:get-data-info-by-id dbstruct params)) ;; MISC ((get-latest-host-load) (apply db:get-latest-host-load dbstruct params)) ((have-incompletes?) (apply db:have-incompletes? dbstruct params)) ((login) (apply db:login dbstruct params)) ((general-call) (let ((stmtname (car params)) (run-id (cadr params)) (realparams (cddr params))) (db:general-call dbstruct stmtname realparams))) ((sdb-qry) (apply sdb:qry params)) ((ping) (current-process-id)) ((get-changed-record-ids) (apply db:get-changed-record-ids dbstruct params)) ((get-run-record-ids) (apply db:get-run-record-ids dbstruct params)) ;; TESTMETA ((testmeta-get-record) (apply db:testmeta-get-record dbstruct params)) ;; TASKS ((find-task-queue-records) (apply tasks:find-task-queue-records dbstruct params)) (else (debug:print 0 *default-log-port* "ERROR: bad api call " cmd) (conc "ERROR: BAD api call " cmd)))))) ;; save all stats (let ((delta-t (- (current-milliseconds) start-t))) (hash-table-set! *db-api-call-time* cmd (cons delta-t (hash-table-ref/default *db-api-call-time* cmd '())))) (if writecmd-in-readonly-mode (begin #;(common:telemetry-log (conc "api-out:"(->string cmd)) payload: `((params . ,params) (ok-res . #t))) (vector #f res)) (begin #;(common:telemetry-log (conc "api-out:"(->string cmd)) payload: `((params . ,params) (ok-res . #f))) (vector #t res)))))))) ;; http-server send-response ;; api:process-request ;; db:* ;; ;; NB// Runs on the server as part of the server loop ;; (define (api:process-request dbstruct $) ;; the $ is the request vars proc (debug:print 4 *default-log-port* "server-id:" *server-id*) (let* ((cmd ($ 'cmd)) (paramsj ($ 'params)) (key ($ 'key)) (params (db:string->obj paramsj transport: 'http))) ;; incoming data from the POST (or is it a GET?) (debug:print 4 *default-log-port* "cmd:" cmd " with params " params "key " key) (if (equal? key *server-id*) (begin (set! *api-process-request-count* (+ *api-process-request-count* 1)) (let* ((resdat (api:execute-requests dbstruct (vector cmd params))) ;; process the request, resdat = #( flag result ) (success (vector-ref resdat 0)) (res (vector-ref resdat 1))) ;; (vector flag payload), get the payload, ignore the flag (why?) (debug:print 4 *default-log-port* "res:" res) (if (not success) (debug:print 0 *default-log-port* "ERROR: success flag is #f for " cmd " with params " params)) (if (> *api-process-request-count* *max-api-process-requests*) (set! *max-api-process-requests* *api-process-request-count*)) (set! *api-process-request-count* (- *api-process-request-count* 1)) ;; This can be here but needs controls to ensure it doesn't run more than every 4 seconds ;; (rmt:dat->json-str ;; (if (or (string? res) ;; (list? res) ;; (number? res) ;; (boolean? res)) ;; res ;; (list "ERROR, not string, list, number or boolean" 1 cmd params res))))) (db:obj->string res transport: 'http))) (begin (debug:print 0 *default-log-port* "Server refused to process request. Sever id mismatch. recived " key " expected: " *server-id* ".\nOther arguments recived: cmd=" cmd " params = " params) (db:obj->string (conc "Server refused to process request server-id mismatch: " key ", " *server-id*) transport: 'http))))) ) |
Modified archive.scm from [15a0ae937f] to [5606f99523].
︙ | ︙ | |||
28 29 30 31 32 33 34 35 36 37 38 39 40 41 | (import configfmod) (declare (uses commonmod)) (import commonmod) (declare (uses dbmod)) (import dbmod) (include "common_records.scm") (include "db_records.scm") ;;====================================================================== ;; ;;====================================================================== | > > > | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | (import configfmod) (declare (uses commonmod)) (import commonmod) (declare (uses dbmod)) (import dbmod) (declare (uses margsmod)) (import margsmod) (include "common_records.scm") (include "db_records.scm") ;;====================================================================== ;; ;;====================================================================== |
︙ | ︙ |
Modified build.inc from [16569e7315] to [9676282c2c].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | # To regenerate this file do: # (cd utils/;ck52 csc gendeps.scm) && ./utils/gendeps allunits *scm # cp allunits.inc build.inc # api.o : mofiles/apimod.o api.o : mofiles/commonmod.o api.o : mofiles/dbmod.o archive.o : mofiles/commonmod.o archive.o : mofiles/configfmod.o archive.o : mofiles/dbmod.o client.o : mofiles/commonmod.o client.o : mofiles/dbmod.o client.o : mofiles/servermod.o common.o : mofiles/commonmod.o common.o : mofiles/configfmod.o common.o : mofiles/dbmod.o common.o : mofiles/servermod.o configf.o : mofiles/commonmod.o configf.o : mofiles/configfmod.o dashboard-context-menu.o : mofiles/commonmod.o dashboard-context-menu.o : mofiles/configfmod.o dashboard-context-menu.o : mofiles/dbmod.o dashboard-guimonitor.o : mofiles/commonmod.o dashboard-guimonitor.o : mofiles/dbmod.o dashboard-tests.o : mofiles/commonmod.o dashboard-tests.o : mofiles/configfmod.o dashboard-tests.o : mofiles/dbmod.o dashboard.o : mofiles/apimod.o dashboard.o : mofiles/commonmod.o dashboard.o : mofiles/configfmod.o dashboard.o : mofiles/dbmod.o | > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | # To regenerate this file do: # (cd utils/;ck52 csc gendeps.scm) && ./utils/gendeps allunits *scm # cp allunits.inc build.inc # api.o : mofiles/apimod.o api.o : mofiles/commonmod.o api.o : mofiles/dbmod.o api.o : mofiles/tasks.o archive.o : mofiles/commonmod.o archive.o : mofiles/configfmod.o archive.o : mofiles/dbmod.o client.o : mofiles/commonmod.o client.o : mofiles/dbmod.o client.o : mofiles/servermod.o common.o : mofiles/commonmod.o common.o : mofiles/configfmod.o common.o : mofiles/dbmod.o common.o : mofiles/servermod.o configf.o : mofiles/commonmod.o configf.o : mofiles/configfmod.o dashboard-context-menu.o : mofiles/commonmod.o dashboard-context-menu.o : mofiles/configfmod.o dashboard-context-menu.o : mofiles/dbmod.o dashboard-guimonitor.o : mofiles/commonmod.o dashboard-guimonitor.o : mofiles/dbmod.o dashboard-guimonitor.o : mofiles/tasks.o dashboard-tests.o : mofiles/commonmod.o dashboard-tests.o : mofiles/configfmod.o dashboard-tests.o : mofiles/dbmod.o dashboard.o : mofiles/apimod.o dashboard.o : mofiles/commonmod.o dashboard.o : mofiles/configfmod.o dashboard.o : mofiles/dbmod.o |
︙ | ︙ | |||
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | index-tree.o : mofiles/commonmod.o items.o : mofiles/commonmod.o items.o : mofiles/configfmod.o launch.o : mofiles/commonmod.o launch.o : mofiles/configfmod.o launch.o : mofiles/dbmod.o lock-queue.o : mofiles/commonmod.o megatest.o : mofiles/apimod.o megatest.o : mofiles/commonmod.o megatest.o : mofiles/configfmod.o megatest.o : mofiles/dbmod.o megatest.o : mofiles/ods.o megatest.o : mofiles/rmtmod.o megatest.o : mofiles/servermod.o mofiles/apimod.o : mofiles/commonmod.o mofiles/configfmod.o : mofiles/commonmod.o mofiles/dbmod.o : mofiles/commonmod.o mofiles/dbmod.o : mofiles/configfmod.o mofiles/dbmod.o : mofiles/ods.o mofiles/dcommonmod.o : mofiles/commonmod.o mofiles/dcommonmod.o : mofiles/configfmod.o mofiles/ods.o : mofiles/commonmod.o | > > > | 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | index-tree.o : mofiles/commonmod.o items.o : mofiles/commonmod.o items.o : mofiles/configfmod.o launch.o : mofiles/commonmod.o launch.o : mofiles/configfmod.o launch.o : mofiles/dbmod.o lock-queue.o : mofiles/commonmod.o lock-queue.o : mofiles/tasks.o megatest.o : mofiles/apimod.o megatest.o : mofiles/commonmod.o megatest.o : mofiles/configfmod.o megatest.o : mofiles/dbmod.o megatest.o : mofiles/ods.o megatest.o : mofiles/rmtmod.o megatest.o : mofiles/servermod.o mofiles/apimod.o : mofiles/commonmod.o mofiles/apimod.o : mofiles/tasks.o mofiles/commonmod.o : mofiles/margsmod.o mofiles/configfmod.o : mofiles/commonmod.o mofiles/dbmod.o : mofiles/commonmod.o mofiles/dbmod.o : mofiles/configfmod.o mofiles/dbmod.o : mofiles/ods.o mofiles/dcommonmod.o : mofiles/commonmod.o mofiles/dcommonmod.o : mofiles/configfmod.o mofiles/ods.o : mofiles/commonmod.o |
︙ | ︙ | |||
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 | mt.o : mofiles/dbmod.o mtexec.o : mofiles/configfmod.o mtut.o : mofiles/commonmod.o mtut.o : mofiles/configfmod.o newdashboard.o : mofiles/commonmod.o newdashboard.o : mofiles/configfmod.o newdashboard.o : mofiles/dbmod.o process.o : mofiles/commonmod.o rmt.o : mofiles/apimod.o rmt.o : mofiles/commonmod.o rmt.o : mofiles/configfmod.o rmt.o : mofiles/dbmod.o rmt.o : mofiles/rmtmod.o rmt.o : mofiles/servermod.o runconfig.o : mofiles/commonmod.o runs.o : mofiles/commonmod.o runs.o : mofiles/configfmod.o runs.o : mofiles/dbmod.o runs.o : mofiles/servermod.o server.o : mofiles/commonmod.o server.o : mofiles/configfmod.o server.o : mofiles/dbmod.o server.o : mofiles/servermod.o subrun.o : mofiles/commonmod.o subrun.o : mofiles/configfmod.o subrun.o : mofiles/dbmod.o synchash.o : mofiles/dbmod.o | > | | | > | 97 98 99 100 101 102 103 104 105 106 107 108 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 135 136 137 138 | mt.o : mofiles/dbmod.o mtexec.o : mofiles/configfmod.o mtut.o : mofiles/commonmod.o mtut.o : mofiles/configfmod.o newdashboard.o : mofiles/commonmod.o newdashboard.o : mofiles/configfmod.o newdashboard.o : mofiles/dbmod.o mofiles/pgdb.o : mofiles/margsmod.o process.o : mofiles/commonmod.o rmt.o : mofiles/apimod.o rmt.o : mofiles/commonmod.o rmt.o : mofiles/configfmod.o rmt.o : mofiles/dbmod.o rmt.o : mofiles/rmtmod.o rmt.o : mofiles/servermod.o runconfig.o : mofiles/commonmod.o runs.o : mofiles/commonmod.o runs.o : mofiles/configfmod.o runs.o : mofiles/dbmod.o runs.o : mofiles/servermod.o server.o : mofiles/commonmod.o server.o : mofiles/configfmod.o server.o : mofiles/dbmod.o server.o : mofiles/servermod.o subrun.o : mofiles/commonmod.o subrun.o : mofiles/configfmod.o subrun.o : mofiles/dbmod.o synchash.o : mofiles/dbmod.o mofiles/tasks.o : mofiles/commonmod.o mofiles/tasks.o : mofiles/configfmod.o mofiles/tasks.o : mofiles/dbmod.o mofiles/tasks.o : mofiles/pgdb.o tcmt.o : mofiles/commonmod.o tdb.o : mofiles/commonmod.o tdb.o : mofiles/dbmod.o tdb.o : mofiles/ods.o tests.o : mofiles/commonmod.o tests.o : mofiles/configfmod.o tests.o : mofiles/dbmod.o tests.o : mofiles/servermod.o tree.o : mofiles/commonmod.o tree.o : mofiles/dbmod.o |
Modified cgisetup/models/pgdb.scm from [4136225c9c] to [7a34ae47f4].
︙ | ︙ | |||
16 17 18 19 20 21 22 23 | ;; 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 pgdb)) (declare (uses configf)) | > > > < < | > | < < < | | | > > > | | 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 | ;; 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 pgdb)) (declare (uses configf)) (declare (uses configfmod)) (declare (uses commonmod)) (declare (uses margsmod)) (module pgdb * (import scheme) (import data-structures) (import chicken) (import commonmod) (import configfmod) (import margsmod) (import srfi-1 srfi-69 typed-records (prefix dbi dbi:)) ;; given a configdat lookup the connection info and open the db ;; (define (pgdb:open configdat #!key (dbname #f)(dbispec #f)) (let ((pgconf (or dbispec (args:get-arg "-pgsync") (if configdat |
︙ | ︙ | |||
650 651 652 653 654 655 656 | (lst `())) (cond ((> i tab2-pages ) lst) (else (loop (+ i 1) (append lst (list i))))))) | > | 652 653 654 655 656 657 658 659 | (lst `())) (cond ((> i tab2-pages ) lst) (else (loop (+ i 1) (append lst (list i))))))) ) |
Modified client.scm from [d550770e12] to [6fe462c20f].
︙ | ︙ | |||
24 25 26 27 28 29 30 | message-digest matchable spiffy uri-common intarweb http-client spiffy-request-vars uri-common intarweb directory-utils) (declare (unit client)) (declare (uses common)) (declare (uses db)) | < | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | message-digest matchable spiffy uri-common intarweb http-client spiffy-request-vars uri-common intarweb directory-utils) (declare (unit client)) (declare (uses common)) (declare (uses db)) (declare (uses commonmod)) (import commonmod) (declare (uses dbmod)) (import dbmod) |
︙ | ︙ |
Modified common.scm from [8132d96410] to [da2d139bbd].
︙ | ︙ | |||
55 56 57 58 59 60 61 62 63 64 65 66 67 68 | (import dbmod) (declare (uses configfmod)) (import configfmod) (declare (uses servermod)) (import servermod) (include "common_records.scm") ;;====================================================================== ;; (require-library margs) ;; (include "margs.scm") | > > > | 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | (import dbmod) (declare (uses configfmod)) (import configfmod) (declare (uses servermod)) (import servermod) (declare (uses margsmod)) (import margsmod) (include "common_records.scm") ;;====================================================================== ;; (require-library margs) ;; (include "margs.scm") |
︙ | ︙ |
Modified commonmod.scm from [77ecf25b1f] to [ba91d8d232].
︙ | ︙ | |||
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | ;; ;; 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 commonmod)) (module commonmod * ;;(import scheme chicken data-structures extras files ports) (import scheme chicken) (use data-structures extras files ports) (use (prefix base64 base64:) (prefix sqlite3 sqlite3:) (srfi 18) directory-utils format | > > > | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | ;; ;; 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 commonmod)) (declare (uses margsmod)) (module commonmod * ;;(import scheme chicken data-structures extras files ports) (import scheme chicken) (import margsmod) (use data-structures extras files ports) (use (prefix base64 base64:) (prefix sqlite3 sqlite3:) (srfi 18) directory-utils format |
︙ | ︙ |
Modified configf.scm from [b56c2244d5] to [87785dc72f].
︙ | ︙ | |||
28 29 30 31 32 33 34 35 36 37 38 39 40 41 | (declare (uses env)) (declare (uses commonmod)) (import commonmod) (declare (uses configfmod)) (import configfmod) (include "common_records.scm") ;; return list (path fullpath configname) (define (find-config configname #!key (toppath #f)) (if toppath (let ((cfname (conc toppath "/" configname))) | > > > | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | (declare (uses env)) (declare (uses commonmod)) (import commonmod) (declare (uses configfmod)) (import configfmod) (declare (uses margsmod)) (import margsmod) (include "common_records.scm") ;; return list (path fullpath configname) (define (find-config configname #!key (toppath #f)) (if toppath (let ((cfname (conc toppath "/" configname))) |
︙ | ︙ |
Modified dashboard-guimonitor.scm from [6d71157ea5] to [d99d226872].
︙ | ︙ | |||
31 32 33 34 35 36 37 38 39 40 41 42 43 44 | (use sqlite3 srfi-1 posix regex regex-case srfi-69) (import (prefix sqlite3 sqlite3:)) (declare (unit dashboard-guimonitor)) (declare (uses common)) (declare (uses db)) (declare (uses tasks)) (declare (uses commonmod)) (import commonmod) (declare (uses dbmod)) (import dbmod) | > | 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | (use sqlite3 srfi-1 posix regex regex-case srfi-69) (import (prefix sqlite3 sqlite3:)) (declare (unit dashboard-guimonitor)) (declare (uses common)) (declare (uses db)) (declare (uses tasks)) (import tasks) (declare (uses commonmod)) (import commonmod) (declare (uses dbmod)) (import dbmod) |
︙ | ︙ |
Modified dashboard.scm from [a8edce5622] to [b8bbfa47ce].
︙ | ︙ | |||
28 29 30 31 32 33 34 | (use ducttape-lib) (use sqlite3 srfi-1 posix regex regex-case srfi-69 typed-records sparse-vectors matchable) ;; defstruct (import (prefix sqlite3 sqlite3:)) (declare (uses common)) | | > > | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | (use ducttape-lib) (use sqlite3 srfi-1 posix regex regex-case srfi-69 typed-records sparse-vectors matchable) ;; defstruct (import (prefix sqlite3 sqlite3:)) (declare (uses common)) (declare (uses margsmod)) (import margsmod) (declare (uses items)) (declare (uses db)) (declare (uses configf)) (declare (uses process)) (declare (uses launch)) (declare (uses runs)) (declare (uses dashboard-tests)) |
︙ | ︙ |
Modified db.scm from [6e43eefcde] to [b8f4832bf8].
︙ | ︙ | |||
30 31 32 33 34 35 36 37 38 39 40 41 42 43 | (import (prefix sqlite3 sqlite3:)) (import (prefix base64 base64:)) (declare (unit db)) (declare (uses common)) (declare (uses client)) (declare (uses mt)) (declare (uses commonmod)) (import commonmod) (declare (uses configfmod)) (import configfmod) | > > | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | (import (prefix sqlite3 sqlite3:)) (import (prefix base64 base64:)) (declare (unit db)) (declare (uses common)) (declare (uses client)) (declare (uses mt)) (declare (uses margsmod)) (import margsmod) (declare (uses commonmod)) (import commonmod) (declare (uses configfmod)) (import configfmod) |
︙ | ︙ |
Modified env.scm from [dfbf91100a] to [50ab80015a].
︙ | ︙ | |||
15 16 17 18 19 20 21 22 23 24 25 26 27 28 | ;; ;; 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 env)) (declare (uses commonmod)) (import commonmod) (use sql-de-lite) ;; srfi-1 posix regex regex-case srfi-69 srfi-18 call-with-environment-variables) (define (env:open-db fname) | > > > | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | ;; ;; 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 env)) (declare (uses margsmod)) (import margsmod) (declare (uses commonmod)) (import commonmod) (use sql-de-lite) ;; srfi-1 posix regex regex-case srfi-69 srfi-18 call-with-environment-variables) (define (env:open-db fname) |
︙ | ︙ |
Modified ezsteps.scm from [fd3c642425] to [d625eb38b6].
︙ | ︙ | |||
23 24 25 26 27 28 29 30 31 32 33 34 35 36 | z3 csv typed-records pathname-expand matchable) (declare (unit ezsteps)) (declare (uses db)) (declare (uses common)) (declare (uses items)) (declare (uses runconfig)) ;; (declare (uses sdb)) ;; (declare (uses filedb)) (declare (uses commonmod)) (import commonmod) (declare (uses configfmod)) | > > > > | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | z3 csv typed-records pathname-expand matchable) (declare (unit ezsteps)) (declare (uses db)) (declare (uses common)) (declare (uses items)) (declare (uses runconfig)) (declare (uses margsmod)) (import margsmod) ;; (declare (uses sdb)) ;; (declare (uses filedb)) (declare (uses commonmod)) (import commonmod) (declare (uses configfmod)) |
︙ | ︙ |
Modified genexample.scm from [25924e53ee] to [36a60587e3].
︙ | ︙ | |||
19 20 21 22 23 24 25 26 27 28 29 30 31 32 | ;;====================================================================== (declare (unit genexample)) (use posix regex matchable) (declare (uses commonmod)) (import commonmod) (include "db_records.scm") (define genexample:example-logpro #<<EOF ;; You should have at least one expect:required. This ensures that your process ran ;; comment out the line below and replace "put pattern here" with a pattern that will | > > > | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | ;;====================================================================== (declare (unit genexample)) (use posix regex matchable) (declare (uses commonmod)) (import commonmod) (declare (uses margsmod)) (import margsmod) (include "db_records.scm") (define genexample:example-logpro #<<EOF ;; You should have at least one expect:required. This ensures that your process ran ;; comment out the line below and replace "put pattern here" with a pattern that will |
︙ | ︙ |
Modified http-transport.scm from [37f4bee2e8] to [a4ea8859b2].
︙ | ︙ | |||
40 41 42 43 44 45 46 | (tcp-buffer-size 2048) (max-connections 2048) (declare (unit http-transport)) (declare (uses common)) (declare (uses db)) | < < < > > > | 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 69 70 71 72 73 74 75 | (tcp-buffer-size 2048) (max-connections 2048) (declare (unit http-transport)) (declare (uses common)) (declare (uses db)) (declare (uses portlogger)) (import portlogger) (declare (uses rmt)) (declare (uses commonmod)) (import commonmod) (declare (uses configfmod)) (import configfmod) (declare (uses dbmod)) (import dbmod) (declare (uses servermod)) (import servermod) (declare (uses transport)) (import transport) (declare (uses margsmod)]) (import margsmod) (include "common_records.scm") (include "db_records.scm") ;; (include "js-path.scm") ;; (require-library stml) |
︙ | ︙ |
Modified launch.scm from [05ec7cefc2] to [611ca66d81].
︙ | ︙ | |||
39 40 41 42 43 44 45 46 47 48 49 50 51 52 | (import commonmod) (declare (uses configfmod)) (import configfmod) (declare (uses dbmod)) (import dbmod) (include "common_records.scm") (include "key_records.scm") (include "db_records.scm") (include "megatest-fossil-hash.scm") ;;====================================================================== | > > > | 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | (import commonmod) (declare (uses configfmod)) (import configfmod) (declare (uses dbmod)) (import dbmod) (declare (uses margsmod)) (import margsmod) (include "common_records.scm") (include "key_records.scm") (include "db_records.scm") (include "megatest-fossil-hash.scm") ;;====================================================================== |
︙ | ︙ |
Modified lock-queue.scm from [e12825ce7c] to [3a63c75f62].
︙ | ︙ | |||
17 18 19 20 21 22 23 24 25 26 27 28 29 30 | ;; (use (prefix sqlite3 sqlite3:) srfi-18) (declare (unit lock-queue)) (declare (uses common)) (declare (uses tasks)) (declare (uses commonmod)) (import commonmod) ;;====================================================================== ;; attempt to prevent overlapping updates of rollup files by queueing ;; update requests in an sqlite db ;;====================================================================== | > | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | ;; (use (prefix sqlite3 sqlite3:) srfi-18) (declare (unit lock-queue)) (declare (uses common)) (declare (uses tasks)) (import tasks) (declare (uses commonmod)) (import commonmod) ;;====================================================================== ;; attempt to prevent overlapping updates of rollup files by queueing ;; update requests in an sqlite db ;;====================================================================== |
︙ | ︙ |
Deleted margs.scm version [812fd1b225].
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Added margsmod.scm version [40a3342922].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 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 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | ;; Copyright 2007-2010, 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 <http://www.gnu.org/licenses/>. (declare (unit margsmod)) (module margsmod * (import scheme chicken data-structures extras) (import srfi-69 srfi-1) (define args:help #f) (define (args:set-help help) (set! args:help help)) (define args:arg-hash (make-hash-table)) (define (args:get-arg arg . default) (if (null? default) (hash-table-ref/default args:arg-hash arg #f) (hash-table-ref/default args:arg-hash arg (car default)))) (define (args:any? . args) (not (null? (filter (lambda (x) x) (map args:get-arg args))))) (define (args:get-arg-from ht arg . default) (if (null? default) (hash-table-ref/default ht arg #f) (hash-table-ref/default ht arg (car default)))) (define (args:usage . args) (if (> (length args) 0) (apply print "ERROR: " args)) (if (string? args:help) (print args:help) (print "Usage: " (car (argv)) " ... ")) (exit 0)) ;; one-of args defined (define (args:any-defined? . param) (let ((res #f)) (for-each (lambda (arg) (if (args:get-arg arg)(set! res #t))) param) res)) ;; args: (define (args:get-args args params switches arg-hash num-needed) (let* ((numargs (length args)) (adj-num-needed (if num-needed (+ num-needed 2) #f))) (if (< numargs (if adj-num-needed adj-num-needed 2)) (if (>= num-needed 1) (args:usage "No arguments provided") '()) (let loop ((arg (cadr args)) (tail (cddr args)) (remargs '())) (cond ((member arg params) ;; args with params (if (< (length tail) 1) (args:usage "param given without argument " arg) (let ((val (car tail)) (newtail (cdr tail))) (hash-table-set! arg-hash arg val) (if (null? newtail) remargs (loop (car newtail)(cdr newtail) remargs))))) ((member arg switches) ;; args with no params (i.e. switches) (hash-table-set! arg-hash arg #t) (if (null? tail) remargs (loop (car tail)(cdr tail) remargs))) (else (if (null? tail)(append remargs (list arg)) ;; return the non-used args (loop (car tail)(cdr tail)(append remargs (list arg)))))))) )) (define (args:print-args remargs arg-hash) (print "ARGS: " remargs) (for-each (lambda (arg) (print " " arg " " (hash-table-ref/default arg-hash arg #f))) (hash-table-keys arg-hash))) ) |
Modified megatest.scm from [8e862aec17] to [beb850a30c].
︙ | ︙ | |||
20 21 22 23 24 25 26 | (include "megatest-version.scm") ;; fake out readline usage of toplevel-command (define (toplevel-command . a) #f) (declare (uses common)) ;; (declare (uses megatest-version)) | | > > > > > | 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 | (include "megatest-version.scm") ;; fake out readline usage of toplevel-command (define (toplevel-command . a) #f) (declare (uses common)) ;; (declare (uses megatest-version)) (declare (uses margsmod)) (import margsmod) (declare (uses runs)) (declare (uses launch)) (declare (uses server)) (declare (uses client)) (declare (uses tests)) (declare (uses genexample)) ;; (declare (uses daemon)) (declare (uses db)) ;; (declare (uses dcommon)) (declare (uses tdb)) (declare (uses mt)) (declare (uses api)) (declare (uses tasks)) ;; only used for debugging. (import tasks) (declare (uses tasks.import)) (declare (uses env)) (declare (uses diff-report)) ;; (declare (uses ftail)) ;; (import ftail) ;; Needed for repl even if not used here in megatest.scm ;; ORDER MATTERS! |
︙ | ︙ |
Modified mtexec.scm from [582cd76cba] to [a077f6f3ad].
︙ | ︙ | |||
24 25 26 27 28 29 30 | (use srfi-1 posix srfi-69 readline ;; regex regex-case srfi-69 apropos json http-client directory-utils rpc typed-records;; (srfi 18) extras) srfi-19 srfi-18 extras format pkts regex regex-case (prefix dbi dbi:) ) ;; (declare (uses common)) | | > > | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | (use srfi-1 posix srfi-69 readline ;; regex regex-case srfi-69 apropos json http-client directory-utils rpc typed-records;; (srfi 18) extras) srfi-19 srfi-18 extras format pkts regex regex-case (prefix dbi dbi:) ) ;; (declare (uses common)) (declare (uses margsmod)) (import margsmod) (declare (uses configf)) ;; (declare (uses rmt)) (declare (uses configfmod)) (import configfmod) ;; (use ducttape-lib) |
︙ | ︙ |
Modified mtut.scm from [f14475ff21] to [6a5977e911].
︙ | ︙ | |||
25 26 27 28 29 30 31 | (use srfi-1 posix srfi-69 readline ;; regex regex-case srfi-69 apropos json http-client directory-utils rpc typed-records;; (srfi 18) extras) srfi-19 srfi-18 extras format pkts regex regex-case (prefix dbi dbi:) (prefix sqlite3 sqlite3:) nanomsg) (declare (uses common)) | | > > | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | (use srfi-1 posix srfi-69 readline ;; regex regex-case srfi-69 apropos json http-client directory-utils rpc typed-records;; (srfi 18) extras) srfi-19 srfi-18 extras format pkts regex regex-case (prefix dbi dbi:) (prefix sqlite3 sqlite3:) nanomsg) (declare (uses common)) (declare (uses margsmod)) (import margsmod) (declare (uses configf)) ;; (declare (uses rmt)) (declare (uses commonmod)) (import commonmod) (declare (uses configfmod)) |
︙ | ︙ |
Modified newdashboard.scm from [07464037c8] to [c0e9f699fb].
︙ | ︙ | |||
26 27 28 29 30 31 32 | (import canvas-draw-iup) (use sql-de-lite srfi-1 posix regex regex-case srfi-69 typed-records sparse-vectors ;; defstruct (prefix dbi dbi:)) (declare (uses common)) (declare (uses megatest-version)) | | > | 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | (import canvas-draw-iup) (use sql-de-lite srfi-1 posix regex regex-case srfi-69 typed-records sparse-vectors ;; defstruct (prefix dbi dbi:)) (declare (uses common)) (declare (uses megatest-version)) (declare (uses margsmod)) (import margsmod) (declare (uses commonmod)) (import commonmod) (declare (uses dbmod)) (import dbmod) |
︙ | ︙ |
Added pgdb.scm version [c36721630d].
> | 1 | (include "cgisetup/models/pgdb.scm") |
Modified runs.scm from [680ea57b0e] to [b93b41d230].
︙ | ︙ | |||
40 41 42 43 44 45 46 47 48 49 50 51 52 53 | (declare (uses dbmod)) (import dbmod) (declare (uses servermod)) (import servermod) (include "common_records.scm") (include "key_records.scm") (include "db_records.scm") (include "run_records.scm") (include "test_records.scm") ;; (include "debugger.scm") | > > > | 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | (declare (uses dbmod)) (import dbmod) (declare (uses servermod)) (import servermod) (declare (uses margsmod)) (import margsmod) (include "common_records.scm") (include "key_records.scm") (include "db_records.scm") (include "run_records.scm") (include "test_records.scm") ;; (include "debugger.scm") |
︙ | ︙ |
Modified server.scm from [4b855f3685] to [aa3a085022].
︙ | ︙ | |||
23 24 25 26 27 28 29 | (use spiffy uri-common intarweb http-client spiffy-request-vars) (declare (unit server)) (declare (uses common)) (declare (uses db)) | | > | < < | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | (use spiffy uri-common intarweb http-client spiffy-request-vars) (declare (unit server)) (declare (uses common)) (declare (uses db)) (declare (uses margsmod)) (import margsmod) (declare (uses http-transport)) (declare (uses launch)) (declare (uses commonmod)) (import commonmod) (declare (uses dbmod)) (import dbmod) |
︙ | ︙ |
Modified sharedat.scm from [bb858ca5c8] to [438875259f].
︙ | ︙ | |||
35 36 37 38 39 40 41 | (import (prefix ini-file ini:)) (use sql-de-lite srfi-1 posix regex regex-case srfi-69) ;; (import (prefix sqlite3 sqlite3:)) ;; (declare (uses configf)) ;; (declare (uses tree)) | | | 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | (import (prefix ini-file ini:)) (use sql-de-lite srfi-1 posix regex regex-case srfi-69) ;; (import (prefix sqlite3 sqlite3:)) ;; (declare (uses configf)) ;; (declare (uses tree)) (declare (uses margsmod)) ;; (declare (uses dcommon)) ;; (declare (uses launch)) ;; (declare (uses gutils)) ;; (declare (uses db)) ;; (declare (uses synchash)) ;; (declare (uses server)) (declare (uses megatest-version)) |
︙ | ︙ |
Modified spublish.scm from [d0bcfc709c] to [9debc33eb9].
︙ | ︙ | |||
22 23 24 25 26 27 28 | (use srfi-18) (use srfi-19) (use format) (use sql-de-lite srfi-1 posix regex regex-case srfi-69) ;(declare (uses configf)) ;; (declare (uses tree)) | | | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | (use srfi-18) (use srfi-19) (use format) (use sql-de-lite srfi-1 posix regex regex-case srfi-69) ;(declare (uses configf)) ;; (declare (uses tree)) (declare (uses margsmod)) (include "megatest-version.scm") (include "megatest-fossil-hash.scm") ;;; please create this file before using sautherise. For sample file is avaliable sample-sauth-paths.scm. (include "sauth-paths.scm") (include "sauth-common.scm") (define (toplevel-command . args) #f) |
︙ | ︙ |
Modified tasks.scm from [47c2b52e29] to [22e171a15b].
︙ | ︙ | |||
14 15 16 17 18 19 20 | ;; ;; You should have received a copy of the GNU General Public License ;; along with Megatest. If not, see <http://www.gnu.org/licenses/>. ;; ;; strftime('%m/%d/%Y %H:%M:%S','now','localtime') | < < | | | | | | | | | > > > < | | | < | | | 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 | ;; ;; You should have received a copy of the GNU General Public License ;; along with Megatest. If not, see <http://www.gnu.org/licenses/>. ;; ;; strftime('%m/%d/%Y %H:%M:%S','now','localtime') (declare (unit tasks)) (declare (uses pgdb)) (declare (uses commonmod)) (declare (uses configfmod)) (declare (uses dbmod)) (declare (uses margsmod)) (module tasks * (import scheme chicken data-structures extras) (use sqlite3 srfi-1 posix regex regex-case srfi-69 dot-locking format) (import (prefix sqlite3 sqlite3:)) (import commonmod) (import configfmod) (import dbmod) (import margsmod) (import pgdb) (include "task_records.scm") ;; (include "db_records.scm") ;;====================================================================== ;; Tasks db ;;====================================================================== (define (tasks:get-task-db-path) (let ((dbdir (or (configf:lookup *configdat* "setup" "monitordir") |
︙ | ︙ | |||
1053 1054 1055 1056 1057 1058 1059 | (pgdb:write-sync-time dbh area-info smallest-time))))) ;;this needs to be changed (if (tasks:set-area dbh configdat) (tasks:sync-to-postgres configdat dest) (begin (debug:print 0 *default-log-port* "ERROR: unable to create an area record") #f))))) | > | 1052 1053 1054 1055 1056 1057 1058 1059 | (pgdb:write-sync-time dbh area-info smallest-time))))) ;;this needs to be changed (if (tasks:set-area dbh configdat) (tasks:sync-to-postgres configdat dest) (begin (debug:print 0 *default-log-port* "ERROR: unable to create an area record") #f))))) ) |
Modified tcmt.scm from [d89fbc3238] to [fd30b8cf18].
︙ | ︙ | |||
24 25 26 27 28 29 30 | ;; (use srfi-1 posix srfi-69 srfi-18 regex defstruct) (use trace) ;; (trace-call-sites #t) | | | | > > | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | ;; (use srfi-1 posix srfi-69 srfi-18 regex defstruct) (use trace) ;; (trace-call-sites #t) (declare (uses rmt)) (declare (uses common)) (declare (uses margsmod)) (import margsmod) ;; (declare (uses megatest-version)) (declare (uses commonmod)) (import commonmod) (include "megatest-version.scm") (include "megatest-fossil-hash.scm") |
︙ | ︙ |
Modified tdb.scm from [ea4d7209a0] to [13a4c1e0b4].
︙ | ︙ | |||
28 29 30 31 32 33 34 35 36 37 38 39 40 41 | (import (prefix base64 base64:)) (declare (unit tdb)) (declare (uses common)) (declare (uses client)) (declare (uses mt)) (declare (uses db)) (declare (uses commonmod)) (import commonmod) (declare (uses dbmod)) (import dbmod) | > > | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | (import (prefix base64 base64:)) (declare (unit tdb)) (declare (uses common)) (declare (uses client)) (declare (uses mt)) (declare (uses db)) (declare (uses margsmod)) (import margsmod) (declare (uses commonmod)) (import commonmod) (declare (uses dbmod)) (import dbmod) |
︙ | ︙ |
Modified tests.scm from [d882a4a65c] to [ebf8c4c953].
︙ | ︙ | |||
26 27 28 29 30 31 32 33 34 35 36 37 38 39 | (declare (uses lock-queue)) (declare (uses db)) (declare (uses tdb)) (declare (uses common)) (declare (uses items)) (declare (uses runconfig)) (declare (uses server)) (use sqlite3 srfi-1 posix regex regex-case srfi-69 dot-locking tcp directory-utils) (import (prefix sqlite3 sqlite3:)) (require-library stml) (declare (uses commonmod)) (import commonmod) | > > | 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | (declare (uses lock-queue)) (declare (uses db)) (declare (uses tdb)) (declare (uses common)) (declare (uses items)) (declare (uses runconfig)) (declare (uses server)) (declare (uses margsmod)) (import margsmod) (use sqlite3 srfi-1 posix regex regex-case srfi-69 dot-locking tcp directory-utils) (import (prefix sqlite3 sqlite3:)) (require-library stml) (declare (uses commonmod)) (import commonmod) |
︙ | ︙ |
Modified tree.scm from [331d83cb80] to [a72d8f05a2].
︙ | ︙ | |||
23 24 25 26 27 28 29 | (import (prefix iup iup:)) (use canvas-draw) (use sqlite3 srfi-1 posix regex regex-case srfi-69) (import (prefix sqlite3 sqlite3:)) (declare (unit tree)) | | | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | (import (prefix iup iup:)) (use canvas-draw) (use sqlite3 srfi-1 posix regex regex-case srfi-69) (import (prefix sqlite3 sqlite3:)) (declare (unit tree)) (declare (uses margsmod)) (declare (uses launch)) ;; (declare (uses megatest-version)) (declare (uses gutils)) (declare (uses db)) (declare (uses server)) ;; (declare (uses synchash)) (declare (uses dcommon)) |
︙ | ︙ |