Skip to content

Commit 7336b53

Browse files
author
mrwellan
committed
Lower priority of some noisy output. Change force to force-reread (force is a keyword). Move server kills log to logs dir. Removed // from path in cached testconfig file.
1 parent c7147e2 commit 7336b53

File tree

5 files changed

+19
-15
lines changed

5 files changed

+19
-15
lines changed

db.scm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@
234234
(if (and (configf:lookup *configdat* "setup" "use-wal")
235235
(string-match "^/tmp/.*" fname)) ;; this is a file in /tmp
236236
(sqlite3:execute db "PRAGMA journal_mode=WAL;")
237-
(print "Creating " fname " in NON-WAL mode."))
237+
(debug:print 2 *default-log-port* "Creating " fname " in NON-WAL mode."))
238238
(initproc db)))
239239
(if (not readyexists)
240240
(begin

launch.scm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@
568568
(set! keys (rmt:get-keys))
569569
;; (runs:set-megatest-env-vars run-id inkeys: keys inkeyvals: keyvals) ;; these may be needed by the launching process
570570
;; one of these is defunct/redundant ...
571-
(if (not (launch:setup force: #t))
571+
(if (not (launch:setup force-reread: #t))
572572
(begin
573573
(debug:print 0 *default-log-port* "Failed to setup, exiting")
574574
;; (sqlite3:finalize! db)
@@ -796,15 +796,15 @@
796796
;; *runconfigdat* (runconfigs.config info)
797797
;; *configstatus* (status of the read data)
798798
;;
799-
(define (launch:setup #!key (force #f) (areapath #f))
799+
(define (launch:setup #!key (force-reread #f) (areapath #f))
800800
(mutex-lock! *launch-setup-mutex*)
801801
(if (and *toppath*
802802
(eq? *configstatus* 'fulldata)) ;; got it all
803803
(begin
804-
(debug:print 0 *default-log-port* "NOTE: skipping launch:setup-body call since we have fulldata")
804+
(debug:print 2 *default-log-port* "NOTE: skipping launch:setup-body call since we have fulldata")
805805
(mutex-unlock! *launch-setup-mutex*)
806806
*toppath*)
807-
(let ((res (launch:setup-body force: force areapath: areapath)))
807+
(let ((res (launch:setup-body force-reread: force-reread areapath: areapath)))
808808
(mutex-unlock! *launch-setup-mutex*)
809809
res)))
810810

megatest.scm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -863,7 +863,7 @@ Version " megatest-version ", built from " megatest-fossil-hash ))
863863
(if (not (common:in-running-test?))
864864
(configf:write-alist data cfgf))
865865
;; force re-read of megatest.config - this resolves circular references between megatest.config
866-
(launch:setup force: #t)
866+
(launch:setup force-reread: #t)
867867
(launch:cache-config))) ;; we can safely cache megatest.config since we have a valid runconfig
868868
data))))
869869

tasks.scm

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,14 @@
185185
(define (tasks:kill-server hostname pid #!key (kill-switch ""))
186186
(debug:print-info 0 *default-log-port* "Attempting to kill server process " pid " on host " hostname)
187187
(setenv "TARGETHOST" hostname)
188-
(setenv "TARGETHOST_LOGF" "server-kills.log")
189-
(system (conc "nbfake kill "kill-switch" "pid))
190-
191-
(unsetenv "TARGETHOST_LOGF")
192-
(unsetenv "TARGETHOST"))
188+
(let ((logdir (if (directory-exists? "logs")
189+
"logs/"
190+
"")))
191+
(setenv "TARGETHOST_LOGF" (conc logdir "server-kills.log"))
192+
(system (conc "nbfake kill "kill-switch" "pid))
193+
194+
(unsetenv "TARGETHOST_LOGF")
195+
(unsetenv "TARGETHOST")))
193196

194197
;;======================================================================
195198
;; M O N I T O R S

tests.scm

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1148,10 +1148,11 @@ EOF
11481148
(conc (getenv "MT_LINKTREE") "/"
11491149
(getenv "MT_TARGET") "/"
11501150
(getenv "MT_RUNNAME") "/"
1151-
(getenv "MT_TEST_NAME") "/"
1152-
(if (or (getenv "MT_ITEMPATH")
1153-
(not (string=? "" (getenv "MT_ITEMPATH"))))
1154-
(conc "/" (getenv "MT_ITEMPATH"))))
1151+
(getenv "MT_TEST_NAME")
1152+
(if (and (getenv "MT_ITEMPATH")
1153+
(not (string=? "" (getenv "MT_ITEMPATH"))))
1154+
(conc "/" (getenv "MT_ITEMPATH"))
1155+
""))
11551156
#f))
11561157

11571158
;; if .testconfig exists in test directory read and return it

0 commit comments

Comments
 (0)