Megatest

Check-in [6701aeaf33]
Login
Overview
Comment:fixed few things
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.62-no-rpc
Files: files | file ages | folders
SHA1: 6701aeaf33ba76185d2c6f8de9132021a949b98c
User & Date: matt on 2016-11-24 16:27:25
Other Links: branch diff | manifest | tags
Context
2016-11-24
20:15
more fixes check-in: 6b6111eed8 user: matt tags: v1.62-no-rpc
16:27
fixed few things check-in: 6701aeaf33 user: matt tags: v1.62-no-rpc
00:16
Improvements to state/status handling check-in: 3e121725a6 user: matt tags: v1.62-no-rpc
Changes

Modified db.scm from [eb86be463d] to [9478297bc8].

3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190










3191
3192
3193
3194

3195
3196
3197
3198
3199
3200
3201
3175
3176
3177
3178
3179
3180
3181









3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194

3195
3196
3197
3198
3199
3200
3201
3202







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



-
+








;; state is the priority rollup of all states
;; status is the priority rollup of all completed states
;;
;; if test-name is an integer work off that instead of test-name test-path
;;
(define (db:set-state-status-and-roll-up-items dbstruct run-id test-name item-path state status #!key (comment #f))
  (let* ((db      (db:dbdat-get-db (dbr:dbstruct-tmpdb dbstruct)))
	 (testdat1 (if (number? test-name)
		       (db:get-test-info-by-id dbstruct run-id test-name)
		       #f))
	 (orig-test-id (db:test-get-id testdat1)) ;; the item
	 (test-name (db:test-get-testname testdat1))
         (testdat   (db:get-test-info dbstruct run-id test-name ""))
         (test-id   (db:test-get-id        testdat))
	 (item-path (db:test-get-item-path testdat1)))
  (let* ((db           (db:dbdat-get-db (dbr:dbstruct-tmpdb dbstruct)))
	 (testdat1     (if (number? test-name)
			   (db:get-test-info-by-id dbstruct run-id test-name)
			   #f))
	 (orig-test-id (if testdat1 (db:test-get-id testdat1) #f)) ;; the item
	 (test-name    (if testdat1 (db:test-get-testname testdat1) test-name))
         (testdat      (db:get-test-info dbstruct run-id test-name ""))
         (test-id      (db:test-get-id        testdat))
	 (item-path    (db:test-get-item-path (or testdat1 testdat))))
    (print "Got here.")
    (sqlite3:with-transaction
     db
     (lambda ()
       (db:test-set-state-status-by-id dbstruct run-id orig-test-id state status comment)
       (if orig-test-id (db:test-set-state-status-by-id dbstruct run-id orig-test-id state status comment))
       (if (not (equal? item-path "")) ;; only roll up IF we are an item
	   (let* ((all-curr-states   (common:special-sort
				      (delete-duplicates
				       (let ((states (db:get-all-item-states   db run-id test-name)))
					 (if state (cons state states) states)))
				      *common:std-states* >))
		  (all-curr-statuses (common:special-sort