Overview
Comment: | completed diff report feature |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | v1.63-xor-report |
Files: | files | file ages | folders |
SHA1: |
118224962bb5bce6c8898ccc27afd6ad |
User & Date: | bjbarcla on 2017-01-31 17:47:27 |
Other Links: | branch diff | manifest | tags |
Context
2017-02-01
| ||
13:49 | enahnced -log so it will create leading directory if specified check-in: e984e41fb4 user: bjbarcla tags: v1.63-xor-report | |
2017-01-31
| ||
17:47 | completed diff report feature check-in: 118224962b user: bjbarcla tags: v1.63-xor-report | |
2017-01-25
| ||
17:11 | made yougest-db error message more useful check-in: e58c0e3fb7 user: bjbarcla tags: v1.63 | |
12:55 | diff report presentation complete. CLI in progress check-in: 234b912257 user: bjbarcla tags: v1.63-xor-report | |
Changes
Modified Makefile from [629c3de1dd] to [938e693517].
︙ | |||
8 9 10 11 12 13 14 | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | - + | ods.scm runconfig.scm server.scm configf.scm \ db.scm keys.scm margs.scm megatest-version.scm \ process.scm runs.scm tasks.scm tests.scm genexample.scm \ http-transport.scm filedb.scm \ client.scm synchash.scm daemon.scm mt.scm \ ezsteps.scm lock-queue.scm sdb.scm \ rmt.scm api.scm tdb.scm rpc-transport.scm \ |
︙ |
Modified common.scm from [7eb7ab294e] to [040477db58].
︙ | |||
819 820 821 822 823 824 825 | 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 | - + | (define (common:args-get-status) (or (args:get-arg "-status")(args:get-arg ":status"))) (define (common:args-get-testpatt rconf) (let* ((tagexpr (args:get-arg "-tagexpr")) (tags-testpatt (if tagexpr (string-join (runs:get-tests-matching-tags tagexpr) ",") #f)) |
︙ |
Modified dashboard.scm from [233c496696] to [29cdcf21f3].
︙ | |||
515 516 517 518 519 520 521 | 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 | - + - - - - - + | ;; gets all the tests for run-id that match testnamepatt and key-vals, merges them ;; ;; NOTE: Yes, this is used ;; (define (dboard:get-tests-for-run-duplicate tabdat run-id run testnamepatt key-vals) (let* ((start-time (current-seconds)) (access-mode (dboard:tabdat-access-mode tabdat)) |
︙ | |||
585 586 587 588 589 590 591 | 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 | - + | (dboard:rundat-last-db-time-set! run-dat (- start-time 2))) ;; to limit the amount of data transferred each cycle use limit of num-to-get and offset ;; DO NOT bump time indexes last-update and last-db-time until all the first pass of the ;; data has been read ;; set last-update to 0 if still getting data incrementally ;; NO NEED, handled above ;; |
︙ | |||
2712 2713 2714 2715 2716 2717 2718 | 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 | - + | ;; Force creation of the db in case it isn't already there. (tasks:open-db) (define (dashboard:get-youngest-run-db-mod-time dbdir) (handle-exceptions exn (begin |
︙ |
Modified db.scm from [abd06b4b08] to [a6e4ada759].
︙ | |||
140 141 142 143 144 145 146 | 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | - + | (db (if have-struct (db:dbdat-get-db dbdat) dbstruct)) (use-mutex (> *api-process-request-count* 25))) (if (and use-mutex (common:low-noise-print 120 "over-50-parallel-api-requests")) (debug:print-info 0 *default-log-port* *api-process-request-count* " parallel api requests being processed in process " (current-process-id) ", throttling access")) |
︙ |
Modified diff-report.scm from [7e5991ad84] to [44fb509d7c].
| 1 2 3 4 5 6 7 8 9 10 11 12 13 | - - - - + + - - - + + - - + - - - - - - - |
|
︙ | |||
132 133 134 135 136 137 138 139 140 141 142 143 144 145 | 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 | + + + + + + + + + + + + + + + + + | (define (diff:run-name->run-id run-name) (if (number? run-name) run-name (let* ((qry-res (rmt:get-runs run-name 1 0 '()))) (if (eq? 2 (vector-length qry-res)) (vector-ref (car (vector-ref qry-res 1)) 1) #f)))) (define (diff:target+run-name->run-id target run-name) (let* ((keys (rmt:get-keys)) (target-parts (if target (string-split target "/") (map (lambda (x) "%") keys)))) (if (not (eq? (length keys) (length keys))) (begin (print "Error: Target ("target") item count does not match fields count target tokens="target-parts" fields="keys) #f) (let* ((target-map (zip keys target-parts)) (qry-res (rmt:get-runs run-name 1 0 target-map))) (if (eq? 2 (vector-length qry-res)) (let ((first-ent (vector-ref qry-res 1))) (if (> (length first-ent) 0) (vector-ref (car first-ent) 1) #f)) #f))))) (define (diff:run-id->tests-mindat run-id #!key (testpatt "%/%")) (let* ((states '()) (statuses '()) (offset #f) (limit #f) (not-in #t) |
︙ | |||
199 200 201 202 203 204 205 206 207 208 209 210 211 212 | 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 | + + + + | (let* ((diff-states (list "CLEAN" "BETTER" "WORSE" "BOTH-BAD" "NOT-IN-DEST" "NOT-IN-SRC" ))) (map (lambda (state) (list state (length (diff:rundiff-find-by-state run-diff state)))) diff-states))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Presentation code below, business logic above ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (define (diff:stml->string in-stml) (with-output-to-string (lambda () (s:output-new (current-output-port) in-stml)))) |
︙ | |||
258 259 260 261 262 263 264 | 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 | - + + + + + - + + + | (info-hash (alist->hash-table (map (lambda (x) (cons (car x) (cadr x))) ; make it a useful hash (zip (vector-ref runinfo 0) (vector->list (vector-ref runinfo 1)))))) (run-name (hash-table-ref/default info-hash "runname" "N/A")) (start-time (hash-table-ref/default info-hash "event_time" 0))) (list target run-name start-time))) |
︙ | |||
326 327 328 329 330 331 332 | 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 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 | - - + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - - + - - + + - - + + + + + + + + + + + + - + | (diff:diff-state-status->diff-report-cell diff-state diff-status))) (else ""))) (filter (lambda (run-diff-item) (match run-diff-item ((test-name item-path (junk-id diff-state diff-status (src-test-id src-state src-status) (dest-test-id dest-state dest-status))) (not (equal? diff-state "CLEAN"))) (else #f))) |
Modified ducttape/ducttape-lib.scm from [e6c61f0839] to [07138d2aca].
︙ | |||
493 494 495 496 497 498 499 | 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 | - + + + | (define (sendmail to_addr subject body #!key (from_addr "admin") cc_addr bcc_addr more-headers use_html |
︙ | |||
529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 | 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 | + - - + + + + + + + + + + | (wl "MIME-Version: 1.0") (wl (conc "Content-Type: multipart/mixed; boundary=\"" mailpart-uuid "\"")) (wl "") (boundary) (wl (conc "Content-Type: multipart/alternative; boundary=\"" mailpart-body-uuid "\"")) (wl "") ) (define (email-text-body) (body-boundary) (wl "Content-Type: text/plain; charset=ISO-8859-1") (wl "Content-Disposition: inline") (wl "") (wl body) (body-boundary)) (define (email-html-body) (body-boundary) (wl "Content-Type: text/plain; charset=ISO-8859-1") (wl "") (wl "You need to enable HTML option for email") (body-boundary) (wl "Content-Type: text/html; charset=ISO-8859-1") (wl "Content-Disposition: inline") (wl "") (wl body) (body-boundary)) |
︙ |
Modified ducttape/test_ducttape.scm from [b48b7cef02] to [be9cb91086].
︙ | |||
110 111 112 113 114 115 116 117 118 119 120 121 122 123 | 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | + + | "misc" (let ((tmpfile (mktemp))) (test-assert "mktemp: temp file created" (file-exists? tmpfile)) (if (file-exists? tmpfile) (delete-file tmpfile)) ))) (define (test-systemstuff) (test-group "system commands" (let-values (((ec o e) (isys (find-exe "true")))) (test-assert "isys: /bin/true should have exit code 0" (equal? ec 0))) |
︙ | |||
333 334 335 336 337 338 339 | 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 | - + + + + + + + + + | (test-argprocessor) (test-systemstuff) (test-misc) (test-wwdate) ) ; end main() (main) |
Modified megatest-version.scm from [0bfef35cf2] to [bca0c2d1c1].
1 2 3 4 5 | 1 2 3 4 5 6 7 | - + | ;; 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 [ba3fdf979e] to [432cf9f86e].
︙ | |||
41 42 43 44 45 46 47 48 49 50 51 52 53 54 | 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | + | ;; (declare (uses dcommon)) (declare (uses tdb)) (declare (uses mt)) (declare (uses api)) (declare (uses tasks)) ;; only used for debugging. (declare (uses env)) (declare (uses diff-report)) (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") |
︙ | |||
65 66 67 68 69 70 71 72 73 74 75 76 77 78 | 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | + | (define help (conc " Megatest, documentation at http://www.kiatoa.com/fossils/megatest version " megatest-version " license GPL, Copyright Matt Welland 2006-2015 Usage: megatest [options] -h : this help -manual : show the Megatest user manual -version : print megatest version (currently " megatest-version ") Launching and managing runs -runall : run all tests or as specified by -testpatt -remove-runs : remove the data for a run, requires -runname and -testpatt Optionally use :state and :status -set-state-status X,Y : set state to X and status to Y, requires controls per -remove-runs |
︙ | |||
91 92 93 94 95 96 97 | 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | - + | Selectors (e.g. use for -runtests, -remove-runs, -set-state-status, -list-runs etc.) -target key1/key2/... : run for key1, key2, etc. -reqtarg key1/key2/... : run for key1, key2, etc. but key1/key2 must be in runconfig -testpatt patt1/patt2,patt3/... : % is wildcard -runname : required, name for this particular test run -state : Applies to runs, tests or steps depending on context -status : Applies to runs, tests or steps depending on context |
︙ | |||
172 173 174 175 176 177 178 179 180 181 182 183 184 185 | 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 | + + + + + + + + | multiple sheets) -o : output file for refdb2dat (defaults to stdout) -archive cmd : archive runs specified by selectors to one of disks specified in the [archive-disks] section. cmd: keep-html, restore, save, save-remove -generate-html : create a simple html tree for browsing your runs Diff report -diff-rep : generate diff report (must include -src-target, -src-runname, -target, -runname and either -diff-email or -diff-html) -src-target <target> -src-runname <target> -diff-email <emails> : comma separated list of email addresses to send diff report -diff-html <rep.html> : path to html file to generate Spreadsheet generation -extract-ods fname.ods : extract an open document spreadsheet from the database -pathmod path : insert path, i.e. path/runame/itempath/logfile.html will clear the field if no rundir/testname/itempath/logfile if it contains forward slashes the path will be converted to windows style Getting started |
︙ | |||
210 211 212 213 214 215 216 | 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 | - + | "-runname" ":state" "-state" ":status" "-status" "-list-runs" "-testpatt" |
︙ | |||
264 265 266 267 268 269 270 271 272 273 274 275 276 277 | 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 | + + + + + | "-archive" "-since" "-fields" "-recover-test" ;; run-id,test-id - used internally to recover a test stuck in RUNNING state "-sort" "-target-db" "-source-db" "-src-target" "-src-runname" "-diff-email" "-diff-html" ) (list "-h" "-help" "--help" "-manual" "-version" "-force" "-xterm" "-showkeys" |
︙ | |||
323 324 325 326 327 328 329 | 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 | - + + + | "-convert-to-old" "-import-megatest.db" "-sync-to-megatest.db" "-logging" "-v" ;; verbose 2, more than normal (normal is 1) "-q" ;; quiet 0, errors/warnings only |
︙ | |||
1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 | 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 | + + + + + + + + + + + + + + + + + + + + | ;;====================================================================== ;; Start a repl ;;====================================================================== ;; fakeout readline (include "readline-fix.scm") (when (args:get-arg "-diff-rep") (when (and (not (args:get-arg "-diff-html")) (not (args:get-arg "-diff-email"))) (debug:print 0 *default-log-port* "Must specify -diff-html or -diff-email with -diff-rep") (set! *didsomething* 1) (exit 1)) (let* ((toppath (launch:setup))) (do-diff-report (args:get-arg "-src-target") (args:get-arg "-src-runname") (args:get-arg "-target") (args:get-arg "-runname") (args:get-arg "-diff-html") (args:get-arg "-diff-email")) (set! *didsomething* #t) (exit 0))) (if (or (getenv "MT_RUNSCRIPT") (args:get-arg "-repl") (args:get-arg "-load")) (let* ((toppath (launch:setup)) (dbstruct (if (and toppath (common:on-homehost?)) (db:setup) |
︙ |
Modified utils/mk_wrapper from [4b9a0dffa4] to [de6ec68c4a].
︙ | |||
25 26 27 28 29 30 31 32 33 34 35 36 37 38 | 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 | + + + + + + + + + + + + | # echo "source $prefix/bin/.\$(lsb_release -sr)/cfg.sh" >> $target # fi # echo "exec $prefix/bin/.\$(lsb_release -sr)/$cmd \"\$@\"" >> $target echo "#!/bin/bash" > $target if [[ $cmd =~ dboard ]]; then cat >> $target <<'EOF' # disable if not running on homehost if [[ -e .homehost ]]; then homehostname=$( host `cat .homehost` | awk '{print $NF}' | sed 's/\.$//' ) hostname=$( hostname -f ) if [[ ! ($homehostname == $hostname) ]]; then echo "ERROR: this host ($hostname) is not the homehost ($homehostname) for this megatest run area. Cannot start dashboard." echo " Please log into homehost before launching dashboard." exit 1 fi fi # check that $DISPLAY is set if [[ -z $DISPLAY ]]; then echo 'ERROR: $DISPLAY environment variable is not set; megatest dashboard requires X display address to be set in $DISPLAY.' exit 1 fi |
︙ |