Megatest

Check-in [b4f7c9bbf9]
Login
Overview
Comment:fixed get-test-id
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.80-servload
Files: files | file ages | folders
SHA1: b4f7c9bbf980f4ee4a9b012fc1c2a72abdd23281
User & Date: matt on 2023-04-21 14:43:30
Other Links: branch diff | manifest | tags
Context
2023-04-24
15:20
Properly disable find-and-mark-incomplete calls to other runs in runs.scm check-in: 1e69e870f3 user: matt tags: v1.80-servload
11:31
merged fork Leaf check-in: fe1ecbaa1b user: mmgraham tags: v1.80-servload-side
2023-04-21
14:43
fixed get-test-id check-in: b4f7c9bbf9 user: matt tags: v1.80-servload
02:53
Fixed fallout from moving mt:process-triggers to client side check-in: 94afafb2e7 user: matt tags: v1.80-servload
Changes

Modified rmt.scm from [0132f572ea] to [504c22e294].

775
776
777
778
779
780
781



782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
(define (rmt:find-and-mark-incomplete run-id ovr-deadtime)
  (let* ((cfg-deadtime             (configf:lookup-number *configdat* "setup" "deadtime"))
	 (test-stats-update-period (configf:lookup-number *configdat* "setup" "test-stats-update-period")))
   (rmt:find-and-mark-incomplete-engine run-id ovr-deadtime cfg-deadtime test-stats-update-period)
   ;;call end of eud of run detection for posthook
   (launch:end-of-run-check run-id)))




;; set tests with state currstate and status currstatus to newstate and newstatus
;; use currstate = #f and or currstatus = #f to apply to any state or status respectively
;; WARNING: SQL injection risk. NB// See new but not yet used "faster" version below
;;
;;  AND NOT (item_path='' AND testname in (SELECT DISTINCT testname FROM tests WHERE testname=? AND item_path != ''));")))
;;  (debug:print 0 *default-log-port* "QRY: " qry)
;;  (db:delay-if-busy)
;;
;; NB// This call only operates on toplevel tests. Consider replacing it with more general call
;;
(define (rmt:set-tests-state-status run-id testnames currstate currstatus newstate newstatus)
  (let ((test-ids '()))
    (for-each
     (lambda (testname)
       (let ((test-id   (db:get-test-id dbstruct run-id testname "")))
	 (rmt:set-state-status-by-state-status run-id testname currstate currstatus newstate newstatus)
	 (if test-id
	     (begin
	       (set! test-ids (cons test-id test-ids))
	       (mt:process-triggers run-id test-id newstate newstatus)))))
     testnames)
    test-ids))








>
>
>














|








775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
(define (rmt:find-and-mark-incomplete run-id ovr-deadtime)
  (let* ((cfg-deadtime             (configf:lookup-number *configdat* "setup" "deadtime"))
	 (test-stats-update-period (configf:lookup-number *configdat* "setup" "test-stats-update-period")))
   (rmt:find-and-mark-incomplete-engine run-id ovr-deadtime cfg-deadtime test-stats-update-period)
   ;;call end of eud of run detection for posthook
   (launch:end-of-run-check run-id)))

(define (rmt:get-test-id run-id testname itempath)
  (rmt:send-receive 'get-test-id run-id (list run-id testname itempath)))

;; set tests with state currstate and status currstatus to newstate and newstatus
;; use currstate = #f and or currstatus = #f to apply to any state or status respectively
;; WARNING: SQL injection risk. NB// See new but not yet used "faster" version below
;;
;;  AND NOT (item_path='' AND testname in (SELECT DISTINCT testname FROM tests WHERE testname=? AND item_path != ''));")))
;;  (debug:print 0 *default-log-port* "QRY: " qry)
;;  (db:delay-if-busy)
;;
;; NB// This call only operates on toplevel tests. Consider replacing it with more general call
;;
(define (rmt:set-tests-state-status run-id testnames currstate currstatus newstate newstatus)
  (let ((test-ids '()))
    (for-each
     (lambda (testname)
       (let ((test-id   (rmt:get-test-id run-id testname "")))
	 (rmt:set-state-status-by-state-status run-id testname currstate currstatus newstate newstatus)
	 (if test-id
	     (begin
	       (set! test-ids (cons test-id test-ids))
	       (mt:process-triggers run-id test-id newstate newstatus)))))
     testnames)
    test-ids))