Megatest

Check-in [aba5b97c7d]
Login
Overview
Comment:Added ability to control deadtime from config. Set default deadtime to 1800 seconds
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.55
Files: files | file ages | folders
SHA1: aba5b97c7d4e2afcf25aca11a5db413dbb4d4ec8
User & Date: mrwellan on 2013-10-21 20:25:46
Other Links: branch diff | manifest | tags
Context
2013-10-22
23:10
Split find and mark incomplete to iterate over runs, fixed logic bug in select statements for find and mark. check-in: 7bb000c05a user: matt tags: v1.55
2013-10-21
20:25
Added ability to control deadtime from config. Set default deadtime to 1800 seconds check-in: aba5b97c7d user: mrwellan tags: v1.55
10:37
Added run and test time display to test control panel. Added default runtimelim check-in: a4cf89e73c user: mrwellan tags: v1.55
Changes

Modified db.scm from [4356e24404] to [a74f9a32c4].

463
464
465
466
467
468
469
470





471
472
473
474
475
476
477
478
479
480
481
482
483
       (db:set-var db "MEGATEST_VERSION" megatest-version))))))

;;======================================================================
;; M A I N T E N A N C E
;;======================================================================

(define (db:find-and-mark-incomplete db)
  (let ((incompleted '()))





    (sqlite3:for-each-row 
     (lambda (test-id)
       (set! incompleted (cons test-id incompleted)))
     db
     "SELECT id FROM tests WHERE event_time<? AND state IN ('RUNNING','REMOTEHOSTSTART');"
     (- (current-seconds) 600)) ;; in RUNNING or REMOTEHOSTSTART for more than 10 minutes
    (sqlite3:for-each-row
     (lambda (test-id)
       (set! incompleted (cons test-id incompleted)))
     db
     "SELECT id FROM tests WHERE event_time<? AND state IN ('LAUNCHED');"
     (- (current-seconds)(* 60 60 24))) ;; in LAUNCHED for more than one day. Could be long due to job queues TODO/BUG: Need override for this in config
    ;; These are defunct tests, do not do all the overhead of set-state-status. Force them to INCOMPLETE.







|
>
>
>
>
>





|







463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
       (db:set-var db "MEGATEST_VERSION" megatest-version))))))

;;======================================================================
;; M A I N T E N A N C E
;;======================================================================

(define (db:find-and-mark-incomplete db)
  (let* ((incompleted '())
	 (deadtime-str (configf:lookup *configdat* "setup" "deadtime"))
	 (deadtime     (if (and deadtime-str
				(string->number deadtime-str))
			   (string->number deadtime-str)
			   1800)))
    (sqlite3:for-each-row 
     (lambda (test-id)
       (set! incompleted (cons test-id incompleted)))
     db
     "SELECT id FROM tests WHERE event_time<? AND state IN ('RUNNING','REMOTEHOSTSTART');"
     (- (current-seconds) deadtime)) ;; in RUNNING or REMOTEHOSTSTART for more than 10 minutes
    (sqlite3:for-each-row
     (lambda (test-id)
       (set! incompleted (cons test-id incompleted)))
     db
     "SELECT id FROM tests WHERE event_time<? AND state IN ('LAUNCHED');"
     (- (current-seconds)(* 60 60 24))) ;; in LAUNCHED for more than one day. Could be long due to job queues TODO/BUG: Need override for this in config
    ;; These are defunct tests, do not do all the overhead of set-state-status. Force them to INCOMPLETE.

Modified tests/fullrun/megatest.config from [cf9da9135a] to [f16dafe4d4].

30
31
32
33
34
35
36





37
38
39
40
41
42
43
# numeric value given.
#
runqueue 20

# Default runtimelim 1d 1h 1m 10s
#
runtimelim 10m






# It is possible (but not recommended) to override the rsync command used
# to populate the test directories. For test development the following 
# example can be useful
#
# testcopycmd cp --remove-destination -rsv TEST_SRC_PATH/. TEST_TARG_PATH/. >> TEST_TARG_PATH/mt_launch.log 2>> TEST_TARG_PATH/mt_launch.log








>
>
>
>
>







30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# numeric value given.
#
runqueue 20

# Default runtimelim 1d 1h 1m 10s
#
runtimelim 10m

# Deadtime - when to consider tests dead (i.e. haven't heard from them in too long)
# Number in seconds
#
deadtime 5

# It is possible (but not recommended) to override the rsync command used
# to populate the test directories. For test development the following 
# example can be useful
#
# testcopycmd cp --remove-destination -rsv TEST_SRC_PATH/. TEST_TARG_PATH/. >> TEST_TARG_PATH/mt_launch.log 2>> TEST_TARG_PATH/mt_launch.log