Megatest

Check-in [43cb38feb6]
Login
Overview
Comment:typed-records for tests working
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | defstruct-srehman
Files: files | file ages | folders
SHA1: 43cb38feb68feab050084e2da948eb401952b8f0
User & Date: srehman on 2016-09-20 14:56:06
Other Links: branch diff | manifest | tags
Context
2016-09-23
11:16
fixed rmt issue when returning information from server check-in: f84ef58d2d user: srehman tags: defstruct-srehman
2016-09-20
14:56
typed-records for tests working check-in: 43cb38feb6 user: srehman tags: defstruct-srehman
13:25
updateded db:get-tests-for-run method with defstruct check-in: d5c885ef29 user: srehman tags: defstruct-srehman
Changes

Modified dashboard.scm from [50a3705d51] to [c4769e8f2f].

1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
		  '()))) ;; get 'em all
    ;; (debug:print 0 *default-log-port* "dboard:get-tests-dat: got " (length tdat) " test records for run " run-id)
    (sort tdat (lambda (a b)
		 (let* ((aval (db:test-get-testname a));;(vector-ref a 2))
			(bval (db:test-get-testname b));;(vector-ref b 2))
			(anum (string->number aval))
			(bnum (string->number bval)))
		 	(print a b)
		   (if (and anum bnum)
		       (< anum bnum)
		       (string<= aval bval)))))))


(define (dashboard:safe-cadr-assoc name lst)
  (let ((res (assoc name lst)))







<







1398
1399
1400
1401
1402
1403
1404

1405
1406
1407
1408
1409
1410
1411
		  '()))) ;; get 'em all
    ;; (debug:print 0 *default-log-port* "dboard:get-tests-dat: got " (length tdat) " test records for run " run-id)
    (sort tdat (lambda (a b)
		 (let* ((aval (db:test-get-testname a));;(vector-ref a 2))
			(bval (db:test-get-testname b));;(vector-ref b 2))
			(anum (string->number aval))
			(bnum (string->number bval)))

		   (if (and anum bnum)
		       (< anum bnum)
		       (string<= aval bval)))))))


(define (dashboard:safe-cadr-assoc name lst)
  (let ((res (assoc name lst)))

Modified db.scm from [b1e1e5f065] to [a813aa1960].

2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
	(debug:print-info 8 *default-log-port* "db:get-tests-for-run run-id=" run-id ", qry=" qry)
	(db:with-db dbstruct run-id #f
		    (lambda (db)
		      (sqlite3:for-each-row 
		       (lambda (a . b) ;; id run-id testname state status event-time host cpuload diskfree uname rundir item-path run-duration final-logf comment)
			 ;;(set! res (cons (apply vector a b) res))) ;; id run-id testname state status event-time host cpuload diskfree uname rundir item-path run-duration final-logf comment) res)))
			 ;;(print (cons a b))
		      	 (set! res (alist->db:test-rec (db:qry-gen-alist qryvalstr (cons a b)))))
		       
		       db
		       qry
		       run-id
		       )))
	(case qryvals
	  ((shortlist)(map db:test-short-record->norm res))







|







2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
	(debug:print-info 8 *default-log-port* "db:get-tests-for-run run-id=" run-id ", qry=" qry)
	(db:with-db dbstruct run-id #f
		    (lambda (db)
		      (sqlite3:for-each-row 
		       (lambda (a . b) ;; id run-id testname state status event-time host cpuload diskfree uname rundir item-path run-duration final-logf comment)
			 ;;(set! res (cons (apply vector a b) res))) ;; id run-id testname state status event-time host cpuload diskfree uname rundir item-path run-duration final-logf comment) res)))
			 ;;(print (cons a b))
		      	 (set! res (cons (alist->db:test-rec (db:qry-gen-alist qryvalstr (cons a b))) res)))
		       
		       db
		       qry
		       run-id
		       )))
	(case qryvals
	  ((shortlist)(map db:test-short-record->norm res))