Megatest

Check-in [740d248cf8]
Login
Overview
Comment:Add getenv to megatest.scm
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.65-try3
Files: files | file ages | folders
SHA1: 740d248cf846ed8128931483a12247ed3a179813
User & Date: matt on 2019-11-10 19:42:11
Other Links: branch diff | manifest | tags
Context
2019-11-10
20:35
Added test area for working on configf issues check-in: 339aab0882 user: matt tags: v1.65-try3
19:42
Add getenv to megatest.scm check-in: 740d248cf8 user: matt tags: v1.65-try3
2019-11-09
21:34
added test case for configf + modules check-in: 76caa12684 user: matt tags: v1.65-try3
Changes

Modified configf-testing/c.scm from [f12a485793] to [4d512f0590].

1
2
3
4
5
6
7
8

9
10
11
12
13
14
15
;; pretend to be a config file processor
(use posix srfi-69)

(define getenv get-environment-variable)
(define (print-hash-table ht)
  (print "ht=" (hash-table->alist ht)))

(define cfgdata  (conc "(use simple-md5)"

		       "(hash-table-set! ht \"PATH\" (getenv \"PATH\"))"
		       "(hash-table-set! ht \"currdir\" (current-directory))"
		       "(hash-table-set! ht \"md5sum\" (string->md5sum \"Hello\"))"))

(define (faux-cfg-processor ht cfgdata)
  (let* ((proc-str (conc "(lambda (ht)" cfgdata ")")))
    (with-input-from-string proc-str



|




>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
;; pretend to be a config file processor
(use posix srfi-69)

;; (define getenv get-environment-variable)
(define (print-hash-table ht)
  (print "ht=" (hash-table->alist ht)))

(define cfgdata  (conc "(use simple-md5)"
		       "(set! getenv get-environment-variable)"
		       "(hash-table-set! ht \"PATH\" (getenv \"PATH\"))"
		       "(hash-table-set! ht \"currdir\" (current-directory))"
		       "(hash-table-set! ht \"md5sum\" (string->md5sum \"Hello\"))"))

(define (faux-cfg-processor ht cfgdata)
  (let* ((proc-str (conc "(lambda (ht)" cfgdata ")")))
    (with-input-from-string proc-str

Modified megatest.scm from [6a43e527fb] to [3f24954177].

71
72
73
74
75
76
77


78
79
80
81
82
83
84
(define *db* #f) ;; this is only for the repl, do not use in general!!!!

(include "common_records.scm")
(include "key_records.scm")
(include "db_records.scm")
(include "run_records.scm")
(include "megatest-fossil-hash.scm")



(define *usage-log-file* #f)    ;; put path to file for logging usage in this var in the ~/.megatestrc file
(define *usage-use-seconds* #t) ;; for Epoc seconds in usage logging change this to #t in ~/.megatestrc file

;; load the ~/.megatestrc file, put (use trace)(trace-call-sites #t)(trace function-you-want-to-trace) in this file
;;
(let ((debugcontrolf (conc (get-environment-variable "HOME") "/.megatestrc")))







>
>







71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
(define *db* #f) ;; this is only for the repl, do not use in general!!!!

(include "common_records.scm")
(include "key_records.scm")
(include "db_records.scm")
(include "run_records.scm")
(include "megatest-fossil-hash.scm")

(define getenv get-environment-variable)

(define *usage-log-file* #f)    ;; put path to file for logging usage in this var in the ~/.megatestrc file
(define *usage-use-seconds* #t) ;; for Epoc seconds in usage logging change this to #t in ~/.megatestrc file

;; load the ~/.megatestrc file, put (use trace)(trace-call-sites #t)(trace function-you-want-to-trace) in this file
;;
(let ((debugcontrolf (conc (get-environment-variable "HOME") "/.megatestrc")))