Overview
Comment: | Updates to simplerun from v2.0001 branch, multi-db beginnings. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | v1.70001-multi-db-rebased |
Files: | files | file ages | folders |
SHA1: |
0f90afb706b7955fc759c7f522562e0f |
User & Date: | matt on 2022-02-27 18:26:35 |
Other Links: | branch diff | manifest | tags |
Context
2022-02-27
| ||
20:21 | wip check-in: 45bc17bcaf user: matt tags: v1.70001-multi-db-rebased | |
18:26 | Updates to simplerun from v2.0001 branch, multi-db beginnings. check-in: 0f90afb706 user: matt tags: v1.70001-multi-db-rebased | |
2022-02-25
| ||
15:03 | fixed the handling of step status in ezsteps. Esp WARN vs ABORT. Handled all logpro statuses symmetrically. check-in: bcc775d437 user: mmgraham tags: v1.65 | |
Changes
Modified common.scm from [526a2263d9] to [b30cfc533e].
︙ | |||
977 978 979 980 981 982 983 984 985 986 987 988 989 990 | 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 | + + + + | (string-translate *toppath* "/" ".")) (conc "/tmp/" (current-process-id) ;; just in case we have an issue with the dir by own user name "/megatest_localdb/" tsname (string-translate *toppath* "/" ".")) )))) (set! *db-cache-path* dbpath) ;; ensure megatest area has .db (let ((dbarea (conc *toppath* "/.db"))) (if (not (file-exists? dbarea)) (create-directory dbarea))) dbpath)) #f))) (define (common:get-area-path-signature) (message-digest-string (md5-primitive) *toppath*)) (define (common:get-signature str) |
︙ | |||
1043 1044 1045 1046 1047 1048 1049 | 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 | - + | (debug:print-info 13 *default-log-port* "after db:setup with dbstruct=" dbstruct) (cond ((dbr:dbstruct-read-only dbstruct) (debug:print-info 13 *default-log-port* "loading read-only watchdog") (common:readonly-watchdog dbstruct)) (else (debug:print-info 13 *default-log-port* "loading writable-watchdog.") |
︙ |
Modified db.scm from [65246b91b8] to [3e4a888113].
︙ | |||
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 | 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 | + + + | (use (srfi 18) extras tcp stack) (use sqlite3 srfi-1 posix regex regex-case srfi-69 csv-xml s11n md5 message-digest base64 format dot-locking z3 typed-records matchable) (import (prefix sqlite3 sqlite3:)) (import (prefix base64 base64:)) (declare (unit db)) (declare (uses common)) (declare (uses dbmod)) (declare (uses keys)) (declare (uses ods)) (declare (uses client)) (declare (uses mt)) (include "common_records.scm") (include "db_records.scm") (include "key_records.scm") (include "run_records.scm") (define *number-of-writes* 0) (define *number-non-write-queries* 0) (import dbmod) ;;====================================================================== ;; R E C O R D S ;;====================================================================== ;; each db entry is a pair ( db . dbfilepath ) ;; I propose this record evolves into the area record |
︙ | |||
129 130 131 132 133 134 135 136 137 138 139 | 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 | + - + + - + + - + | (print-call-chain (current-error-port)) default))) (apply sqlite3:first-result db stmt params))) ;; Get/open a database ;; if run-id => get run specific db ;; if #f => get main db ;; if run-id is a string treat it as a filename ;; if db already open - return inmem ;; if db not open, open inmem, rundb and sync then return inmem ;; inuse gets set automatically for rundb's ;; |
︙ | |||
168 169 170 171 172 173 174 | 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 | - + | ;; (db:with-db dbstruct run-id sqlite3:exec "select blah fgrom blaz;") ;; r/w is a flag to indicate if the db is modified by this query #t = yes, #f = no ;; (define (db:with-db dbstruct run-id r/w proc . params) (let* ((have-struct (dbr:dbstruct? dbstruct)) (dbdat (if have-struct |
︙ | |||
313 314 315 316 317 318 319 | 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 | - + + - + - - + - - + - - - - - - + + + + + + + + + + + + - - + + - - + + | (exn (permission)(debug:print 0 *default-log-port* "ERROR: database " fname " has some permissions problem.")) (exn () (debug:print 0 *default-log-port* "ERROR: Unknown error with database " fname " message: " ((condition-property-accessor 'exn 'message) exn)))) ))) ;; This routine creates the db if not already present. It is only called if the db is not already opened ;; |
︙ | |||
397 398 399 400 401 402 403 | 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 | - + - + - - - + - + - - | (else ;;(common:on-homehost?) (debug:print-info 13 *default-log-port* "db:setup entered (first time, not cached.)") (let* ((dbstruct (make-dbr:dbstruct))) (when (not *toppath*) (debug:print-info 13 *default-log-port* "in db:setup, *toppath* not set; calling launch:setup") (launch:setup areapath: areapath)) (debug:print-info 13 *default-log-port* "Begin db:open-db") |
︙ | |||
1133 1134 1135 1136 1137 1138 1139 1140 | 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 | + + + + + - - - - - - + + + + + + + + + + + + | (db:patch-schema-rundb (db:dbdat-get-db tmpdb)) (db:patch-schema-rundb (db:dbdat-get-db refndb)))) (stack-push! (dbr:dbstruct-dbstack dbstruct) tmpdb)) options) data-synced)) ;; Sync all changed db's ;; (define (db:tmp->megatest.db-sync dbstruct last-update) (let* ((all-dbs (cons "main.db" (glob (conc (db:dbfile-path)"/[0-9]*.db"))))) (for-each (lambda (dbname) |
︙ |
Modified megatest-version.scm from [5941e8f016] to [6b14cbfe0a].
︙ | |||
16 17 18 19 20 21 22 | 16 17 18 19 20 21 22 23 | - + | ;; along with Megatest. If not, see <http://www.gnu.org/licenses/>. ;; Always use two or four digit decimal ;; 1.01, 1.02...1.10,1.11,1.1101 ... 1.99,2.00.. ;; (declare (unit megatest-version)) |
Modified megatest.scm from [35ed864745] to [841d3d78b0].
︙ | |||
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | + + + + + | (declare (uses tdb)) (declare (uses mt)) (declare (uses api)) (declare (uses tasks)) ;; only used for debugging. (declare (uses env)) (declare (uses diff-report)) (declare (uses dbmod)) (declare (uses dbmod.import)) ;; (declare (uses ftail)) ;; (import ftail) (import dbmod) (define *db* #f) ;; this is only for the repl, do not use in general!!!! (include "common_records.scm") (include "key_records.scm") (include "db_records.scm") (include "run_records.scm") |
︙ |
Added tests/simplerun/Makefile version [115e15e0c2].
|
Added tests/simplerun/debug.scm version [1bee670fb9].
|
Modified tests/simplerun/megatest.config from [373cc8c0cf] to [8e9ed1a8b8].
︙ | |||
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | 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 | + + - - + + | SYSTEM TEXT RELEASE TEXT [setup] # Adjust max_concurrent_jobs to limit how much you load your machines max_concurrent_jobs 50 [server] timeout 3600 # Uncomment this to make the in-mem db into a disk based db (slower but good for debug) # be aware that some unit tests will fail with this due to persistent data # # tmpdb /tmp # This is your link path, you can move it but it is generally better to keep it stable linktree #{getenv MT_RUN_AREA_HOME}/../simplelinks # Valid values for state and status for steps, NB// It is not recommended you use this [validvalues] state start end completed # Job tools are more advanced ways to control how your jobs are launched [jobtools] |
Modified tests/simplerun/tests/test1/testconfig from [db2c27ffef] to [b9db33e554].
︙ | |||
22 23 24 25 26 27 28 | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | - + | # Test requirements are specified here [requirements] # waiton setup priority 0 # Iteration for your tests are controlled by the items section |
︙ |