Megatest

Changes On Branch v1.65-cant-verify-at-home
Login

Changes In Branch v1.65-cant-verify-at-home Excluding Merge-Ins

This is equivalent to a diff from e4718cf7ed to e4b276aa24

2018-01-29
12:11
added launch fail detection and fix for test panel crash on missing ld_lib_path issue check-in: fe0ca9de59 user: bjbarcla tags: v1.65
2018-01-02
16:05
bumped version check-in: 9372868385 user: bjbarcla tags: v1.65
2017-12-31
00:38
idea Leaf check-in: e4b276aa24 user: bb tags: v1.65-cant-verify-at-home
2017-12-30
03:12
fixed two probable bugs check-in: b711d2b430 user: bb tags: v1.65-cant-verify-at-home
2017-12-29
16:16
run-wait should wait on launched tests which have uname=n/a too check-in: e4718cf7ed user: bjbarcla tags: v1.65
16:14
run-wait should wait on launched tests which have no itempath too check-in: 87b98ca112 user: bjbarcla tags: v1.65

Modified Makefile from [c37f1ed514] to [e9112109b2].

40
41
42
43
44
45
46
47

48
49
50
51
52
53
54
40
41
42
43
44
45
46

47
48
49
50
51
52
53
54







-
+







MTESTHASH=$(shell fossil info|grep checkout:| awk '{print $$2}')

CSIPATH=$(shell which csi)
CKPATH=$(shell dirname $(shell dirname $(CSIPATH)))
# ARCHSTR=$(shell uname -m)_$(shell uname -r)
# BASH_MACHTYPE=$(shell bash -c "echo \$$MACHTYPE")
# ARCHSTR=$(BASH_MACHTYPE)_$(shell lsb_release -sr)
ARCHSTR=$(shell lsb_release -sr)
ARCHSTR=$(shell if [[ -e /usr/bin/sw_vers ]]; then /usr/bin/sw_vers -productVersion; else lsb_release -sr; fi)
# ARCHSTR=$(shell bash -c "echo \$$MACHTYPE")

PNGFILES = $(shell cd docs/manual;ls *png)

#all : $(PREFIX)/bin/.$(ARCHSTR) mtest dboard mtut ndboard
all : $(PREFIX)/bin/.$(ARCHSTR) mtest dboard mtut

Modified http-transport.scm from [1e8ff99827] to [805ca7974c].

40
41
42
43
44
45
46
47

48
49
50
51
52
53
54
40
41
42
43
44
45
46

47
48
49
50
51
52
53
54







-
+







      #f
      (conc "http://" (car hostport) ":" (cadr hostport))))

(define *server-loop-heart-beat* (current-seconds))

;;======================================================================
;; S E R V E R
;;======================================================================
;; ======================================================================

;; Call this to start the actual server
;;

(define *db:process-queue-mutex* (make-mutex))

(define (http-transport:run hostn)

Modified runs.scm from [7fbb0be9d4] to [977a378661].

2142
2143
2144
2145
2146
2147
2148

2149
2150
2151
2152
2153
2154
2155
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156







+







                                        (loop (car newtal)(cdr newtal)))
                                         ))
                                      ) ; end case rem-status
                                    ) ; end let
                                  ); end cond has-subrun

                                 (else
                                  ;; BB - TODO - consider backgrounding to threads to delete tests (work below) 
                                  (debug:print-info 0 *default-log-port* "test: " test-name " itest-state: " test-state)
                                  (if (member test-state (list "RUNNING" "LAUNCHED" "REMOTEHOSTSTART" "KILLREQ"))
                                      (begin
                                        (if (not (hash-table-ref/default test-retry-time test-fulln #f))
                                            (begin
                                              ;; want to set to REMOVING BUT CANNOT do it here?
                                              (hash-table-set! test-retry-time test-fulln (current-seconds))))

Modified subrun.scm from [011e42f3f6] to [220b1e2631].

85
86
87
88
89
90
91
92
93
94
95
96
97







98
99
100
101
102
103
104
85
86
87
88
89
90
91






92
93
94
95
96
97
98
99
100
101
102
103
104
105







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








    (configf:write-alist testconfig "testconfig.subrun")))

(define (subrun:set-state-status test-run-dir state status new-state-status)
  (if (and (not (subrun:subrun-removed? test-run-dir)) (subrun:subrun-test-initialized? test-run-dir))
      (let* ((action-switches-str
              (conc "-set-state-status "new-state-status
                                (if state (conc " -state "state ""))
                                (if status (conc " -status "status) "")))
             (log-prefix (subrun:sanitize-path
                          (conc "set-state-status="new-state-status
                                (if state (conc ":state="state ""))
                                (if status (conc "+status="status) ""))))
                    (if state (conc " -state "state) "")
                    (if status (conc " -status "status) "")))
             (log-prefix
              (subrun:sanitize-path
               (conc "set-state-status="new-state-status
                     (if state (conc ":state="state) "")
                     (if status (conc "+status="status) ""))))
             (submt-result 
              (subrun:exec-sub-megatest test-run-dir action-switches-str log-prefix)))
        submt-result)))

(define (subrun:remove-subrun test-run-dir keep-records )
  (if (and (not (subrun:subrun-removed? test-run-dir)) (subrun:subrun-test-initialized? test-run-dir))
      (let* ((action-switches-str
178
179
180
181
182
183
184

185
186


187
188
189
190
191
192
193
179
180
181
182
183
184
185
186


187
188
189
190
191
192
193
194
195







+
-
-
+
+







                         (conc
                          target
                          "-"
                          runname
                          "-" (or testpatt mode-patt tag-expr "NO-TESTPATT"))))
         (logfile       (conc
                         test-run-dir "/"
                         (if log-prefix
                         (or (subrun:sanitize-path log-prefix) "")
                         (if log-prefix "-" "")
                             (conc (subrun:sanitize-path log-prefix) "-")
                             "")
                         compact-stem
                         ".log"))
         ;; swap out testpatt with modified test-patt and add -log
         (switch-alist  (cons
                         (cons "-log" logfile)
                         (map (lambda (item)
                                (if (equal? (car item) "-testpatt")