Megatest

Check-in [f02d97f292]
Login
Overview
Comment:fixed compilation issue
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.65-newview
Files: files | file ages | folders
SHA1: f02d97f2923801d99f3dd769654032cb12ce7266
User & Date: matt on 2020-04-07 10:33:10
Other Links: branch diff | manifest | tags
Context
2020-04-09
16:03
Added -syscheck, mostly working check-in: 55a9a872ee user: mrwellan tags: v1.65-newview
2020-04-07
10:33
fixed compilation issue check-in: f02d97f292 user: matt tags: v1.65-newview
10:02
broken check-in: 4c2b15c948 user: mrwellan tags: v1.65-newview
Changes

Modified mutils/mutils.scm from [ded5dc300c] to [76827edf89].

19
20
21
22
23
24
25

26
27
28
29
30
31
32
	  srfi-1
	  ;; srfi-13
	  srfi-69
	  ;; ports
	  extras
	  regex
	  posix

	  )

(define (mutils:hierhash-ref hh . keys)
  (if (null? keys)
      #f
      (let loop ((ht   hh)
		 (key  (car keys))







>







19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
	  srfi-1
	  ;; srfi-13
	  srfi-69
	  ;; ports
	  extras
	  regex
	  posix
	  data-structures
	  )

(define (mutils:hierhash-ref hh . keys)
  (if (null? keys)
      #f
      (let loop ((ht   hh)
		 (key  (car keys))
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212

213

214
215
216
217
218
219
       (if (null? @path) @hierlist
	   (apply mutils:hier-list-get @hierlist @path))))

;;======================================================================
;; Other utils
;;======================================================================

#;(define (check-write-create fpath)
  (and (file-write-access? fpath)
       (let ((fname (conc fpath "/junk ". (current-seconds) "-" (random 10000))))
	 (print "trying to create/remove " fname)
	 (handle-exceptions
	  exn
	  #f
	  (begin
	    (with-output-to-file fname
	      (lambda ()
		(print "You can delete this file")))
	    (delete-file fname)
	    #t)))))

;; do some sanity checks on the system
;;
(define (mutils:syscheck)
  ;; current dir writeable and do megatest.config, runconfigs.config files exist/readable
  (print "Current directory " (current-directory) " writeable: " 
	 (if #;(check-file-create ".")
	  (file-write-access? ".")"yes" "no"))
  ;; home dir writeable

  ;; /tmp writeable

  ;; load configs
  ;;    each run disk read/write
  ;;    link tree writeable
  )
  
)







|

|
|















<
|

>

>






185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210

211
212
213
214
215
216
217
218
219
220
221
       (if (null? @path) @hierlist
	   (apply mutils:hier-list-get @hierlist @path))))

;;======================================================================
;; Other utils
;;======================================================================

(define (check-write-create fpath)
  (and (file-write-access? fpath)
       (let ((fname (conc fpath "/.junk-" (current-seconds) "-" (random 10000))))
	 ;;(print "trying to create/remove " fname)
	 (handle-exceptions
	  exn
	  #f
	  (begin
	    (with-output-to-file fname
	      (lambda ()
		(print "You can delete this file")))
	    (delete-file fname)
	    #t)))))

;; do some sanity checks on the system
;;
(define (mutils:syscheck)
  ;; current dir writeable and do megatest.config, runconfigs.config files exist/readable
  (print "Current directory " (current-directory) " writeable: " 

	 (if (check-write-create ".") "yes" "no"))
  ;; home dir writeable
  (print "Home directory " (get-environment-variable "HOME") " writeable: " (if (check-write-create (get-environment-variable "HOME")) "yes" "no"))
  ;; /tmp writeable
  (print "/tmp directory writeable: " (if (check-write-create "/tmp") "yes" "no"))
  ;; load configs
  ;;    each run disk read/write
  ;;    link tree writeable
  )
  
)