Megatest

Diff
Login

Differences From Artifact [d1723d75e5]:

To Artifact [a453d29161]:


599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618













619
620
621
622
623
624
625
599
600
601
602
603
604
605













606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625







-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+







	  (hash-table-set! *target* run-id thekey)
	  thekey))))

;;======================================================================
;;  T E S T S
;;======================================================================

;; (define (db:tests-register-test db run-id test-name item-path)
;;   (debug:print 4 "INFO: db:tests-register-test db=" db ", run-id=" run-id ", test-name=" test-name ", item-path=\"" item-path "\"")
;;   (let ((item-paths (if (equal? item-path "")
;; 			(list item-path)
;; 			(list item-path ""))))
;;     (for-each 
;;      (lambda (pth)
;;        (sqlite3:execute db "INSERT OR IGNORE INTO tests (run_id,testname,event_time,item_path,state,status) VALUES (?,?,strftime('%s','now'),?,'NOT_STARTED','n/a');" 
;; 			run-id 
;; 			test-name
;; 			pth))
;;      item-paths)
;;     #f))
(define (db:tests-register-test db run-id test-name item-path)
  (debug:print 4 "INFO: db:tests-register-test db=" db ", run-id=" run-id ", test-name=" test-name ", item-path=\"" item-path "\"")
  (let ((item-paths (if (equal? item-path "")
			(list item-path)
			(list item-path ""))))
    (for-each 
     (lambda (pth)
       (sqlite3:execute db "INSERT OR IGNORE INTO tests (run_id,testname,event_time,item_path,state,status) VALUES (?,?,strftime('%s','now'),?,'NOT_STARTED','n/a');" 
			run-id 
			test-name
			pth))
     item-paths)
    #f))


;; states and statuses are lists, turn them into ("PASS","FAIL"...) and use NOT IN
;; i.e. these lists define what to NOT show.
;; states and statuses are required to be lists, empty is ok
;; not-in #t = above behaviour, #f = must match
(define (db:get-tests-for-run db run-id testpatt itempatt states statuses