Megatest

Check-in [9e1c27e1ec]
Login
Overview
Comment:Change host/domain matching to deal with or without domain name cases
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.60
Files: files | file ages | folders
SHA1: 9e1c27e1ecbe3ea6ac029ce9e5bb2b0034f80a98
User & Date: mrwellan on 2014-03-06 16:53:41
Other Links: branch diff | manifest | tags
Context
2014-03-06
20:20
Merged fix for ; in env var values check-in: 559d63b4f3 user: matt tags: v1.60
16:53
Change host/domain matching to deal with or without domain name cases check-in: 9e1c27e1ec user: mrwellan tags: v1.60
2014-03-05
22:19
Completed support for homehost check-in: 1e96dcc57d user: matt tags: v1.60
Changes

Modified server.scm from [3393319fac] to [307679905c].

84
85
86
87
88
89
90

91
92
93
94
95
96
97
98
  (let* ((curr-host   (get-host-name))
	 (target-host (configf:lookup *configdat* "server" "homehost" ))
	 (logfile     (conc *toppath* "/db/" run-id ".log"))
	 (cmdln (conc (common:get-megatest-exe)
		      " -server " (or target-host "-") " -run-id " run-id " >> " logfile " 2>&1 &")))
    (debug:print 0 "INFO: Starting server (" cmdln ") as none running ...")
    (push-directory *toppath*)

    (if (and target-host (not (equal? target-host curr-host)))
	(begin
	  (debug:print-info 0 "Starting server on " target-host ", logfile is " logfile)
	  (setenv "TARGETHOST" target-host)
	  (setenv "TARGETHOST_LOGF" logfile)
	  (system (conc "nbfake " cmdln)))
	(system cmdln))
    (pop-directory)))







>
|







84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
  (let* ((curr-host   (get-host-name))
	 (target-host (configf:lookup *configdat* "server" "homehost" ))
	 (logfile     (conc *toppath* "/db/" run-id ".log"))
	 (cmdln (conc (common:get-megatest-exe)
		      " -server " (or target-host "-") " -run-id " run-id " >> " logfile " 2>&1 &")))
    (debug:print 0 "INFO: Starting server (" cmdln ") as none running ...")
    (push-directory *toppath*)
    ;; host.domain.tld match host?
    (if (and target-host (not (string-match (conc "("curr-host "|" curr-host"\\..*)") target-host)))
	(begin
	  (debug:print-info 0 "Starting server on " target-host ", logfile is " logfile)
	  (setenv "TARGETHOST" target-host)
	  (setenv "TARGETHOST_LOGF" logfile)
	  (system (conc "nbfake " cmdln)))
	(system cmdln))
    (pop-directory)))