Megatest

Check-in [03b0bd0cd4]
Login
Overview
Comment:Fixed gen testfiles
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.80-revolution
Files: files | file ages | folders
SHA1: 03b0bd0cd4f97ec5c83a03b8f1e7b10236780ab0
User & Date: mrwellan on 2024-01-23 13:49:45
Other Links: branch diff | manifest | tags
Context
2024-01-23
18:57
Changed get-cpu-load to commonmod:get-cpu-load in tests.scm check-in: 5939138243 user: mmgraham tags: v1.80-revolution
13:49
Fixed gen testfiles check-in: 03b0bd0cd4 user: mrwellan tags: v1.80-revolution
11:24
Cleaned up couple duplicated functions. check-in: c616c43313 user: mrwellan tags: v1.80-revolution
Changes

Modified commonmod.scm from [3af58ed386] to [687653c938].

296
297
298
299
300
301
302
303
304





305
306
307
308
309
310
311
296
297
298
299
300
301
302


303
304
305
306
307
308
309
310
311
312
313
314







-
-
+
+
+
+
+







		   (else f))))
	     (filter (lambda (x)
		       (not (string-match "^\\s*" x)))
		     val-list))
	'())))

(define (commonmod:get-cpu-load)
  (let* ((load-info (with-input-from-file "/proc/loadavg" read-lines)))
    (map string->number (string-split (car load-info)))))
  (let* ((load-info (with-input-from-file "/proc/loadavg" read-lines))
	 (res       (map string->number (string-split (car load-info)))))
    (if (null? res)
	#f ;; something is wrong
	(car res))))

(define *current-host-cores* #f)

(define (get-current-host-cores)
  (or *current-host-cores*
      (let ((cpu-info (with-input-from-file "/proc/cpuinfo" read-lines)))
	(let loop ((lines cpu-info))

Modified launch.scm from [f11fab7c29] to [fdf36ac7c4].

369
370
371
372
373
374
375
376
377


378
379
380
381
382
383
384
369
370
371
372
373
374
375


376
377
378
379
380
381
382
383
384







-
-
+
+







     scripts)

    ;; extract logpro from testconfig and write them to files in test run dir
    (for-each
     (lambda (logprodat)
       (match logprodat
	      ((name content)
	       (debug:print-info 2 *default-log-port* "Creating logpro file "(current-directory)"/"name)
	       (with-output-to-file name
	       (debug:print-info 2 *default-log-port* "Creating logpro file "(current-directory)"/"name".logpro")
	       (with-output-to-file (conc name".logpro")
		 (lambda ()
		   (print content)
		   ;; (change-file-mode name (bitwise-ior perm/irwxg perm/irwxu))
		   )))
	      (else
	       (debug:print-info 0 "Invalid logpro definiton found in [logpro] section of testconfig. \"" logprodat "\""))))
     logpros)))