Megatest

Check-in [73b253e46e]
Login
Overview
Comment:Fixed bug in saving environment files where forbidden vars list was being ignored.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.55
Files: files | file ages | folders
SHA1: 73b253e46e565525ac39e6063e134bd2e3e1a5fa
User & Date: mrwellan on 2014-03-31 10:18:25
Other Links: branch diff | manifest | tags
Context
2014-03-31
11:51
Toplevel fix caused a regression where items didn't work. This commit should fix that. check-in: e6df83127e user: mrwellan tags: v1.55, v1.5516
10:18
Fixed bug in saving environment files where forbidden vars list was being ignored. check-in: 73b253e46e user: mrwellan tags: v1.55
2014-03-29
13:31
Improved an error message check-in: aa13991ded user: matt tags: v1.55
Changes

Modified common.scm from [dbb372c301] to [1ffef387ac].

349
350
351
352
353
354
355
356

357
358
359
360
361
362
363
364
365
366

367
368
369
370
371
372
373
374
375
376
377
378
379
	(caar uname-res))))
	      
(define (save-environment-as-files fname #!key (ignorevars (list "USER" "HOME" "DISPLAY" "LS_COLORS" "XKEYSYMDB" "EDITOR")))
  (let ((envvars (get-environment-variables))
        (whitesp (regexp "[^a-zA-Z0-9_\\-:;,.\\/%$]")))
     (with-output-to-file (conc fname ".csh")
       (lambda ()
          (for-each (lambda (key)

		      (let* ((val (cdr key))
			     (sval (if (string-search whitesp val)(conc "\"" val "\"") val)))
			(print (if (member key ignorevars)
				   "# setenv "
				   "setenv ")
			       (car key) " " sval)))
		      envvars)))
     (with-output-to-file (conc fname ".sh")
       (lambda ()
          (for-each (lambda (key)

		      (let* ((val (cdr key))
			     (sval (if (string-search whitesp val)(conc "\"" val "\"") val)))
			(print (if (member key ignorevars)
				   "# export "
				   "export ")
			       (car key) "=" sval)))
                    envvars)))))

;; set some env vars from an alist, return an alist with original values
;; (("VAR" "value") ...)
(define (alist->env-vars lst)
  (if (list? lst)
      (let ((res '()))







|
>
|




|



|
>
|




|







349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
	(caar uname-res))))
	      
(define (save-environment-as-files fname #!key (ignorevars (list "USER" "HOME" "DISPLAY" "LS_COLORS" "XKEYSYMDB" "EDITOR")))
  (let ((envvars (get-environment-variables))
        (whitesp (regexp "[^a-zA-Z0-9_\\-:;,.\\/%$]")))
     (with-output-to-file (conc fname ".csh")
       (lambda ()
          (for-each (lambda (keyval)
		      (let* ((key (car keyval))
			     (val (cdr keyval))
			     (sval (if (string-search whitesp val)(conc "\"" val "\"") val)))
			(print (if (member key ignorevars)
				   "# setenv "
				   "setenv ")
			       key " " sval)))
		      envvars)))
     (with-output-to-file (conc fname ".sh")
       (lambda ()
          (for-each (lambda (keyval)
		      (let* ((key (car keyval))
			     (val (cdr keyval))
			     (sval (if (string-search whitesp val)(conc "\"" val "\"") val)))
			(print (if (member key ignorevars)
				   "# export "
				   "export ")
			       key "=" sval)))
                    envvars)))))

;; set some env vars from an alist, return an alist with original values
;; (("VAR" "value") ...)
(define (alist->env-vars lst)
  (if (list? lst)
      (let ((res '()))

tests/installall/config/megatest.config.dat became a symlink with target [736a5da885].

tests/installall/config/runconfigs.config.dat became a symlink with target [3b8f260acb].