Megatest

Check-in [5746a55322]
Login
Overview
Comment:Few more spots where loading of commonmod was needed
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.6569-multi-db
Files: files | file ages | folders
SHA1: 5746a5532222476d9f7c8d6c5478391c4c5aeaa2
User & Date: matt on 2021-02-04 21:17:51
Other Links: branch diff | manifest | tags
Context
2021-02-06
21:09
Pulled mtconfigf in as egg/module check-in: e4bbf91b6d user: matt tags: v1.6569-multi-db
2021-02-04
21:17
Few more spots where loading of commonmod was needed check-in: 5746a55322 user: matt tags: v1.6569-multi-db
2021-02-03
22:28
fixes check-in: 5c8ebd9376 user: matt tags: v1.6569-multi-db
Changes

Modified api.scm from [68ac71805c] to [ee434c180b].

22
23
24
25
26
27
28



29
30
31
32
33
34
35

(use srfi-69 posix)

(declare (unit api))
(declare (uses rmt))
(declare (uses db))
(declare (uses tasks))




;; allow these queries through without starting a server
;;
(define api:read-only-queries
  '(get-key-val-pairs
    get-var
    get-keys







>
>
>







22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

(use srfi-69 posix)

(declare (unit api))
(declare (uses rmt))
(declare (uses db))
(declare (uses tasks))

(declare (uses commonmod))
(import commonmod)

;; allow these queries through without starting a server
;;
(define api:read-only-queries
  '(get-key-val-pairs
    get-var
    get-keys

Modified env.scm from [028e47144f] to [dfbf91100a].

15
16
17
18
19
20
21



22
23
24
25
26
27
28
;; 
;;     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 env))




(use sql-de-lite) ;; srfi-1 posix regex regex-case srfi-69 srfi-18 call-with-environment-variables)

(define (env:open-db fname)
  (let* ((db-exists (common:file-exists? fname))
	 (db        (open-database fname)))
    (if (not db-exists)







>
>
>







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
;; 
;;     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 env))

(declare (uses commonmod))
(import commonmod)

(use sql-de-lite) ;; srfi-1 posix regex regex-case srfi-69 srfi-18 call-with-environment-variables)

(define (env:open-db fname)
  (let* ((db-exists (common:file-exists? fname))
	 (db        (open-database fname)))
    (if (not db-exists)

Modified genexample.scm from [c6a2ab2853] to [25924e53ee].

16
17
18
19
20
21
22



23
24
25
26
27
28
29
;;     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 genexample))
(use posix regex matchable)




(include "db_records.scm")

(define genexample:example-logpro
#<<EOF
  ;; You should have at least one expect:required. This ensures that your process ran
  ;; comment out the line below and replace "put pattern here" with a pattern that will







>
>
>







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
;;     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 genexample))
(use posix regex matchable)

(declare (uses commonmod))
(import commonmod)

(include "db_records.scm")

(define genexample:example-logpro
#<<EOF
  ;; You should have at least one expect:required. This ensures that your process ran
  ;; comment out the line below and replace "put pattern here" with a pattern that will

Modified portlogger.scm from [36a4964f50] to [51459afd2c].

20
21
22
23
24
25
26



27
28
29
30
31
32
33
(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))




;; 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))
	 (db       (if avail 







>
>
>







20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
(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)

;; 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))
	 (db       (if avail 

Modified process.scm from [f9dfbe5500] to [ebe55b45e0].

20
21
22
23
24
25
26



27
28
29
30
31
32
33

;;======================================================================
;; Process convience utils
;;======================================================================

(use regex directory-utils)
(declare (unit process))




(define (process:conservative-read port)
  (let loop ((res ""))
    (if (not (eof-object? (peek-char port)))
	(loop (conc res (read-char port)))
	res)))








>
>
>







20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36

;;======================================================================
;; Process convience utils
;;======================================================================

(use regex directory-utils)
(declare (unit process))

(declare (uses commonmod))
(import commonmod)

(define (process:conservative-read port)
  (let loop ((res ""))
    (if (not (eof-object? (peek-char port)))
	(loop (conc res (read-char port)))
	res)))