Megatest

Check-in [d0c952bdbb]
Login
Overview
Comment:Sort danglers by name if same count. Few more orpaned functions commented out From: 4f82003dc0af1a95e10a23cc60a91b9b5ce9b461 User: matt
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.6569-new-diet
Files: files | file ages | folders
SHA1: d0c952bdbbdfb2fe85c2bf3b28ef7cfd7d9283f8
User & Date: matt on 2021-02-25 16:25:23
Other Links: branch diff | manifest | tags
Context
2021-02-25
16:25
Moved sauth and datashare files to appropriate subdirs, commented couple more unused functions. From: 155720494afcc761cd48f68bef2e9082383d4a71 User: matt check-in: ec8722dd5f user: matt tags: v1.6569-new-diet (unpublished)
16:25
Sort danglers by name if same count. Few more orpaned functions commented out From: 4f82003dc0af1a95e10a23cc60a91b9b5ce9b461 User: matt check-in: d0c952bdbb user: matt tags: v1.6569-new-diet (unpublished)
16:25
Moved sauth files to subdir. Improved show-uncalled-procedures output. Removed few unused procedures. From: c9e2628a917d4690ad4ffc35a95f5d5000c90cc5 User: matt check-in: d192708007 user: matt tags: v1.6569-new-diet (unpublished)
Changes

Added danglers-to-ignore.txt version [b2a2845e76].









>
>
>
>
1
2
3
4
spublish:lst->path
megatest-param->mtutil-param
add-target-mapper
add-runname-mapper

Modified db.scm from [6137084de2] to [e5a9ecf1ce].

1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
;; 1. Look at test records either deleted or part of deleted run:
;;    a. If test dir exists, set the the test to state='UNKNOWN', Set the run to 'unknown'
;;    b. If test dir gone, delete the test record
;; 2. Look at run records
;;    a. If have tests that are not deleted, set state='unknown'
;;    b. ....
;;
(define (db:clean-up-rundb dbdat)
  ;; (debug:print 0 *default-log-port* "WARNING: db clean up not fully ported to v1.60, cleanup action will be on megatest.db")
  (let* ((db         (db:dbdat-get-db dbdat))
	 (count-stmt (sqlite3:prepare db "SELECT (SELECT count(id) FROM tests);"))
	(statements
	 (map (lambda (stmt)
		(sqlite3:prepare db stmt))
	      (list







|







1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
;; 1. Look at test records either deleted or part of deleted run:
;;    a. If test dir exists, set the the test to state='UNKNOWN', Set the run to 'unknown'
;;    b. If test dir gone, delete the test record
;; 2. Look at run records
;;    a. If have tests that are not deleted, set state='unknown'
;;    b. ....
;;
#;(define (db:clean-up-rundb dbdat)
  ;; (debug:print 0 *default-log-port* "WARNING: db clean up not fully ported to v1.60, cleanup action will be on megatest.db")
  (let* ((db         (db:dbdat-get-db dbdat))
	 (count-stmt (sqlite3:prepare db "SELECT (SELECT count(id) FROM tests);"))
	(statements
	 (map (lambda (stmt)
		(sqlite3:prepare db stmt))
	      (list
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
	    0))))

;; tags: '("tag%" "tag2" "%ag6")
;;

;; done with run when:
;;   0 tests in LAUNCHED, NOT_STARTED, REMOTEHOSTSTART, RUNNING
(define (db:estimated-tests-remaining dbstruct run-id)
  (db:with-db
   dbstruct
   run-id
   #f
   (lambda (db)
     (sqlite3:first-result
      db







|







3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
	    0))))

;; tags: '("tag%" "tag2" "%ag6")
;;

;; done with run when:
;;   0 tests in LAUNCHED, NOT_STARTED, REMOTEHOSTSTART, RUNNING
#;(define (db:estimated-tests-remaining dbstruct run-id)
  (db:with-db
   dbstruct
   run-id
   #f
   (lambda (db)
     (sqlite3:first-result
      db

Modified server.scm from [e20147e4fd] to [69fe28f9ec].

330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
   #f)
  (match-let (((mod-time host port start-time server-id pid)
	       servr))
    (if (and host port)
	(conc host ":" port)
	#f))))

(define (server:get-client-signature) ;; BB> why is this proc named "get-"?  it returns nothing -- set! has not return value.
  (if *my-client-signature* *my-client-signature*
      (let ((sig (server:mk-signature)))
        (set! *my-client-signature* sig)
        *my-client-signature*)))

;; wait for server=start-last to be three seconds old
;;







|







330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
   #f)
  (match-let (((mod-time host port start-time server-id pid)
	       servr))
    (if (and host port)
	(conc host ":" port)
	#f))))

#;(define (server:get-client-signature) ;; BB> why is this proc named "get-"?  it returns nothing -- set! has not return value.
  (if *my-client-signature* *my-client-signature*
      (let ((sig (server:mk-signature)))
        (set! *my-client-signature* sig)
        *my-client-signature*)))

;; wait for server=start-last to be three seconds old
;;

Modified tdb.scm from [6edff6262d] to [107bd93069].

373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
		     (<   (tdb:step-get-id a)        (tdb:step-get-id b)))
		    (else #f)))))
    res))

;;
;; Move to steps.scm
;;
(define (tdb:get-compressed-steps comprsteps) ;; from tdb:get-steps-table
  (map (lambda (x)
	 ;; take advantage of the \n on time->string
	 (vector
	  (vector-ref x 0)
	  (let ((s (vector-ref x 1)))
	    (if (number? s)(seconds->time-string s) s))
	  (let ((s (vector-ref x 2)))







|







373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
		     (<   (tdb:step-get-id a)        (tdb:step-get-id b)))
		    (else #f)))))
    res))

;;
;; Move to steps.scm
;;
#;(define (tdb:get-compressed-steps comprsteps) ;; from tdb:get-steps-table
  (map (lambda (x)
	 ;; take advantage of the \n on time->string
	 (vector
	  (vector-ref x 0)
	  (let ((s (vector-ref x 1)))
	    (if (number? s)(seconds->time-string s) s))
	  (let ((s (vector-ref x 2)))

Modified utils/show-uncalled-procedures.scm from [9e9d6c8594] to [7cf01ad99d].

167
168
169
170
171
172
173
174





175
176
177
178
179
180
181
    ;; (print "ignores: " (hash-table->alist ignores))
    (for-each (lambda (dangler)
		(let* ((fnname (conc (cadr dangler))))
		  ;; (print "fnname="fnname" member: "(member fnname ignore-list))
		  (if (not (hash-table-exists? ignores fnname))
		      (apply print (intersperse  dangler "\t"))
		      #;(print "skipping "fnname))))
	      (sort danglers (lambda (a b)(< (car a)(car b)))))))






    ;; (for-each print dangling-procs) ;; our product.

(define (get-stats fn)
  (let* ((data  (with-input-from-pipe (conc "grep '"fn"' *.scm") read-lines))
	 (files (delete-duplicates
		 (map (lambda (entry)







|
>
>
>
>
>







167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
    ;; (print "ignores: " (hash-table->alist ignores))
    (for-each (lambda (dangler)
		(let* ((fnname (conc (cadr dangler))))
		  ;; (print "fnname="fnname" member: "(member fnname ignore-list))
		  (if (not (hash-table-exists? ignores fnname))
		      (apply print (intersperse  dangler "\t"))
		      #;(print "skipping "fnname))))
	      (sort danglers (lambda (a b)
			       (let ((ca (car a))
				     (cb (car b)))
				 (if (equal? ca cb)
				     (string<=? (conc (cadr a))(conc (cadr b)))
				     (< ca cb))))))))

    ;; (for-each print dangling-procs) ;; our product.

(define (get-stats fn)
  (let* ((data  (with-input-from-pipe (conc "grep '"fn"' *.scm") read-lines))
	 (files (delete-duplicates
		 (map (lambda (entry)