Megatest

Check-in [cfc601732f]
Login
Overview
Comment:Fixed the awful test blocked by prereq with failed prereq bug. Reproduce by running test4 and setting one of the items in sqlitespeed to FAIL, must add a test for this
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.55
Files: files | file ages | folders
SHA1: cfc601732f6a470d1f9ac42cad48fa2d023442e4
User & Date: matt on 2013-09-19 23:22:17
Other Links: branch diff | manifest | tags
Context
2013-09-20
11:01
Bumped version number check-in: 31c84ab022 user: mrwellan tags: v1.55, v1.5512
2013-09-19
23:22
Fixed the awful test blocked by prereq with failed prereq bug. Reproduce by running test4 and setting one of the items in sqlitespeed to FAIL, must add a test for this check-in: cfc601732f user: matt tags: v1.55
14:37
Pulled in a long lost change to rolling up pass/fail to toplevel tests. Reverted nbfind and added nbload check-in: dfc126f3ca user: mrwellan tags: v1.55, v1.5512
Changes

Modified runs.scm from [8981e71ea4] to [631ee0cd7b].

431
432
433
434
435
436
437
438
439
440
441
442
443








444



445







446
447
448
449
450
451
452
453
454
455
456
457
458
459
		(exit 1))))))

     ((and (null? fails)
	   (not (null? non-completed)))
      (let* ((allinqueue (map (lambda (x)(if (string? x) x (db:test-get-testname x)))
        		      (append newtal reruns)))
	     ;; prereqstrs is a list of test names as strings that are prereqs for hed
             (prereqstrs (map (lambda (x)(if (string? x) x (db:test-get-testname x)))
        		      prereqs-not-met))
	     ;; a prereq that is not found in allinqueue will be put in the notinqueue list
	     ;; 
             (notinqueue (filter (lambda (x)
        			   (not (member x allinqueue)))








        			 prereqstrs)))



	(debug:print 1 "WARNING: test " hed " has no failed prerequisites but does have prerequistes that are NOT in the queue: " (string-intersperse notinqueue ", "))







	(debug:print-info 1 "allinqueue: " allinqueue)
	(debug:print-info 1 "prereqstrs: " prereqstrs)
	(debug:print-info 1 "notinqueue: " notinqueue)
	(debug:print-info 1 "tal:        " tal)
	(debug:print-info 1 "newtal:     " newtal)
	(debug:print-info 1 "reg:        " reg)
	(list (car newtal)(append (cdr newtal) reg) '() reruns)))

;; == ==       ;; num-retries code was here
;; == ==       ;; we use this opportunity to move contents of reg to tal
;; == ==       ;; but also lets check that the prerequisites are all in the newtal or reruns lists
;; == == 
;; == ==       (let* ((allinqueue (map (lambda (x)(if (string? x) x (db:test-get-testname x)))
;; == ==         		      (append newtal reruns)))







|
|


|
|
>
>
>
>
>
>
>
>
|
>
>
>
|
>
>
>
>
>
>
>
|
|
|
|
|
|
<







431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469

470
471
472
473
474
475
476
		(exit 1))))))

     ((and (null? fails)
	   (not (null? non-completed)))
      (let* ((allinqueue (map (lambda (x)(if (string? x) x (db:test-get-testname x)))
        		      (append newtal reruns)))
	     ;; prereqstrs is a list of test names as strings that are prereqs for hed
             (prereqstrs (delete-duplicates (map (lambda (x)(if (string? x) x (db:test-get-testname x)))
						 prereqs-not-met)))
	     ;; a prereq that is not found in allinqueue will be put in the notinqueue list
	     ;; 
             ;; (notinqueue (filter (lambda (x)
             ;;    		   (not (member x allinqueue)))
             ;;    		 prereqstrs))
	     (give-up    #f))

	;; We can get here when a prereq has not been run due to *it* having a prereq that failed.
	;; We need to use this to dequeue this item as CANNOTRUN
	(for-each (lambda (prereq)
		    (if (eq? (hash-table-ref/default test-registry prereq 'justfine) 'CANNOTRUN)
			(set! give-up #t)))
		  prereqstrs)
	(if (and give-up
		 (not (and (null? tal)(null? reg))))
	    (begin
	      (debug:print 1 "WARNING: test " hed " has no discarded prerequisites, removing it from the queue")
	      (list (runs:queue-next-hed tal reg reglen regfull)
		    (runs:queue-next-tal tal reg reglen regfull)
		    (runs:queue-next-reg tal reg reglen regfull)
		    reruns))
	    (list (car newtal)(append (cdr newtal) reg) '() reruns))))


     ;; (debug:print-info 1 "allinqueue: " allinqueue)
     ;; (debug:print-info 1 "prereqstrs: " prereqstrs)
     ;; (debug:print-info 1 "notinqueue: " notinqueue)
     ;; (debug:print-info 1 "tal:        " tal)
     ;; (debug:print-info 1 "newtal:     " newtal)
     ;; (debug:print-info 1 "reg:        " reg)


;; == ==       ;; num-retries code was here
;; == ==       ;; we use this opportunity to move contents of reg to tal
;; == ==       ;; but also lets check that the prerequisites are all in the newtal or reruns lists
;; == == 
;; == ==       (let* ((allinqueue (map (lambda (x)(if (string? x) x (db:test-get-testname x)))
;; == ==         		      (append newtal reruns)))
515
516
517
518
519
520
521


522
523
524
525
526

527
528
529
530
531
532
533
		  reruns))))

     ((and (not (null? fails))(eq? testmode 'normal))
      (debug:print-info 1 "test "  hed " (mode=" testmode ") has failed prerequisite(s); "
			(string-intersperse (map (lambda (t)(conc (db:test-get-testname t) ":" (db:test-get-state t)"/"(db:test-get-status t))) fails) ", ")
			", removing it from to-do list")
      (if (or (not (null? reg))(not (null? tal)))


	  (list (runs:queue-next-hed tal reg reglen regfull)
		(runs:queue-next-tal tal reg reglen regfull)
		(runs:queue-next-reg tal reg reglen regfull)
		(cons hed reruns))
	  #f)) ;; #f flags do not loop

     ((and (not (null? fails))(eq? testmode 'toplevel))
      (if (or (not (null? reg))(not (null? tal)))
	   (list (car newtal)(append (cdr newtal) reg) '() reruns)
	  #f)) 
     (else
      (debug:print 1 "WARNING: FAILS or incomplete tests are preventing completion of this run. Dropping test " hed " from the run queue")
      (list (runs:queue-next-hed tal reg reglen regfull)







>
>
|
|
|
|

>







532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
		  reruns))))

     ((and (not (null? fails))(eq? testmode 'normal))
      (debug:print-info 1 "test "  hed " (mode=" testmode ") has failed prerequisite(s); "
			(string-intersperse (map (lambda (t)(conc (db:test-get-testname t) ":" (db:test-get-state t)"/"(db:test-get-status t))) fails) ", ")
			", removing it from to-do list")
      (if (or (not (null? reg))(not (null? tal)))
	  (begin
	    (hash-table-set! test-registry hed 'CANNOTRUN)
	    (list (runs:queue-next-hed tal reg reglen regfull)
		  (runs:queue-next-tal tal reg reglen regfull)
		  (runs:queue-next-reg tal reg reglen regfull)
		  (cons hed reruns)))
	  #f)) ;; #f flags do not loop

     ((and (not (null? fails))(eq? testmode 'toplevel))
      (if (or (not (null? reg))(not (null? tal)))
	   (list (car newtal)(append (cdr newtal) reg) '() reruns)
	  #f)) 
     (else
      (debug:print 1 "WARNING: FAILS or incomplete tests are preventing completion of this run. Dropping test " hed " from the run queue")
      (list (runs:queue-next-hed tal reg reglen regfull)