Overview
Comment: | partial recovery of rpc mechanism |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | test-specific-db |
Files: | files | file ages | folders |
SHA1: |
541cc327b6d978624cf42d2258665f85 |
User & Date: | mrwellan on 2012-10-01 17:32:30 |
Other Links: | branch diff | manifest | tags |
Context
2012-10-01
| ||
21:48 | Added correct exit back for non-server mode check-in: 4111a3bf40 user: matt tags: test-specific-db | |
17:32 | partial recovery of rpc mechanism check-in: 541cc327b6 user: mrwellan tags: test-specific-db | |
2012-09-30
| ||
23:28 | bumped version check-in: 9d1014508a user: fdk71adm tags: test-specific-db | |
Changes
Modified db.scm from [b3c7d02de9] to [50c1ee9122].
︙ | |||
83 84 85 86 87 88 89 | 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | - + | (set! res (apply proc db params)) (if (not idb)(sqlite3:finalize! db)) res)))) (handle-exceptions exn (begin (debug:print 0 "EXCEPTION: database probably overloaded?") |
︙ | |||
590 591 592 593 594 595 596 | 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 | - + | final-res))))) ;; The target is keyval1/keyval2..., cached in *target* as it is used often (define (db:get-target db run-id) (let ((mytarg (hash-table-ref/default *target* run-id #f))) (if mytarg mytarg |
︙ | |||
1009 1010 1011 1012 1013 1014 1015 | 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 | - + - + - + + - + - + - - + - - + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | qrystr) res)) ;;====================================================================== ;; QUEUE UP META, TEST STATUS AND STEPS ;;====================================================================== |
︙ | |||
1188 1189 1190 1191 1192 1193 1194 | 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 | - + - + | '()))) (define (db:load-test-data db test-id) (let loop ((lin (read-line))) (if (not (eof-object? lin)) (begin (debug:print 4 lin) |
︙ | |||
1521 1522 1523 1524 1525 1526 1527 | 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ;; (db:extract-ods-file db "outputfile.ods" '(("sysname" "%")("fsname" "%")("datapath" "%")) "%") ;;====================================================================== ;; REMOTE DB ACCESS VIA RPC ;;====================================================================== |
Modified launch.scm from [203b993021] to [372d06f4be].
︙ | |||
91 92 93 94 95 96 97 98 99 100 101 102 103 104 | 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | + + + | (change-directory top-path) (if (not (setup-for-run)) (begin (debug:print 0 "Failed to setup, exiting") ;; (sqlite3:finalize! db) ;; (sqlite3:finalize! tdb) (exit 1))) ;; Can setup as client for server mode now (server:client-setup) (change-directory *toppath*) (open-run-close set-megatest-env-vars #f run-id) ;; these may be needed by the launching process (change-directory work-area) (open-run-close set-run-config-vars #f run-id) ;; environment overrides are done *before* the remaining critical envars. (alist->env-vars env-ovrd) |
︙ | |||
241 242 243 244 245 246 247 | 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 | - - - - - - - - - | (inexact->exact (round (- (current-seconds) start-seconds))))) (kill-tries 0)) (let loop ((minutes (calc-minutes))) |
︙ | |||
291 292 293 294 295 296 297 | 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 | - - - - - - - - - - - | (th1 (make-thread monitorjob)) (th2 (make-thread runit))) (set! job-thread th2) (thread-start! th1) (thread-start! th2) (thread-join! th2) (mutex-lock! m) |
︙ |
Modified megatest.scm from [95fcbb68a8] to [ba111cbf36].
︙ | |||
269 270 271 272 273 274 275 | 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 | - - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | (operate-on 'set-state-status)))) ;;====================================================================== ;; Query runs ;;====================================================================== (if (args:get-arg "-list-runs") |
︙ | |||
475 476 477 478 479 480 481 | 470 471 472 473 474 475 476 477 478 479 480 481 482 483 | - - - - - - | (begin (debug:print 0 "ERROR: -target is required.") (exit 1))) (if (not (setup-for-run)) (begin (debug:print 0 "Failed to setup, giving up on -test-paths or -test-files, exiting") (exit 1))) |
︙ | |||
606 607 608 609 610 611 612 | 595 596 597 598 599 600 601 602 603 604 605 606 607 608 | - - - - - - | (status (args:get-arg ":status")) (logfile (args:get-arg "-setlog"))) (change-directory testpath) (if (not (setup-for-run)) (begin (debug:print 0 "Failed to setup, exiting") (exit 1))) |
︙ | |||
648 649 650 651 652 653 654 | 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 | - - - - + + + + - - | (state (args:get-arg ":state")) (status (args:get-arg ":status"))) (change-directory testpath) (if (not (setup-for-run)) (begin (debug:print 0 "Failed to setup, exiting") (exit 1))) |
︙ | |||
730 731 732 733 734 735 736 | 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 | - + + - - - - - - | (not status))) (begin (debug:print 0 "ERROR: You must specify :state and :status with every call to -test-status\n" help) ;; (sqlite3:finalize! db) (exit 6))) (let ((msg (args:get-arg "-m"))) ;; Convert to rpc |
︙ | |||
796 797 798 799 800 801 802 | 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 | - - - - - - - | (if (args:get-arg "-update-meta") (begin (if (not (setup-for-run)) (begin (debug:print 0 "Failed to setup, exiting") (exit 1))) ;; now can find our db |
︙ |
Modified runs.scm from [e8b32cf957] to [985ca1292d].
︙ | |||
521 522 523 524 525 526 527 | 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 | - + | ;; we get here on "drop through" - loop for next test in queue (if (null? tal) (begin ;; FIXME!!!! THIS SHOULD NOT REQUIRE AN EXIT!!!!!!! (debug:print 1 "INFO: All tests launched") (thread-sleep! 0.5) ;; FIXME! This harsh exit should not be necessary.... |
︙ | |||
795 796 797 798 799 800 801 | 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 | - - + - + - - - | (else (let ((db #f) (keys #f)) (if (not (setup-for-run)) (begin (debug:print 0 "Failed to setup, exiting") (exit 1))) |
︙ |
Modified server.scm from [3dd064bd19] to [57e8a67dda].
︙ | |||
32 33 34 35 36 37 38 | 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 100 | + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + - - - - - - - + - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - + + + + + + + + + + | (apply (eval (string->symbol procstr)) params)) ;; (if *runremote* ;; (apply (eval (string->symbol (conc "remote:" procstr))) params) (apply (eval (string->symbol procstr)) params))) (define (server:start db hostn) (debug:print 0 "Attempting to start the server ...") (let ((host:port (db:get-var db "SERVER"))) ;; do whe already have a server running? (if host:port (set! *runremote* #t) |
︙ | |||
295 296 297 298 299 300 301 | 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 | - + - - - + + + - + + + + + | exn (begin (print "Failed to bind to port " (rpc:default-server-port) ", trying next port") (server:find-free-port-and-open (+ port 1))) (rpc:default-server-port port) (tcp-listen (rpc:default-server-port)))) |
Modified tests.scm from [015515b8a1] to [35c75741ff].
︙ | |||
108 109 110 111 112 113 114 | 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | - + - + | ;; this test is younger, store it in the hash (hash-table-set! tests-hash full-testname testdat)))) results) (if (null? tal) (map cdr (hash-table->alist tests-hash)) ;; return a list of the most recent tests (loop (car tal)(cdr tal)))))))))) |
︙ | |||
136 137 138 139 140 141 142 | 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 | + - - + + - + | #f)) #f))) (if waived (set! real-status "WAIVED")) (debug:print 4 "real-status " real-status ", waived " waived ", status " status) ;; update the primary record IF state AND status are defined (if (and state status) ;; (rdb:open-run-close 'cdb:test-set-state-status #f test-id real-status state)) ;; this one works |
︙ | |||
175 176 177 178 179 180 181 | 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 | - + - + - + | variable "," value "," expected "," tol "," units "," dcomment ",," ;; extra comma for status type ))) |
︙ |
Modified tests/Makefile from [bc9090b62c] to [53526c0eed].
︙ | |||
18 19 20 21 22 23 24 | 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 | + - + + + - - - - - - + + + + + + | test2 : fullprep cd fullrun;$(MEGATEST) -runtests ez_pass -reqtarg ubuntu/nfs/none :runname $(RUNNAME)_a $(SERVER) test3 : fullprep cd fullrun;$(MEGATEST) -runtests runfirst -reqtarg ubuntu/nfs/none :runname $(RUNNAME)_b $(SERVER) -debug 10 test4 : fullprep cd fullrun;$(MEGATEST) $(SERVER) & |
︙ |