Overview
Context
Changes
Modified db.scm
from [d5531861e8]
to [4d021448a6].
︙ | | |
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
|
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
|
-
+
-
+
|
(is-running (equal? state "RUNNING"))
(is-killed (equal? state "KILLED"))
(is-ok (member status '("PASS" "WARN" "CHECK" "WAIVED" "SKIP")))
(same-itempath (equal? ref-item-path item-path)))
(set! ever-seen #t)
(cond
;; case 1, non-item (parent test) is
((and (equal? item-path "") ;; this is the parent test
((and (equal? item-path "") ;; this is the parent test of the waiton being examined
is-completed
(or is-ok (not (null? (lset-intersection eq? mode '(toplevel itemmatch itemwait))))))
(or is-ok (not (null? (lset-intersection eq? mode '(toplevel)))))) ;; itemmatch itemwait))))))
(set! parent-waiton-met #t))
;; Special case for toplevel and KILLED
((and (equal? item-path "") ;; this is the parent test
is-killed
(member 'toplevel mode))
(set! parent-waiton-met #t))
;; For itemwait mode IFF the previous matching item is good the set parent-waiton-met
|
︙ | | |
Modified runs.scm
from [d8be71819d]
to [21e144c8b1].
︙ | | |
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
|
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
|
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
|
(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)
(runs:queue-next-tal tal reg reglen regfull)
(runs:queue-next-reg tal reg reglen regfull)
reruns))))) ;; (list (car newtal)(cdr newtal) reg reruns)))))
(define (runs:mixed-list-testname-and-testrec->list-of-strings inlst)
(if (null? inlst)
'()
(map (lambda (t)
(cond
((vector? t)
(conc (db:test-get-state t) "/" (db:test-get-status t)))
((string? t)
t)
(else
(conc t))))
inlst))
(map (lambda (t)
(cond
((vector? t)
(conc (db:test-get-state t) "/" (db:test-get-status t)))
((string? t)
t)
(else
(conc t))))
inlst)))
(define (runs:process-expanded-tests hed tal reg reruns reglen regfull test-record runname test-name item-path jobgroup max-concurrent-jobs run-id waitons item-path testmode test-patts required-tests test-registry registry-mutex flags keyvals run-info newtal all-tests-registry)
(let* ((run-limits-info (runs:can-run-more-tests jobgroup max-concurrent-jobs)) ;; look at the test jobgroup and tot jobs running
(have-resources (car run-limits-info))
(num-running (list-ref run-limits-info 1))
(num-running-in-jobgroup (list-ref run-limits-info 2))
(max-concurrent-jobs (list-ref run-limits-info 3))
|
︙ | | |
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
|
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
|
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
;; If one or more of the prereqs-not-met are FAIL then we can issue
;; a message and drop hed from the items to be processed.
;; (runs:mixed-list-testname-and-testrec->list-of-strings prereqs-not-met)
(if (not (null? prereqs-not-met))
(debug:print-info 1 "waiting on tests; " (string-intersperse
(runs:mixed-list-testname-and-testrec->list-of-strings
prereqs-not-met) ", ")))
(if (null? fails)
(begin
;; couldn't run, take a breather
(debug:print-info 0 "Waiting for more work to do...")
(thread-sleep! 1)
(list (car newtal)(cdr newtal) reg reruns))
;; the waiton is FAIL so no point in trying to run hed ever again
(if (or (not (null? reg))(not (null? tal)))
(if (vector? hed)
(begin
(debug:print 1 "WARN: Dropping test " (db:test-get-testname hed) "/" (db:test-get-item-path hed)
" from the launch list as it has prerequistes that are FAIL")
(runs:shrink-can-run-more-tests-count) ;; DELAY TWEAKER (still needed?)
;; (thread-sleep! *global-delta*)
(hash-table-set! test-registry (runs:make-full-test-name test-name item-path) 'removed)
(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)))
reruns ;; WAS: (cons hed reruns) ;; but that makes no sense?
))
(begin
(debug:print 0 "WARNING: Test not processed correctly. Could be a race condition in your test implementation? Dropping test " hed) ;; " as it has prerequistes that are FAIL. (NOTE: hed is not a vector)")
(debug:print 0 "WARNING: Test may not have processed correctly. Could be a race condition in your test implementation? Dropping test " hed) ;; " as it has prerequistes that are FAIL. (NOTE: hed is not a vector)")
(runs:shrink-can-run-more-tests-count) ;; DELAY TWEAKER (still needed?)
;; (list hed tal reg reruns)
(list (car newtal)(cdr newtal) reg reruns)
))))))))
;; (list (car newtal)(cdr newtal) reg reruns)
(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) ;; (cons hed reruns))
;;(list (if (null? tal)(car newtal)(car tal))
;; tal
;; reg
;; reruns)
))
;; can't drop this - maybe running? Just keep trying
(list hed
tal
reg
reruns)))))))
;; every time though the loop increment the test/itempatt val.
;; when the min is > max-allowed and none running then force exit
;;
(define *max-tries-hash* (make-hash-table))
;; test-records is a hash table testname:item_path => vector < testname testconfig waitons priority items-info ... >
|
︙ | | |
Modified tests/fdktestqa/testqa/Makefile
from [e13e6735ff]
to [fedc930f59].
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
+
+
+
-
+
-
+
-
+
+
|
BINDIR = $(PWD)/../../../bin
PATH := $(BINDIR):$(PATH)
MEGATEST = $(BINDIR)/megatest
DASHBOARD = $(BINDIR)/dashboard
RUNNAME = a
all :
$(MEGATEST) -remove-runs -target a/b :runname c -testpatt %/%
$(MEGATEST) -runtests % -target a/b :runname c
bigbig :
$(MEGATEST) -server - -daemonize ; sleep 3
for tn in a b c d;do \
($(MEGATEST) -runtests % -target a/b :runname $tn & ) ; \
done
bigrun :
$(MEGATEST) -runtests bigrun -target a/bigrun :runname a
$(MEGATEST) -runtests bigrun -target a/bigrun :runname $(RUNNAME)
bigrun2 :
$(MEGATEST) -runtests bigrun2 -target a/bigrun2 :runname a -transport http
$(MEGATEST) -runtests bigrun2 -target a/bigrun2 :runname $(RUNNAME)
dashboard :
$(DASHBOARD) -rows 20 &
compile :
$(MEGATEST) -stop-server 0
(cd ../../..;make && make install)
clean :
rm -rf ../simple*/*/* megatest.db
rm -rf ../simple*/*/* megatest.db monitor.db
|
Modified tests/fdktestqa/testqa/tests/bigrun/step1.sh
from [580746490f]
to [45d51b92e4].
1
2
3
4
5
6
7
8
9
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
-
-
+
+
-
+
-
+
+
+
+
-
+
+
|
#!/bin/sh
if [ $NUMBER -lt 15 ];then
#!/bin/bash
if [ $NUMBER -lt 10 ];then
sleep 2
sleep `echo 2 * $NUMBER | bc`
sleep `echo 4 * $NUMBER | bc`
else
sleep 100
sleep 130
fi
if [[ $RANDOM -lt 10000 ]];then
exit 1
else
exit 0
exit 0
fi
|