Changes In Branch v2.0001 Through [829acf0839] Excluding Merge-Ins
This is equivalent to a diff from e80ba42389 to 829acf0839
2022-01-14
| ||
11:08 | Fix to help ulex with connections when buffer isn't filled (and fix merge) check-in: 2e839ecd70 user: jmoon18 tags: v2.0001 | |
08:13 | This combo of (no) mutexes seems to work best but the blocking still happens check-in: 09d825a5e1 user: matt tags: v2.0001 | |
06:25 | Fixed serialize to be compatible with scm check-in: 829acf0839 user: matt tags: v2.0001 | |
2021-12-26
| ||
20:14 | Attempt to switch from nng to ulex check-in: 6c52169286 user: matt tags: v2.0001 | |
2021-12-23
| ||
20:16 | get host name automatically in test Leaf check-in: e80ba42389 user: matt tags: v2.001, Uses-nng-nanomsg | |
19:36 | Fixed typo, added a bit to the test check-in: a0652877c1 user: matt tags: v2.001 | |
Modified Makefile from [89e357068d] to [cae3ebc4c9].
︙ | |||
25 26 27 28 29 30 31 | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | - + - + | # all : $(PREFIX)/bin/.$(ARCHSTR) mtest dboard mtut ndboard all : $(PREFIX)/bin/.$(ARCHSTR) mtest # add dboard mtut and tcmt back later # module source files MSRCFILES = autoload.scm dbi.scm ducttape-lib.scm pkts.scm stml2.scm \ |
︙ | |||
75 76 77 78 79 80 81 | 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | - | mofiles/bigmod.o : mofiles/configfmod.o mofiles/bigmod.o : mofiles/dbmod.o mofiles/bigmod.o : mofiles/rmtmod.o # mofiles/clientmod.o : mofiles/servermod.oibpq-dev mofiles/commonmod.o : megatest-fossil-hash.scm mofiles/commonmod.o : mofiles/configfmod.o mofiles/commonmod.o : mofiles/debugprint.o |
︙ | |||
97 98 99 100 101 102 103 | 96 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 | - + + + + + | mofiles/launchmod.o : mofiles/bigmod.o mofiles/launchmod.o : mofiles/ezstepsmod.o mofiles/launchmod.o : mofiles/rmtmod.o mofiles/servermod.o mofiles/mtmod.o : mofiles/debugprint.o mofiles/portloggermod.o : mofiles/tasksmod.o mofiles/rmtmod.o : mofiles/apimod.o mofiles/rmtmod.o : mofiles/commonmod.o mofiles/portloggermod.o |
︙ |
Modified TODO from [1f8790aebc] to [8c7ba74ce3].
︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | + + + | # along with Megatest. If not, see <http://www.gnu.org/licenses/>. TODO ==== Loose ends ---------- 15:09:29 error in calling find-and-mark-incomplete for run-id 5, exn=#<condition: (exn type)> might be related to initial conditions in the db. (no run entry in runs table?). . -list-servers not correct . move *remotedat* into bigdata . add back server stats on exit (look in rmt:run in rmtmod.scm) WW15 |
︙ |
Modified apimod.scm from [f47a08f057] to [37041542cf].
︙ | |||
27 28 29 30 31 32 33 | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | - + | (module apimod ( api:run-server-process api:start-server api:dispatch-cmd api:execute-requests |
︙ | |||
173 174 175 176 177 178 179 | 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | - - + + + | (logd (conc apath "/logs")) (logf (conc logd "/server-launch-";;(current-process-id) (seconds->year-work-week/day-time-fname (current-seconds)) "-"cleandbname".log")) (logf2 (conc logd "/server-" (seconds->year-work-week/day-time-fname (current-seconds)) "-"cleandbname"-")) |
︙ | |||
372 373 374 375 376 377 378 | 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 | - + | ((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 run-id realparams))) ((sdb-qry) (apply sdb:qry params)) |
︙ | |||
418 419 420 421 422 423 424 | 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 | - + | ;; http-server send-response ;; api:process-request ;; db:* ;; ;; NB// Runs on the server as part of the server loop ;; |
︙ |
Modified build-assist/README from [d108fc0f5b] to [ac3067734e].
| 1 2 3 4 5 6 7 8 9 10 11 12 | - - + - - - - - + - - + - - + - - - + - - - + - - + - - - - + - |
|
Modified build-assist/ck5-eggs.list from [339d250117] to [da39a3ee5e].
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
Added build-assist/ck5-full-eggs.list version [3bac908752].
|
Modified build-assist/iup-compile.sh from [f2fe37f920] to [8fc93bba73].
︙ | |||
13 14 15 16 17 18 19 | 13 14 15 16 17 18 19 20 21 22 23 24 25 | - + - + - | echo " rsync -av include/ $PREFIX/include/" echo " or (depending on versions and what you see in the iup tars - they seem to vary" echo " cp *.a *.so $PREFIX/lib" echo " cp include/*.h $PREFIX/include" echo " 4. run the chicken-install like this:" echo "If you use a wrapper (e.g. ck5) to create the chicken environment:" |
Modified commonmod.scm from [787a13f0a3] to [68c43be7f7].
︙ | |||
22 23 24 25 26 27 28 | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | - + | (declare (uses mtver)) (declare (uses debugprint)) (declare (uses stml2)) (declare (uses pkts)) (declare (uses processmod)) (declare (uses mtargs)) (declare (uses configfmod)) |
︙ | |||
384 385 386 387 388 389 390 391 392 393 394 | 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 | + - | *task-db* *db-access-allowed* *db-access-mutex* *db-transaction-mutex* *db-cache-path* *db-with-db-mutex* *db-api-call-time* *didsomething* *no-sync-db* *my-signature* *transport-type* *logged-in-clients* |
︙ | |||
529 530 531 532 533 534 535 536 537 538 539 540 541 542 | 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 | + + | chicken.io chicken.string chicken.sort chicken.time.posix (prefix base64 base64:) (prefix sqlite3 sqlite3:) address-info directory-utils matchable md5 message-digest regex regex-case sparse-vectors |
︙ | |||
554 555 556 557 558 559 560 | 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 | - + | stml2 pkts processmod (prefix mtargs args:) configfmod keysmod ;; itemsmod |
︙ | |||
923 924 925 926 927 928 929 930 931 932 933 934 935 936 | 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 | + | ;; (define *watchdog* #f) ;; A hash table that can be accessed by #{scheme ...} calls in ;; config files. Allows communicating between confgs ;; (define *user-hash-data* (make-hash-table)) (define *db-keys* #f) (define *didsomething* #f) (define *pkts-info* (make-hash-table)) ;; store stuff like the last parent here (define *configinfo* #f) ;; raw results from setup, includes toppath and table from megatest.config (define *runconfigdat* #f) ;; run configs data (define *configdat* #f) ;; megatest.config data ==> moved to configfmod (define *configstatus* #f) ;; status of data; 'fulldata : all processing done, #f : no data yet, 'partialdata : partial read done (define *toppath* #f) |
︙ | |||
972 973 974 975 976 977 978 | 975 976 977 978 979 980 981 982 983 984 985 986 987 988 | - - | (define *my-signature* #f) (define *transport-type* 'http) ;; override with [server] transport http|rpc|nmsg ;; replaced by *rmt:remote* ;; (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) |
︙ | |||
4341 4342 4343 4344 4345 4346 4347 | 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 | + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | d (begin ;; (if (common:low-noise-print 60 "tests:get-tests-search-path" d) ;; (debug:print 0 *default-log-port* "WARNING: problem with directory " d ", dropping it from tests path")) #f))) (append paths (list (conc *toppath* "/tests")))))) ;;====================================================================== ;; network utilities ;;====================================================================== |
︙ |
Modified dashboard.scm from [feba132a9c] to [4505f63ba6].
︙ | |||
96 97 98 99 100 101 102 103 104 105 106 107 108 109 | 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | + | srfi-1 regex regex-case srfi-69 typed-records sparse-vectors format srfi-4 srfi-14 srfi-18 ) ;; (include "common_records.scm") ;; (include "db_records.scm") ;; (include "run_records.scm") ;; (include "task_records.scm") ;; (include "megatest-version.scm") |
︙ | |||
3639 3640 3641 3642 3643 3644 3645 | 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 | - + | (define (dashboard:do-update-rundat tabdat) (dboard:update-rundat tabdat (hash-table-ref/default (dboard:tabdat-searchpatts tabdat) "runname" "%") (dboard:tabdat-numruns tabdat) (hash-table-ref/default (dboard:tabdat-searchpatts tabdat) "test-name" "%/%") ;; generate key patterns from the target stored in tabdat |
︙ | |||
3752 3753 3754 3755 3756 3757 3758 | 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 | + - + + + + + | (import dashboard) ;; ease debugging by loading ~/.dashboardrc (let ((debugcontrolf (get-debugcontrolf))) (if debugcontrolf (load debugcontrolf))) (import srfi-18) |
Modified dbmod.scm from [f6dcc2b111] to [ac637164a6].
︙ | |||
691 692 693 694 695 696 697 | 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 | + + - + | ;; ;; (mutex-unlock! *db-multi-sync-mutex*) ;; ;; (stack-push! (dbr:dbstruct-dbstack dbstruct) tmpdb))) ;; NOTE: touched logic is disabled/not done ;; sync run to disk if touched ;; (define (db:sync-inmem->disk dbstruct apath dbfile #!key (force-sync #f)) (if #f (debug:print-info 0 *default-log-port* "syncing "*toppath*" "dbfile" at "(current-seconds)) |
︙ | |||
3443 3444 3445 3446 3447 3448 3449 | 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 | - + - - - + | ;; "SELECT count(id) FROM tests WHERE state in ('RUNNING','LAUNCHED','REMOTEHOSTSTART') AND run_id NOT IN (SELECT id FROM runs WHERE state='deleted') AND NOT (uname = 'n/a' AND item_path = '');") "SELECT count(id) FROM tests WHERE state in ('RUNNING','REMOTEHOSTSTART','LAUNCHED') AND run_id=?;" run-id)))) ;; NOT IN (SELECT id FROM runs WHERE state='deleted');") ;; NEW BEHAVIOR: Look only at single run with run-id ;; ;; (define (db:get-running-stats dbstruct run-id) |
︙ |
Modified debugprint.scm from [2f3aa7f0ad] to [e5877ebcfd].
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 | 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 | + + - + | (declare (unit debugprint)) (declare (uses mtargs)) (module debugprint * ;;(import scheme chicken data-structures extras files ports) (import scheme chicken.base chicken.string chicken.time chicken.time.posix chicken.port chicken.process-context chicken.process-context.posix (prefix mtargs args:) srfi-1 system-information ) ;;====================================================================== ;; debug stuff ;;====================================================================== (define verbosity (make-parameter '())) (define *default-log-port* (current-error-port)) |
︙ | |||
107 108 109 110 111 112 113 | 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 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 | + + + + + + + + - + - + - + - + - + - + | (define (debug:handle-remote-logging params) (if (debug:print-logger) ;; NOTE: turn params into string to keep things simple for now ((debug:print-logger)(conc "REMOTE ("(get-host-name)", pid="(current-process-id)") " (string-intersperse (map conc params) " ") "; " (string-intersperse (command-line-arguments) " "))))) (define debug:enable-timestamp (make-parameter #t)) (define (debug:timestamp) (if (debug:enable-timestamp) (conc (time->string (seconds->local-time (current-seconds)) "%H:%M:%S") " ") "")) |
Deleted hostinfo.scm version [e131d5b66f].
| - - - - - - - - - - - - - - - - - - - - - - - |
|
Deleted hostinfo/hostinfo.h version [4f39d60970].
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
Deleted hostinfo/hostinfo.meta version [90c3b6c82d].
| - - - - - - - - - |
|
Deleted hostinfo/hostinfo.scm version [15139d566b].
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
Deleted hostinfo/hostinfo.setup version [94d320c0dc].
| - - - - - - - - - - - |
|
Modified launchmod.scm from [26d43d79a0] to [a3891cff5d].
︙ | |||
1886 1887 1888 1889 1890 1891 1892 | 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 | - + | ;; > 3 RUNNING with not test_dead do nothing (run should already be RUNNING/ na ;; > 0 RUNNING and test_dead then send KILLREQ ==> COMPLETED ;; 0 RUNNING ==> this is actually the first condition, should not get here (define (runs:end-of-run-check run-id ) (let* ((not-completed-cnt (rmt:get-not-completed-cnt run-id)) (running-cnt (rmt:get-count-tests-running-for-run-id run-id)) |
︙ |
Modified megatest.scm from [c1c08ee586] to [97b3fd5fe2].
︙ | |||
17 18 19 20 21 22 23 | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | - + | ;; (declare (uses dbi)) (declare (uses pkts)) (declare (uses stml2)) (declare (uses cookie)) (declare (uses csv-xml)) |
︙ | |||
128 129 130 131 132 133 134 | 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | - + | srfi-98 srfi-69 ;; local modules autoload adjutant csv-xml |
︙ | |||
154 155 156 157 158 159 160 | 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 | - + + - + + + + + + + + + - + | launchmod processmod rmtmod runsmod servermod tasksmod testsmod |
︙ | |||
317 318 319 320 321 322 323 | 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 | - + | newlogf) logpath-in))) (if (not (directory-exists? log-dir)) (system (conc "mkdir -p " log-dir))) (open-output-file logpath)) (exn () (debug:print-error 0 *default-log-port* "Could not open log file for write: "logpath-in) |
︙ | |||
501 502 503 504 505 506 507 | 510 511 512 513 514 515 516 517 518 519 520 521 522 523 | - - - - - - - - | Called as " (string-intersperse (argv) " ") " Version " megatest-version ", built from " megatest-fossil-hash )) (define (main) (make-and-init-bigdata) |
︙ | |||
826 827 828 829 830 831 832 | 827 828 829 830 831 832 833 834 835 836 837 838 839 840 | - - | (exit))) (if (args:get-arg "-version") (begin (print (common:version-signature)) ;; (print megatest-version) (exit))) |
︙ | |||
1065 1066 1067 1068 1069 1070 1071 | 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 | - - + + + + - + | sheetname sectionname varname val))) (sqlite3:finalize! db))) (else (pp data)))))) (if out-file (close-output-port out-port)) (exit) ;; yes, bending the rules here - need to exit since this is a utility )) |
︙ | |||
2636 2637 2638 2639 2640 2641 2642 | 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 | - + | (bdat-time-to-exit-set! *bdat* #t) ) ;;(debug:print-info 13 *default-log-port* "thread-join! watchdog") ;; join the watchdog thread if it has been thread-start!ed (it may not have been started in the case of a server that never enters running state) ;; (symbols returned by thread-state: created ready running blocked suspended sleeping terminated dead) ;; TODO: for multiple areas, we will have multiple watchdogs; and multiple threads to manage |
︙ | |||
2658 2659 2660 2661 2662 2663 2664 | 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 | - - - + + + + + + + | ((1)(exit 1)) ((2)(exit 2)) (else (exit 3))))) ) ) |
Modified pgdb.scm from [33d4965c91] to [d568c66421].
︙ | |||
10 11 12 13 14 15 16 | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | - + | (import scheme chicken.base chicken.condition chicken.string chicken.sort list-utils |
︙ |
Modified rmtmod.scm from [e5bd6bd6c5] to [e895913787].
︙ | |||
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 | 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 | + + + + + | ;; 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/>. ;;====================================================================== ;; generate entries for ~/.megatestrc with the following ;; ;; grep define ../rmt.scm | grep rmt: |perl -pi -e 's/\(define\s+\((\S+)\W.*$/\1/'|sort -u (declare (unit rmtmod)) (declare (uses apimod)) (declare (uses commonmod)) (declare (uses configfmod)) (declare (uses dbmod)) (declare (uses debugprint)) (declare (uses itemsmod)) (declare (uses mtargs)) (declare (uses mtver)) (declare (uses pgdb)) (declare (uses portloggermod)) (declare (uses servermod)) (declare (uses tasksmod)) (declare (uses ulex)) (module rmtmod * (import scheme chicken.base |
︙ | |||
61 62 63 64 65 66 67 | 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | - + | directory-utils format ;; http-client ;; intarweb matchable md5 message-digest |
︙ | |||
94 95 96 97 98 99 100 | 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 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 | - + - - - - - + + - - - - - - - - - + + - - - + + - + + + - + - - - - - - - - + - - - - - + - - - - + - - - + + + - - - + + + - - - - - + + + + + - - + - - - + + + + + + + + + + + + + + + + + + + + + - + - - + - + - + + - + - + + + - + - + - + - - - + + + + + + + + - + - - - - - - - - - - + + + + - + - + - + + + - - - + - - - - + - - - - + + - - - + + + - - - - - - + - - - - - - + + + + + + + + - - - - + - - - + + + + + + - - - + + - - - - - - - - | pgdb pkts portloggermod (prefix mtargs args:) servermod stml2 tasksmod |
︙ | |||
452 453 454 455 456 457 458 | 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 | - + | (define (rmt:kill-server run-id) (rmt:send-receive 'kill-server #f (list run-id))) (define (rmt:start-server run-id) (rmt:send-receive 'start-server #f (list run-id))) |
︙ | |||
1520 1521 1522 1523 1524 1525 1526 | 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 | - + - + - + - + - + - + - + - - - - - - + + + + + + + + + + | (define (common:api-changed?) (not (equal? (substring (->string megatest-version) 0 4) (substring (conc (common:get-last-run-version)) 0 4)))) ;; host and port are used to ensure we are remove proper records (define (rmt:server-shutdown host port) |
︙ | |||
1633 1634 1635 1636 1637 1638 1639 | 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 | - + - - + - + + + + + + + + + + + + - - - - + + + + - - - + - - - + + + - - + - - - - - - - - - - - - - - - + - - - - - - + - - - - - - - - - - - - - - - + + + - - - - - + + - - - - - - - - - + + + + + + + + + - - - + + - - - - - + - - - + - - - - - - - - - - - + + - - + - - - - - - - - - - - - + + - - - - - - - + | ;; 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. ;; ;; conn is a conndat record ;; |
︙ | |||
1822 1823 1824 1825 1826 1827 1828 | 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 | - + + - + | ;; only use for main.db - need to re-write some of this :( ;; (define (get-lock-db sdat dbfile host port) (assert host "FATAL: get-lock-db called with host not set.") (assert port "FATAL: get-lock-db called with port not set.") (let* ((dbh (db:open-run-db dbfile db:initialize-db)) ;; open-run-db creates a standard db with schema used by all situations |
︙ | |||
1862 1863 1864 1865 1866 1867 1868 | 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 | + + + - + - - - - - - + + + + + + + + - - + + - + + - + - + + - + | (let* ((effective-toppath (or *toppath* apath))) (assert effective-toppath "ERROR: get-pkts-dir called without *toppath* set. Exiting.") (let* ((pdir (conc effective-toppath "/.meta/srvpkts"))) (if (file-exists? pdir) pdir (begin (handle-exceptions ;; this exception handler should NOT be needed but ... exn pdir |
︙ | |||
1975 1976 1977 1978 1979 1980 1981 | 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 | - + - + - + - + - + | ;;====================================================================== ;; END NEW SERVER METHOD ;;====================================================================== ;; if .db/main.db check the pkts ;; (define (rmt:wait-for-server pkts-dir db-file server-key) |
︙ | |||
2051 2052 2053 2054 2055 2056 2057 | 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 | - - - - + + + + - - - - + + + + - + - - - + + - + - - - + + + - + - + - + - + - + - - + + - + - - + + + - + - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + - + - + + + - - - - + - - + + + + + + + - + - - - + + - - + + - + - - - + - | (begin (debug:print-error 0 *default-log-port* "transport appears to have died, exiting server") (exit)) (loop start-time (equal? sdat last-sdat) sdat)))))))) |
︙ | |||
2324 2325 2326 2327 2328 2329 2330 | 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 | - - - - - - - - - - - - - - - + - + - + | (if (string-search (regexp (conc ":" port-num)) inl) (begin ;(print "Output: " inl) (set! ret #t)) (loop (read-line inp))))))) ret)) |
︙ | |||
2388 2389 2390 2391 2392 2393 2394 | 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 | - + | ;; (thread-terminate! th1)) ;; "timer thread"))) ;; (thread-start! th1) ;; (thread-start! th2) ;; (thread-join! th1) ;; res)))) ;; |
︙ |
Modified runsmod.scm from [e0bbf25b11] to [b535942743].
︙ | |||
497 498 499 500 501 502 503 | 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 | - + | ;; Ensure all tests are registered in the test_meta table (runs:update-all-test_meta #f) ;; run the run prehook if there are no tests yet run for this run: ;; (runs:run-pre-hook run-id) ;; mark all test launched flag as false in the meta table |
︙ | |||
1707 1708 1709 1710 1711 1712 1713 | 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 | - + | (debug:print-info 0 *default-log-port* "Have leftovers!") (loop (car reg)(cdr reg) '() reruns)) (else (debug:print-info 4 *default-log-port* "cond branch - " "rtq-9") (debug:print-info 4 *default-log-port* "Exiting loop with...\n hed=" hed "\n tal=" tal "\n reruns=" reruns)) ))) ;; end loop on sorted test names ;; this is the point where everything is launched and now you can mark the run in metadata table as all launched |
︙ | |||
2554 2555 2556 2557 2558 2559 2560 | 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 | - + + | (debug:print-error 0 *default-log-port* "Attempted to " action-desc " but run area config file not found") (exit 1)) ;; Extract out stuff needed in most or many calls ;; here then call proc (let* ((keyvals (keys:target->keyval keys target))) (proc target runname keys keyvals))) ;; (if db (sqlite3:finalize! db)) |
︙ |
Added rununit.sh version [0dba7a0924].
|
Modified serialize-env.scm from [f4955b88d5] to [cdbc1fa795].
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | - + - + - + + |
|
Modified tests/simplerun/Makefile from [38acf6b450] to [115e15e0c2].
1 2 | 1 2 3 4 5 | - + + + | cleanup : |
Added tests/simplerun/debug.scm version [6634dce456].
|
Modified tests/simplerun/megatest.config from [3e9fa2e5ac] to [e6118ecde2].
︙ | |||
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 52 | + + + - + | 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/tests.scm from [7467445dd0] to [be8860baa4].
︙ | |||
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | + + + + | (import srfi-18 test chicken.string chicken.process-context chicken.file chicken.pretty-print commonmod ulex ) (define test-work-dir (current-directory)) (work-method 'mailbox) ;; threads, direct, mailbox (return-method 'mailbox) ;; polling, mailbox, direct ;; given list of lists ;; ( ( msg expected param1 param2 ...) ;; ( ... ) ) ;; apply test to all ;; (define (test-batch proc pname inlst #!key (post-proc #f)) |
︙ | |||
47 48 49 50 51 52 53 54 55 56 57 58 59 60 | 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | + + + + + + + + + + | ;; read in all the _record files ;; (let ((files (glob "*_records.scm"))) ;; (for-each ;; (lambda (file) ;; (print "Loading " file) ;; (load file)) ;; files)) (define-syntax run-in-thread (syntax-rules () ((_ body ...) (let ((th1 (make-thread (lambda () body ...) "the thread"))) (thread-start! th1) (thread-join! th1))))) (let* ((unit-test-name (list-ref (argv) 4)) (fname (conc "../unittests/" unit-test-name ".scm"))) (if (file-exists? fname) (load fname) (print "ERROR: Unit test " unit-test-name " not found in unittests directory"))) |
Modified tests/unittests/all-rmt.scm from [3a8e222d0c] to [170e763023].
︙ | |||
89 90 91 92 93 94 95 | 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | - - - + + + + + | ;; (test-batch rmt:get-latest-host-load ;; "rmt:get-latest-host-load" ;; (list (list "localhost" #t (get-host-name)) ;; (list "not-a-host" #t "not-a-host" )) ;; post-proc: pair?) ;; ;; (test #f #t (list? (rmt:get-changed-record-ids 0))) |
︙ | |||
144 145 146 147 148 149 150 | 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 | - + | (test #f #t (vector? (rmt:get-runs "%" 10 0 keypatts))) (test #f '(1)(rmt:get-all-run-ids)) (test #f '()(rmt:get-prev-run-ids 1)) (test #f #t (begin (rmt:lock/unlock-run 1 #t #f "mikey") #t)) (test #f "JUSTFINE" (rmt:get-run-status 1)) (test #f #t (begin (rmt:set-run-status 1 "NOTFINE" msg: "A message") #t)) (test #f #t (begin (rmt:update-run-event_time 1) #t)) |
︙ |
Modified tests/unittests/basicserver.scm from [0bda564ab1] to [7886f1227c].
︙ | |||
19 20 21 22 23 24 25 | 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 | - + + + + + + + + - - - - - - - - + + + + + + + + + + + + + + + + - - + + + - - - - - - - - + + + - - - - + + - + - - | ;; along with Megatest. If not, see <http://www.gnu.org/licenses/>. ;; Run like this: ;; ;; ./rununittest.sh server 1;(cd simplerun;megatest -stop-server 0) (import rmtmod trace http-client apimod dbmod |
Modified tests/unittests/server.scm from [70755134bd] to [49807e069f].
︙ | |||
51 52 53 54 55 56 57 | 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 | - + - - - + + + + - - + - + - + | ) (define *db* (db:setup ".db/main.db")) ;; these let me cut and paste from source easily (define apath *toppath*) (define dbname ".db/2.db") |
︙ |
Added ulex-simple/ulex.scm version [3fd48eb90f].