Overview
Comment: | static html view for a test completed |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | static-html |
Files: | files | file ages | folders |
SHA1: |
2801c444c0296b3185e166251d5c0114 |
User & Date: | matt on 2015-03-01 23:54:45 |
Other Links: | branch diff | manifest | tags |
Context
2015-03-02
| ||
09:45 | Moved steps summary routing out of dcommon to eliminate megatest starting iup library check-in: ec1cb8fa73 user: mrwellan tags: static-html | |
2015-03-01
| ||
23:54 | static html view for a test completed check-in: 2801c444c0 user: matt tags: static-html | |
10:07 | Added more calls to journal checks check-in: 41bdf5fb4a user: matt tags: static-html | |
Changes
Modified Makefile from [0f222a548e] to [322ba28beb].
︙ | |||
102 103 104 105 106 107 108 | 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 | - - - + + + - + | $(INSTALL) $< $@ chmod a+x $@ $(PREFIX)/bin/loadrunner : utils/loadrunner $(INSTALL) $< $@ chmod a+x $@ |
︙ |
Modified api.scm from [ac7d0551a3] to [d0e9fd2609].
︙ | |||
42 43 44 45 46 47 48 49 50 51 52 53 54 55 | 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | + | get-run-name-from-id get-runs get-all-run-ids get-prev-run-ids get-run-ids-matching-target get-runs-by-patt get-steps-data get-steps-for-test login testmeta-get-record have-incompletes? synchash-get )) (define api:write-queries |
︙ | |||
208 209 210 211 212 213 214 215 216 217 218 219 220 221 | 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 | + | ((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)) ;; STEPS ((get-steps-data) (apply db:get-steps-data dbstruct params)) ((get-steps-for-test) (apply db:get-steps-for-test dbstruct params)) ;; MISC ((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))) |
︙ |
Modified db_records.scm from [421af0bc69] to [de0d03e562].
︙ | |||
87 88 89 90 91 92 93 94 95 96 97 98 99 100 | 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | + + + + | (define-inline (db:test-get-archived vec) (vector-ref vec 17)) ;; (define-inline (db:test-get-pass_count vec) (vector-ref vec 15)) ;; (define-inline (db:test-get-fail_count vec) (vector-ref vec 16)) (define-inline (db:test-get-fullname vec) (conc (db:test-get-testname vec) "/" (db:test-get-item-path vec))) ;; replace runs:make-full-test-name with this routine (define (db:test-make-full-name testname itempath) (if (equal? itempath "") testname (conc testname "/" itempath))) (define-inline (db:test-get-first_err vec) (printable (vector-ref vec 15))) (define-inline (db:test-get-first_warn vec) (printable (vector-ref vec 16))) (define-inline (db:test-set-cpuload! vec val)(vector-set! vec 7 val)) (define-inline (db:test-set-diskfree! vec val)(vector-set! vec 8 val)) (define-inline (db:test-set-testname! vec val)(vector-set! vec 2 val)) (define-inline (db:test-set-state! vec val)(vector-set! vec 3 val)) |
︙ | |||
196 197 198 199 200 201 202 203 204 205 206 207 208 209 | 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 | + + | ;; The steps table (define (make-db:steps-table)(make-vector 5)) (define-inline (tdb:steps-table-get-stepname vec) (vector-ref vec 0)) (define-inline (tdb:steps-table-get-start vec) (vector-ref vec 1)) (define-inline (tdb:steps-table-get-end vec) (vector-ref vec 2)) (define-inline (tdb:steps-table-get-status vec) (vector-ref vec 3)) (define-inline (tdb:steps-table-get-runtime vec) (vector-ref vec 4)) (define-inline (tdb:steps-table-get-log-file vec) (vector-ref vec 5)) (define-inline (tdb:step-stable-set-stepname! vec val)(vector-set! vec 0 val)) (define-inline (tdb:step-stable-set-start! vec val)(vector-set! vec 1 val)) (define-inline (tdb:step-stable-set-end! vec val)(vector-set! vec 2 val)) (define-inline (tdb:step-stable-set-status! vec val)(vector-set! vec 3 val)) (define-inline (tdb:step-stable-set-runtime! vec val)(vector-set! vec 4 val)) ;; The data structure for handing off requests via wire |
︙ |
Modified dcommon.scm from [ea99b44dfd] to [fda6c9452e].
︙ | |||
708 709 710 711 712 713 714 715 | 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 | + + + - + + | (cond ((< (tdb:step-get-event_time a)(tdb:step-get-event_time b)) #t) ((eq? (tdb:step-get-event_time a)(tdb:step-get-event_time b)) (< (tdb:step-get-id a) (tdb:step-get-id b))) (else #f))))) res)) ;; temporarily passing in dbstruct to support direct access (i.e. bypassing servers) ;; (define (dcommon:get-compressed-steps dbstruct run-id test-id) (let* ((steps-data (if dbstruct |
︙ |
Modified rmt.scm from [e987c71e97] to [cb7d2c66bf].
︙ | |||
602 603 604 605 606 607 608 | 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 | - - + + - + | ;; If given work area ;; 1. Find the testdat.db file ;; 2. Open the testdat.db file and do the query ;; If not given the work area ;; 1. Do a remote call to get the test path ;; 2. Continue as above ;; |
︙ |
Modified runs.scm from [7912157e2e] to [7e3be6327e].
︙ | |||
479 480 481 482 483 484 485 | 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 | - + - + | "\n can-run-more: " can-run-more) (cond ;; all prereqs met, fire off the test ;; or, if it is a 'toplevel test and all prereqs not met are COMPLETED then launch ((and (not (member 'toplevel testmode)) |
︙ | |||
684 685 686 687 688 689 690 | 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 | - + - + - - + + - + - + | (runs:queue-next-tal tal reg reglen regfull) (runs:queue-next-reg tal reg reglen regfull) reruns) #f)) ;; Register tests ;; |
︙ | |||
742 743 744 745 746 747 748 | 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 | - + - + | ;; This is the final stage, everything is in place so launch the test ;; ((and have-resources (or (null? prereqs-not-met) (and (eq? testmode 'toplevel) (null? non-completed)))) |
︙ | |||
792 793 794 795 796 797 798 | 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 | - + | " from the launch list as it has prerequistes that are FAIL") (let ((test-id (rmt:get-test-id run-id hed ""))) (if test-id (mt:test-set-state-status-by-id run-id test-id "NOT_STARTED" "PREQ_FAIL" "Failed to run due to failed prerequisites"))) (runs:shrink-can-run-more-tests-count) ;; DELAY TWEAKER (still needed?) ;; (thread-sleep! *global-delta*) ;; This next is for the items (mt:test-set-state-status-by-testname run-id test-name item-path "NOT_STARTED" "BLOCKED" #f) |
︙ | |||
915 916 917 918 919 920 921 | 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 | - + | ;; convert state to symbol and use that as the hash value (for-each (lambda (trec) (let ((id (db:test-get-id trec)) (tn (db:test-get-testname trec)) (ip (db:test-get-item-path trec)) (st (db:test-get-state trec))) (if (not (equal? st "DELETED")) |
︙ | |||
948 949 950 951 952 953 954 | 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 | - + - + - + | (if m (map string->symbol (string-split m)) '(normal)))) (itemmap (configf:lookup tconfig "requirements" "itemmap")) (waitons (tests:testqueue-get-waitons test-record)) (priority (tests:testqueue-get-priority test-record)) (itemdat (tests:testqueue-get-itemdat test-record)) ;; itemdat can be a string, list or #f (items (tests:testqueue-get-items test-record)) (item-path (item-list->path itemdat)) |
︙ | |||
1063 1064 1065 1066 1067 1068 1069 | 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 | - + | (for-each (lambda (my-itemdat) (let* ((new-test-record (let ((newrec (make-tests:testqueue))) (vector-copy! test-record newrec) newrec)) (my-item-path (item-list->path my-itemdat))) (if (tests:match test-patts hed my-item-path required: required-tests) ;; (patt-list-match my-item-path item-patts) ;; yes, we want to process this item, NOTE: Should not need this check here! |
︙ | |||
1189 1190 1191 1192 1193 1194 1195 | 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 | - - - - + | (define (runs:pretty-string lst) (map (lambda (t) (if (not (vector? t)) (conc t) (conc (db:test-get-testname t) ":" (db:test-get-state t) "/" (db:test-get-status t)))) lst)) |
︙ | |||
1347 1348 1349 1350 1351 1352 1353 | 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 | - + - + - + | (if (not (launch-test test-id run-id run-info keyvals runname test-conf test-name test-path itemdat flags)) (begin (print "ERROR: Failed to launch the test. Exiting as soon as possible") (set! *globalexitstatus* 1) ;; (process-signal (current-process-id) signal/kill)))))))) ((KILLED) (debug:print 1 "NOTE: " full-test-name " is already running or was explictly killed, use -force to launch it.") |
︙ |
Modified tests.scm from [94bedb2614] to [ae5a39b9a0].
︙ | |||
18 19 20 21 22 23 24 25 26 27 28 29 30 31 | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | + | (require-library stml) (declare (unit tests)) (declare (uses lock-queue)) (declare (uses db)) (declare (uses tdb)) (declare (uses common)) (declare (uses dcommon)) ;; needed for the steps processing (declare (uses items)) (declare (uses runconfig)) ;; (declare (uses sdb)) (include "common_records.scm") (include "key_records.scm") (include "db_records.scm") |
︙ | |||
341 342 343 344 345 346 347 | 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 | - + + | (status (vector-ref testrecord 3)) (run_duration (vector-ref testrecord 4)) (logf (vector-ref testrecord 5)) (comment (vector-ref testrecord 6))) (hash-table-set! counts status (+ 1 (hash-table-ref/default counts status 0))) (hash-table-set! statecounts state (+ 1 (hash-table-ref/default statecounts state 0))) (set! outtxt (conc outtxt "<tr>" |
︙ | |||
393 394 395 396 397 398 399 | 395 396 397 398 399 400 401 402 403 404 405 406 407 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 443 444 445 446 447 448 449 450 451 | + + - + + + + + + + + - + - - + + - - - - - + + + + + + - - + + + + + + + + + + + + + + + + + + + | ))))))) ;; summarize test (define (tests:summarize-test run-id test-id) (let* ((test-dat (rmt:get-test-info-by-id run-id test-id)) (steps-dat (rmt:get-steps-for-test run-id test-id)) (test-name (db:test-get-testname test-dat)) (item-path (db:test-get-item-path test-dat)) (full-name (db:test-make-full-name test-name item-path)) |
︙ |