Index: apimod.scm ================================================================== --- apimod.scm +++ apimod.scm @@ -254,15 +254,15 @@ ;; 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)) +;; ((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)) Index: archivemod.scm ================================================================== --- archivemod.scm +++ archivemod.scm @@ -1,5 +1,6 @@ + ;;====================================================================== ;; Copyright 2017, Matthew Welland. ;; ;; This file is part of Megatest. ;; @@ -465,12 +466,15 @@ (let* ((bup-exe (or (configf:lookup *configdat* "archive" "bup") "bup")) (archive-internal-path (conc (common:get-area-name) "-megatest-db/" ts "/megatest.db" )) (bup-restore-params (list "-d" archive-path "restore" "-C" *toppath* archive-internal-path))) (debug:print-info 2 *default-log-port* "Restoring archived data to " *toppath* " from archive in " archive-path " ... " archive-internal-path) (run-n-wait bup-exe params: bup-restore-params print-cmd: "Running:")) - (sleep 2) - (db:multi-db-sync + (sleep 2) + + ;; TODO: restore this functionality + + #;(db:multi-db-sync (db:setup #f) 'killservers ;'dejunk ;'adj-testids 'old2new Index: db.scm ================================================================== --- db.scm +++ db.scm @@ -23,11 +23,14 @@ ;; NOT REWRITTEN YET!!!!! ;; runspatt is a comma delimited list of run patterns ;; keypatt-alist must contain *all* keys with an associated pattern: '( ("KEY1" "%") .. ) -(define (db:extract-ods-file dbstruct outputfile keypatt-alist runspatt pathmod) + +;; TODO: Re-enable this functionality + +#;(define (db:extract-ods-file dbstruct outputfile keypatt-alist runspatt pathmod) (let* ((keysstr (string-intersperse (map car keypatt-alist) ",")) (keyqry (string-intersperse (map (lambda (p)(conc (car p) " LIKE ? ")) keypatt-alist) " AND ")) (numkeys (length keypatt-alist)) (test-ids '()) (dbdat (db:get-db dbstruct)) Index: launchmod.scm ================================================================== --- launchmod.scm +++ launchmod.scm @@ -2310,10 +2310,13 @@ ;;====================================================================== ;; currently the primary job of the watchdog is to run the sync back to megatest.db from the db in /tmp ;; if we are on the homehost and we are a server (by definition we are on the homehost if we are a server) ;; (define (common:readonly-watchdog dbstruct) + #f) + +#;(define (common:readonly-watchdog dbstruct) (let ((just-testing 0.0501)) (thread-sleep! just-testing)) ;; (/ 1 20)) ;; 0.051) ;; delay for startup (debug:print-info 13 *default-log-port* "common:readonly-watchdog entered.") ;; sync megatest.db to /tmp/.../megatst.db (let* ((sync-cool-off-duration 3) @@ -2388,10 +2391,12 @@ ;; (print "no-watchdog-args="no-watchdog-args "no-watchdog-args-vals="no-watchdog-args-vals " start-watchdog-special-arg-val:" start-watchdog-special-arg-val " start-watchdog:" start-watchdog) (if start-watchdog (thread-start! (bdat-watchdog *bdat*))))) (define (server:writable-watchdog-deltasync dbstruct) + #f) +#;(define (server:writable-watchdog-deltasync dbstruct) (thread-sleep! 0.054) ;; delay for startup (let ((legacy-sync (common:run-sync?)) (sync-stale-seconds (configf:lookup-number *configdat* "server" "sync-stale-seconds" default: 300)) (debug-mode (debug:debug-mode 1)) (last-time (current-seconds)) Index: megatest.scm ================================================================== --- megatest.scm +++ megatest.scm @@ -919,12 +919,14 @@ (on-exit std-exit-procedure) ;;====================================================================== ;; Misc general calls ;;====================================================================== - - (if (and (args:get-arg "-cache-db") + +;; TODO: Restore this functionality + + #; (if (and (args:get-arg "-cache-db") (args:get-arg "-source-db")) (let* ((temp-dir (or (args:get-arg "-target-db") (create-directory (conc "/tmp/" (getenv "USER") "/" (string-translate (current-directory) "/" "_"))))) (target-db (conc temp-dir "/cached.db")) (source-db (args:get-arg "-source-db"))) (db:cache-for-read-only source-db target-db) @@ -1306,11 +1308,15 @@ (debug:print-error 0 *default-log-port* "Attempted " action "on test(s) but run area config file not found") (exit 1)) ;; put test parameters into convenient variables (begin ;; check for correct version, exit with message if not correct - (common:exit-on-version-changed) + + ;; TODO: restore this functionality + + ;; (common:exit-on-version-changed) + (runs:operate-on action target runname testpatt state: (common:args-get-state) @@ -2147,12 +2153,14 @@ (operate-on 'archive target-in: target runname-in: runname ))))) ;;====================================================================== ;; Extract a spreadsheet from the runs database ;;====================================================================== - - (if (args:get-arg "-extract-ods") + +;; TODO: Reenable this functionality + + #;(if (args:get-arg "-extract-ods") (general-run-call "-extract-ods" "Make ods spreadsheet" (lambda (target runname keys keyvals) (let ((dbstruct (make-dbr:dbstruct path: *toppath* local: #t)) @@ -2368,12 +2376,14 @@ (set! *didsomething* #t))) ;;====================================================================== ;; Update the database schema, clean up the db ;;====================================================================== - - (if (args:get-arg "-rebuild-db") + +;; TODO: Restore this functionality + + #;(if (args:get-arg "-rebuild-db") (begin (if (not (launch:setup)) (begin (debug:print 0 *default-log-port* "Failed to setup, exiting") (exit 1))) @@ -2381,11 +2391,11 @@ ;; (open-run-close patch-db #f) (let ((dbstruct (db:setup #f areapath: *toppath*))) (common:cleanup-db dbstruct full: #t)) (set! *didsomething* #t))) - (if (args:get-arg "-cleanup-db") + #;(if (args:get-arg "-cleanup-db") (begin (if (not (launch:setup)) (begin (debug:print 0 *default-log-port* "Failed to setup, exiting") (exit 1))) @@ -2551,12 +2561,14 @@ ;; ;; ;; redo me dat) ;; ;; ;; redo me (sqlite3:finalize! qry)))) ;; ;; ;; redo me (db:close-all dbstruct) ;; ;; ;; redo me (list "uname" "rundir" "final_logf" "comment")) ;; ;; ;; redo me (set! *didsomething* #t))) - - (if (args:get-arg "-import-megatest.db") + +;; TODO: restore this functionality + + #;(if (args:get-arg "-import-megatest.db") (begin (db:multi-db-sync (db:setup #f) 'killservers 'dejunk @@ -2568,11 +2580,11 @@ (when (args:get-arg "-sync-brute-force") ((server:get-bruteforce-syncer (db:setup #t) persist-until-sync: #t)) (set! *didsomething* #t)) - (if (args:get-arg "-sync-to-megatest.db") + #;(if (args:get-arg "-sync-to-megatest.db") (let* ((dbstruct (db:setup #f)) (tmpdbpth (cdr (dbr:dbstruct-tmpdb dbstruct))) (lockfile (conc tmpdbpth ".lock")) (locked (common:simple-file-lock lockfile)) (res (if locked Index: rmtmod.scm ================================================================== --- rmtmod.scm +++ rmtmod.scm @@ -1636,11 +1636,11 @@ ;;====================================================================== ;; Move me elsewhere ... ;; RADT => Why do we meed the version check here, this is called only if version misma ;; -(define (common:cleanup-db dbstruct #!key (full #f)) +#;(define (common:cleanup-db dbstruct #!key (full #f)) (apply db:multi-db-sync dbstruct 'schema ;; 'new2old 'killservers @@ -1720,11 +1720,11 @@ ;;====================================================================== ;; Force a megatest cleanup-db if version is changed and skip-version-check not specified ;; Do NOT check if not on homehost! ;; -(define (common:exit-on-version-changed) +#;(define (common:exit-on-version-changed) (if (common:on-homehost?) (if (common:api-changed?) (let* ((mtconf (conc (get-environment-variable "MT_RUN_AREA_HOME") "/megatest.config")) (dbfile (conc (get-environment-variable "MT_RUN_AREA_HOME") "/megatest.db")) (read-only (not (file-writable? dbfile)))