Megatest

Diff
Login

Differences From Artifact [20f479e9c6]:

To Artifact [c7e5f6a357]:


13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

29

30
31

32
33

34


35
36
37
38
39
40
41
;;     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;     GNU General Public License for more details.
;; 
;;     You should have received a copy of the GNU General Public License
;;     along with Megatest.  If not, see <http://www.gnu.org/licenses/>.
;;

(require-extension (srfi 18) extras tcp s11n)

(use sqlite3 srfi-1 posix srfi-69 hostinfo dot-locking z3)
(import (prefix sqlite3 sqlite3:))

(declare (unit portlogger))
(declare (uses db))

(declare (uses commonmod))

(import commonmod)


(declare (uses configfmod))

(import configfmod)


(declare (uses dbmod))


(import dbmod)

;; lsof -i

(define (portlogger:open-db fname)
  (let* ((avail    (tasks:wait-on-journal fname 5 remove: #t)) ;; wait up to about 10 seconds for the journal to go away
	 (exists   (common:file-exists? fname))







<

<
<


|
|
|
>
|
>
|
|
>
|

>
|
>
>







13
14
15
16
17
18
19

20


21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
;;     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;     GNU General Public License for more details.
;; 
;;     You should have received a copy of the GNU General Public License
;;     along with Megatest.  If not, see <http://www.gnu.org/licenses/>.
;;






(declare (unit portlogger))
;; (declare (uses db))
(declare (uses commonmod))
(declare (uses configfmod))
(declare (uses dbmod))

(module portlogger
	*

(import scheme chicken data-structures extras ports)
(import (srfi 18) extras tcp s11n)

(use (prefix sqlite3 sqlite3:) srfi-1 posix srfi-69 hostinfo dot-locking z3)

(import commonmod)
(import configfmod)
(import dbmod)

;; lsof -i

(define (portlogger:open-db fname)
  (let* ((avail    (tasks:wait-on-journal fname 5 remove: #t)) ;; wait up to about 10 seconds for the journal to go away
	 (exists   (common:file-exists? fname))
191
192
193
194
195
196
197


					   state)
		      state))
	     ((failed)(portlogger:set-failed db (string->number (cadr args))) 'failed)))))
    (sqlite3:finalize! db)
    result))
     
;; (print (apply portlogger:main (cdr (argv))))









>
>
194
195
196
197
198
199
200
201
202
					   state)
		      state))
	     ((failed)(portlogger:set-failed db (string->number (cadr args))) 'failed)))))
    (sqlite3:finalize! db)
    result))
     
;; (print (apply portlogger:main (cdr (argv))))

)