Megatest

Check-in [0bdb58420b]
Login
Overview
Comment:Speculative fix for db:get-status-from-final-status-file (untested)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v2.0001
Files: files | file ages | folders
SHA1: 0bdb58420bd642b7a1ef1f06764949ec35cf4f67
User & Date: mrwellan on 2022-02-14 21:18:44
Other Links: branch diff | manifest | tags
Context
2022-02-15
19:01
Removed redunant definitions. check-in: bb4f913f24 user: matt tags: v2.0001
11:30
When checking for running tests if on same host do not use ssh check-in: de21785cce user: mrwellan tags: v2.0001
2022-02-14
21:18
Speculative fix for db:get-status-from-final-status-file (untested) check-in: 0bdb58420b user: mrwellan tags: v2.0001
20:12
Added setting of MT_CMDINFO earlier check-in: 972c939bec user: mrwellan tags: v2.0001
Changes

Modified dbmod.scm from [5221573abf] to [edbdd74654].

1942
1943
1944
1945
1946
1947
1948
1949

1950


1951
1952
1953
1954
1955
1956


1957





1958
1959
1960
1961
1962
1963
1964
1965
       (if (and (null? incompleted)
                (null? oldlaunched)
                (null? toplevels))
           #f
           #t)))))

(define (db:get-status-from-final-status-file run-dir)
  (let ((infile (conc run-dir "/.final-status")))

    ;; first verify we are able to write the output file


    (if (and (file-exists? infile)
	     (not (file-readable? infile)))
        (begin 
	  (debug:print 0 *default-log-port* "ERROR: cannot read " infile)
          (debug:print 0 *default-log-port* "ERROR: run-dir is " run-dir)
          #f)


        (with-input-from-file infile read-lines))))






;;  select end_time-now from
;;      (select testname,item_path,event_time+run_duration as
;;                          end_time,strftime('%s','now') as now from tests where state in
;;      ('RUNNING','REMOTEHOSTSTART','LAUNCHED'));

(define (db:find-and-mark-incomplete dbstruct run-id ovr-deadtime)
  (let* ((incompleted '())







|
>

>
>
|
|
<
|
|
|
>
>
|
>
>
>
>
>
|







1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955

1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
       (if (and (null? incompleted)
                (null? oldlaunched)
                (null? toplevels))
           #f
           #t)))))

(define (db:get-status-from-final-status-file run-dir)
  (let* ((infile (conc run-dir "/.final-status"))
	 (found  (file-exists? infile)))
    ;; first verify we are able to write the output file
    (cond
     ((not found) #f)
     ((and (file-exists? infile)
	   (not (file-readable? infile)))

      (debug:print 0 *default-log-port* "ERROR: cannot read " infile)
      (debug:print 0 *default-log-port* "ERROR: run-dir is " run-dir)
      #f)
     (else
      (let ((res (condition-case
		  (with-input-from-file infile read-lines)
		  (exn (i/o file) #f))))
	(cond
	 ((equal? res "#!eof") #f)
	 ((eof-object? res)    #f)
	 (else res)))))))
     
;;  select end_time-now from
;;      (select testname,item_path,event_time+run_duration as
;;                          end_time,strftime('%s','now') as now from tests where state in
;;      ('RUNNING','REMOTEHOSTSTART','LAUNCHED'));

(define (db:find-and-mark-incomplete dbstruct run-id ovr-deadtime)
  (let* ((incompleted '())