Megatest

Diff
Login

Differences From Artifact [13e344a884]:

To Artifact [3ba2fb3805]:


103
104
105
106
107
108
109

110

111
112
113
114
115
116
117
103
104
105
106
107
108
109
110

111
112
113
114
115
116
117
118







+
-
+







	(let ((outres (string-intersperse 
		       res
		       "\n")))
	  (debug:print-info 4 "shell result:\n" outres)
	  outres)
	(begin
	  (with-output-to-port (current-error-port)
	    (lambda ()
	    (print "ERROR: " cmd " returned bad exit code " status))
	      (print "ERROR: " cmd " returned bad exit code " status)))
	  ""))))

;; Lookup a value in runconfigs based on -reqtarg or -target
(define (runconfigs-get config var)
  (let ((targ (or (args:get-arg "-reqtarg")(args:get-arg "-target"))))
    (if targ
	(or (configf:lookup config targ var)
340
341
342
343
344
345
346
347

348
349
350
351
352
353
354
341
342
343
344
345
346
347

348
349
350
351
352
353
354
355







-
+







      (let ((inp (open-input-file fname)))
	(let loop ((inl (read-line inp))
		   (res '()))
	  (if (eof-object? inl)
	      (begin
		(close-input-port inp)
		(reverse res))
	      (loop (read-line inp)(cons inl)))))
	      (loop (read-line inp)(cons inl res)))))
      '()))

;;======================================================================
;; Write a config
;;   0. Given a refererence data structure "indat"
;;   1. Open the output file and read it into a list
;;   2. Flatten any multiline entries