Megatest

Check-in [06185d0933]
Login
Overview
Comment:Automated merge of v1.63/a03bdb5581/integ into integ-home
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | integ-home
Files: files | file ages | folders
SHA1: 06185d093324ea3cdd3fda78c552ef123ac97a0b
User & Date: matt on 2017-01-23 13:55:52
Other Links: branch diff | manifest | tags
Context
2017-01-23
16:56
Automated merge of pjhatwal/3585f5b63a/integ into integ-home check-in: 447f505fd0 user: matt tags: integ-home
13:55
Automated merge of v1.63/a03bdb5581/integ into integ-home check-in: 06185d0933 user: matt tags: integ-home
13:28
Changed num tests to draw per cycle to 200, bumped version to v1.6305 check-in: a03bdb5581 user: mrwellan tags: v1.63, v1.6305
12:38
Automated merge of v1.63-xor-report/b4dc6cb51b/integ into integ-home check-in: 8917440288 user: matt tags: integ-home
Changes

Modified common.scm from [7eb7ab294e] to [040477db58].

819
820
821
822
823
824
825
826

827
828
829
830
831
832
833
819
820
821
822
823
824
825

826
827
828
829
830
831
832
833







-
+








(define (common:args-get-status)
  (or (args:get-arg "-status")(args:get-arg ":status")))

(define (common:args-get-testpatt rconf)
  (let* ((tagexpr (args:get-arg "-tagexpr"))
         (tags-testpatt (if tagexpr (string-join (runs:get-tests-matching-tags tagexpr) ",") #f))
         (testpatt-key  (if (args:get-arg "-mode") (args:get-arg "-mode") "TESTPATT"))
         (testpatt-key  (if (args:get-arg "--modepatt") (args:get-arg "--modepatt") "TESTPATT"))
         (args-testpatt (or (args:get-arg "-testpatt") (args:get-arg "-runtests") "%"))
         (rtestpatt     (if rconf (runconfigs-get rconf testpatt-key) #f)))
    (cond
     (tags-testpatt
      (debug:print-info 0 *default-log-port* "-tagexpr "tagexpr" selects testpatt "tags-testpatt)
      tags-testpatt)
     ((and (equal? args-testpatt "%") rtestpatt)

Modified dashboard.scm from [233c496696] to [ff388ff4d0].

515
516
517
518
519
520
521
522

523
524
525
526
527

528
529
530
531
532
533
534
515
516
517
518
519
520
521

522





523
524
525
526
527
528
529
530







-
+
-
-
-
-
-
+







;; gets all the tests for run-id that match testnamepatt and key-vals, merges them
;;
;;    NOTE: Yes, this is used
;;
(define (dboard:get-tests-for-run-duplicate tabdat run-id run testnamepatt key-vals)
  (let* ((start-time   (current-seconds))
	 (access-mode  (dboard:tabdat-access-mode tabdat))
         (num-to-get   (let ((num-tests-from-config (configf:lookup *configdat* "setup" "num-tests-to-get")))
         (num-to-get   (string->number (or (configf:lookup *configdat* "setup" "num-tests-to-get")
			 (if num-tests-from-config
			     (begin
			       (BB> "override num-tests 100 -> "num-tests-from-config)
			       (string->number num-tests-from-config))
			     100)))
                                           "200")))
	 (states       (hash-table-keys (dboard:tabdat-state-ignore-hash tabdat)))
	 (statuses     (hash-table-keys (dboard:tabdat-status-ignore-hash tabdat)))
         (do-not-use-db-file-timestamps #f) ;; (configf:lookup *configdat* "setup" "do-not-use-db-file-timestamps")) ;; this still hosts runs-summary-tab
         (do-not-use-query-timestamps   #f) ;; (configf:lookup *configdat* "setup" "do-not-use-query-timestamps")) ;; this no longer troubles runs-summary-tab
	 (sort-info    (get-curr-sort))
	 (sort-by      (vector-ref sort-info 1))
	 (sort-order   (vector-ref sort-info 2))
585
586
587
588
589
590
591
592

593
594
595
596
597
598
599
581
582
583
584
585
586
587

588
589
590
591
592
593
594
595







-
+







	(dboard:rundat-last-db-time-set!    run-dat (- start-time 2)))

    ;; to limit the amount of data transferred each cycle use limit of num-to-get and offset
    ;; DO NOT bump time indexes last-update and last-db-time until all the first pass of the
    ;; data has been read
    ;; set last-update to 0 if still getting data incrementally ;; NO NEED, handled above
    ;;
    (debug:print 0 *default-log-port* "got-all: " got-all " multi-get: " multi-get " num-to-get: " num-to-get " (length tmptests): " (length tmptests) " db-modified: " db-modified " db-mod-time: " db-mod-time " db-path: " db-path)
    ;; (debug:print 0 *default-log-port* "got-all: " got-all " multi-get: " multi-get " num-to-get: " num-to-get " (length tmptests): " (length tmptests) " db-modified: " db-modified " db-mod-time: " db-mod-time " db-path: " db-path)
    (if got-all
	(begin
	  (dboard:rundat-last-update-set!     run-dat (- start-time 2))
	  (dboard:rundat-run-data-offset-set! run-dat 0))
	(begin
	  (dboard:rundat-run-data-offset-set! run-dat
					      (+ num-to-get (dboard:rundat-run-data-offset run-dat)))))

Modified db.scm from [abd06b4b08] to [a6e4ada759].

140
141
142
143
144
145
146
147

148
149
150
151
152
153
154
140
141
142
143
144
145
146

147
148
149
150
151
152
153
154







-
+







	 (db    (if have-struct
		    (db:dbdat-get-db dbdat)
		    dbstruct))
	 (use-mutex (> *api-process-request-count* 25)))
    (if (and use-mutex
	     (common:low-noise-print 120 "over-50-parallel-api-requests"))
	(debug:print-info 0 *default-log-port* *api-process-request-count* " parallel api requests being processed in process " (current-process-id) ", throttling access"))
    (if (common:low-noise-print 120 (conc "parallel-api-requests" *max-api-process-requests*))
    (if (common:low-noise-print 600 (conc "parallel-api-requests" *max-api-process-requests*))
	(debug:print-info 0 *default-log-port* "Parallel api request count: " *api-process-request-count* " max parallel requests: " *max-api-process-requests*))
    (handle-exceptions
     exn
     (begin
       (print-call-chain (current-error-port))
       (debug:print-error 0 *default-log-port* "sqlite3 issue in db:with-db, dbstruct=" dbstruct ", run-id=" run-id ", proc=" proc ", params=" params " error: " ((condition-property-accessor 'exn 'message) exn))
       ;; there is no recovering at this time. exit

Modified megatest-version.scm from [0bfef35cf2] to [bca0c2d1c1].

1
2
3
4
5
6

7
1
2
3
4
5

6
7





-
+

;; Always use two or four digit decimal
;; 1.01, 1.02...1.10,1.11,1.1101 ... 1.99,2.00..

(declare (unit megatest-version))

(define megatest-version 1.6304)
(define megatest-version 1.6305)

Modified megatest.scm from [ba3fdf979e] to [d7a15310c1].

65
66
67
68
69
70
71

72
73
74
75
76
77
78
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79







+







(define help (conc "
Megatest, documentation at http://www.kiatoa.com/fossils/megatest
  version " megatest-version "
  license GPL, Copyright Matt Welland 2006-2015

Usage: megatest [options]
  -h                      : this help
  -manual                 : show the Megatest user manual
  -version                : print megatest version (currently " megatest-version ")

Launching and managing runs
  -runall                 : run all tests or as specified by -testpatt
  -remove-runs            : remove the data for a run, requires -runname and -testpatt
                            Optionally use :state and :status
  -set-state-status X,Y   : set state to X and status to Y, requires controls per -remove-runs
91
92
93
94
95
96
97
98

99
100
101
102
103
104
105
92
93
94
95
96
97
98

99
100
101
102
103
104
105
106







-
+







Selectors (e.g. use for -runtests, -remove-runs, -set-state-status, -list-runs etc.)
  -target key1/key2/...   : run for key1, key2, etc.
  -reqtarg key1/key2/...  : run for key1, key2, etc. but key1/key2 must be in runconfig
  -testpatt patt1/patt2,patt3/...  : % is wildcard
  -runname                : required, name for this particular test run
  -state                  : Applies to runs, tests or steps depending on context
  -status                 : Applies to runs, tests or steps depending on context
  -mode key               : load testpatt from <key> in runconfigs instead of default TESTPATT
  --modepatt key          : load testpatt from <key> in runconfigs instead of default TESTPATT if -testpatt and -tagexpr are not specified
  -tagexpr tag1,tag2%,..  : select tests with tags matching expression

Test helpers (for use inside tests)
  -step stepname
  -test-status            : set the state and status of a test (use :state and :status)
  -setlog logfname        : set the path/filename to the final log relative to the test
                            directory. may be used with -test-status
210
211
212
213
214
215
216
217

218
219
220
221
222
223
224
211
212
213
214
215
216
217

218
219
220
221
222
223
224
225







-
+







			"-runname"
			":state"  
			"-state"
			":status"
			"-status"
			"-list-runs"
			"-testpatt"
                        "-mode"
                        "--modepatt"
                        "-tagexpr"
			"-itempatt"
			"-setlog"
			"-set-toplog"
			"-runstep"
			"-logpro"
			"-m"

Modified utils/mk_wrapper from [4b9a0dffa4] to [de6ec68c4a].

25
26
27
28
29
30
31












32
33
34
35
36
37
38
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50







+
+
+
+
+
+
+
+
+
+
+
+







#   echo "source $prefix/bin/.\$(lsb_release -sr)/cfg.sh" >> $target
# fi
# echo "exec $prefix/bin/.\$(lsb_release -sr)/$cmd \"\$@\"" >> $target
echo "#!/bin/bash" > $target

if [[ $cmd =~ dboard ]]; then
    cat >> $target <<'EOF'

# disable if not running on homehost
if [[ -e .homehost ]]; then
  homehostname=$( host `cat .homehost` | awk '{print $NF}' | sed 's/\.$//' )
  hostname=$( hostname -f )

  if [[ ! ($homehostname == $hostname) ]]; then
    echo "ERROR: this host ($hostname) is not the homehost ($homehostname) for this megatest run area.  Cannot start dashboard."
    echo "       Please log into homehost before launching dashboard."
    exit 1
  fi
fi

# check that $DISPLAY is set
if [[ -z $DISPLAY ]]; then
   echo 'ERROR: $DISPLAY environment variable is not set; megatest dashboard requires X display address to be set in $DISPLAY.'
   exit 1
fi