Comment: | Added lineitem data uploading and tests |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
1eb40d3a48b374bd23b4911746ec51ec |
User & Date: | matt on 2011-09-10 23:03:58 |
Other Links: | manifest | tags |
2011-09-11
| ||
12:51 | Starting point for server implemntation check-in: 598ddd3327 user: matt tags: trunk | |
2011-09-10
| ||
23:03 | Added lineitem data uploading and tests check-in: 1eb40d3a48 user: matt tags: trunk | |
2011-09-08
| ||
23:59 | Roll up RUNNING from subtests prioritised over PASS and FAIL. More work done towards moving values, expected, tol and units to test_data check-in: a19566e0b3 user: matt tags: trunk, test_step_table_good | |
Modified common.scm from [3897afab0f] to [158dd112b2].
︙ | |||
57 58 59 60 61 62 63 64 65 66 67 68 69 70 | 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | + + + + | ;; convert stuff to a number if possible (define (any->number val) (cond ((number? val) val) ((string? val) (string->number val)) ((symbol? val) (any->number (symbol->string val))) (else #f))) (define (any->number-if-possible val) (let ((num (any->number val))) (if num num val))) ;;====================================================================== ;; System stuff ;;====================================================================== (define (get-df path) (let* ((df-results (cmd-run->list (conc "df " path))) |
︙ |
Modified db.scm from [3658d50d45] to [b9e48d30f0].
︙ | |||
148 149 150 151 152 153 154 155 156 157 158 159 160 161 | 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 | + | category TEXT DEFAULT '', variable TEXT, value REAL, expected_value REAL, tol REAL, units TEXT, comment TEXT DEFAULT '', status TEXT DEFAULT 'n/a', CONSTRAINT test_data UNIQUE (test_id,category,variable));"))) (if (< mver megatest-version) (db:set-var db "MEGATEST_VERSION" megatest-version))))) ;;====================================================================== ;; meta get and set vars ;;====================================================================== |
︙ | |||
480 481 482 483 484 485 486 | 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 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 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 602 | + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | ;; update one of the testmeta fields (define (db:testmeta-update-field db testname field value) (sqlite3:execute db (conc "UPDATE test_meta SET " field "=? WHERE testname=?;") value testname)) ;;====================================================================== ;; T E S T D A T A ;;====================================================================== (define (make-db:test-data)(make-vector 10)) (define-inline (db:test-data-get-id vec) (vector-ref vec 0)) (define-inline (db:test-data-get-test_id vec) (vector-ref vec 1)) (define-inline (db:test-data-get-category vec) (vector-ref vec 2)) (define-inline (db:test-data-get-variable vec) (vector-ref vec 3)) (define-inline (db:test-data-get-value vec) (vector-ref vec 4)) (define-inline (db:test-data-get-expected_value vec) (vector-ref vec 5)) (define-inline (db:test-data-get-tol vec) (vector-ref vec 6)) (define-inline (db:test-data-get-units vec) (vector-ref vec 7)) (define-inline (db:test-data-get-comment vec) (vector-ref vec 8)) (define-inline (db:test-data-get-status vec) (vector-ref vec 9)) |
︙ | |||
569 570 571 572 573 574 575 | 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 | - - - - + + + + | (vector-set! record 4 (let ((startt (any->number (vector-ref record 1))) (endt (any->number (vector-ref record 2)))) (debug:print 4 "record[1]=" (vector-ref record 1) ", startt=" startt ", endt=" endt ", get-status: " (db:step-get-status step)) (if (and (number? startt)(number? endt)) (seconds->hr-min-sec (- endt startt)) "-1")))) |
︙ | |||
673 674 675 676 677 678 679 | 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 | - + - + - + | (set! results (list (cons "Runs" results))) ;; now, for each test, collect the test_data info and add a new sheet (for-each (lambda (test-id) (let ((test-data '()) (curr-test-name #f)) (sqlite3:for-each-row |
︙ |
Modified megatest.scm from [4c09e8865f] to [714eb0a317].
︙ | |||
309 310 311 312 313 314 315 | 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 | - - + | ;; Rollup into a run ;;====================================================================== (if (args:get-arg "-rollup") (general-run-call "-rollup" "rollup tests" (lambda (db keys keynames keyvallst) |
︙ |
Modified runs.scm from [98ddc7507a] to [e4e9795012].
︙ | |||
170 171 172 173 174 175 176 177 178 179 180 181 182 183 | 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 | + + | (if (null? tal) (map cdr (hash-table->alist tests-hash)) ;; return a list of the most recent tests (loop (car tal)(cdr tal)))))))))) (define (test-set-status! db run-id test-name state status itemdat-or-path comment dat) (let* ((real-status status) (item-path (if (string? itemdat-or-path) itemdat-or-path (item-list->path itemdat-or-path))) (testdat (db:get-test-info db run-id test-name item-path)) (test-id (if testdat (db:test-get-id testdat) #f)) (otherdat (if dat dat (make-hash-table))) ;; before proceeding we must find out if the previous test (where all keys matched except runname) ;; was WAIVED if this test is FAIL (waived (if (equal? status "FAIL") (let ((prev-test (test:get-previous-test-run-record db run-id test-name item-path))) (if prev-test ;; true if we found a previous test in this run series (let ((prev-status (db:test-get-status prev-test)) |
︙ | |||
193 194 195 196 197 198 199 200 | 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 | + + + + + - + - - - - - - - - - - - + - - - - - - - | (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) (sqlite3:execute db "UPDATE tests SET state=?,status=?,event_time=strftime('%s','now') WHERE run_id=? AND testname=? AND item_path=?;" state real-status run-id test-name item-path)) ;; if status is "AUTO" then call rollup (if (and test-id state status (equal? status "AUTO")) (db:test-data-rollup db test-id)) ;; add metadata (need to do this way to avoid SQL injection issues) |
︙ |
Added tests/tests/exit_0/main.sh version [aa59fff554].
|
Added tests/tests/exit_0/testconfig version [475b97c77b].
|
Added tests/tests/exit_1/main.sh version [20482da49e].
|
Added tests/tests/exit_1/testconfig version [475b97c77b].
|
Added tests/tests/lineitem_fail/main.sh version [04d243acb5].
|
Added tests/tests/lineitem_fail/testconfig version [475b97c77b].
|
Added tests/tests/lineitem_pass/main.sh version [646cd68645].
|
Added tests/tests/lineitem_pass/testconfig version [475b97c77b].
|
Modified tests/tests/runfirst/main.sh from [bf457c96cd] to [e833de03b3].
1 2 3 4 5 6 7 8 9 10 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | + + + + + + + + + + + - + | #!/bin/bash # megatest -step wasting_time :state start :status n/a -m "This is a test step comment" # sleep 20 # megatest -step wasting_time :state end :status $? touch ../I_was_here $MT_MEGATEST -runstep wasting_time -logpro wasting_time.logpro "sleep 8;echo all done eh?" -m "This is a test step comment" $MT_MEGATEST -load-test-data << EOF foo,bar,1.2,1.9,> foo,rab,1.0e9,10e9,1e9 foo,bla,1.2,1.9,< foo,bal,1.2,1.2,<,,Check for overload foo,alb,1.2,1.2,<=,Amps,This is the high power circuit test foo,abl,1.2,1.3,0.1 foo,bra,1.2,pass,silly stuff faz,bar,10,8mA,,,"this is a comment" EOF |
Modified tests/tests/sqlitespeed/runscript.rb from [79a2901a88] to [48430c30e3].
︙ | |||
25 26 27 28 29 30 31 32 33 34 35 36 | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | + + | puts "i=#{i}" end if status==0 status='pass' else status='fail' end record_step("add #{num_records}","end",status) |