1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
|
((<) (if (< value expected) "pass" "fail"))
((>=) (if (>= value expected) "pass" "fail"))
((<=) (if (<= value expected) "pass" "fail"))
(else (conc "ERROR: bad tol comparator " tol))))))
(debug:print 4 "AFTER2: category: " category " variable: " variable " value: " value
", expected: " expected " tol: " tol " units: " units " status: " status " comment: " comment)
(sqlite3:execute tdb "INSERT OR REPLACE INTO test_data (test_id,category,variable,value,expected,tol,units,comment,status,type) VALUES (?,?,?,?,?,?,?,?,?,?);"
test-id category variable value expected tol units (if comment comment "") status type)
(sqlite3:finalize! tdb)))
csvlist)))))
;; get a list of test_data records matching categorypatt
(define (db:read-test-data db test-id categorypatt #!key (testpath #f))
(let ((tdb (db:open-test-db-by-test-id db test-id testpath: testpath)))
(if tdb
(let ((res '()))
(sqlite3:for-each-row
|
|
>
|
<
|
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
|
((<) (if (< value expected) "pass" "fail"))
((>=) (if (>= value expected) "pass" "fail"))
((<=) (if (<= value expected) "pass" "fail"))
(else (conc "ERROR: bad tol comparator " tol))))))
(debug:print 4 "AFTER2: category: " category " variable: " variable " value: " value
", expected: " expected " tol: " tol " units: " units " status: " status " comment: " comment)
(sqlite3:execute tdb "INSERT OR REPLACE INTO test_data (test_id,category,variable,value,expected,tol,units,comment,status,type) VALUES (?,?,?,?,?,?,?,?,?,?);"
test-id category variable value expected tol units (if comment comment "") status type)))
csvlist)
(sqlite3:finalize! tdb)))))
;; get a list of test_data records matching categorypatt
(define (db:read-test-data db test-id categorypatt #!key (testpath #f))
(let ((tdb (db:open-test-db-by-test-id db test-id testpath: testpath)))
(if tdb
(let ((res '()))
(sqlite3:for-each-row
|
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
|
;; NOTE: Run this local with #f for db !!!
(define (db:load-test-data db test-id #!key (testpath #f))
(let loop ((lin (read-line)))
(if (not (eof-object? lin))
(begin
(debug:print 4 lin)
(db:csv->test-data db test-id lin)
(loop (read-line)))))
;; roll up the current results.
;; FIXME: Add the status to
(db:test-data-rollup db test-id #f testpath: testpath))
;; WARNING: Do NOT call this for the parent test on an iterated test
;; Roll up test_data pass/fail results
|
|
|
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
|
;; NOTE: Run this local with #f for db !!!
(define (db:load-test-data db test-id #!key (testpath #f))
(let loop ((lin (read-line)))
(if (not (eof-object? lin))
(begin
(debug:print 4 lin)
(db:csv->test-data db test-id lin testpath: testpath)
(loop (read-line)))))
;; roll up the current results.
;; FIXME: Add the status to
(db:test-data-rollup db test-id #f testpath: testpath))
;; WARNING: Do NOT call this for the parent test on an iterated test
;; Roll up test_data pass/fail results
|