Megatest

Check-in [c260f8f3ea]
Login
Overview
Comment:fix to honor reruns count from config
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.65
Files: files | file ages | folders
SHA1: c260f8f3ea5df6be3602ccddc140193ba64443fd
User & Date: pjhatwal on 2018-06-20 16:51:51
Other Links: branch diff | manifest | tags
Context
2018-06-22
12:30
Fixed subrun test check-in: c1e7660763 user: ritikaag tags: v1.65
2018-06-20
16:51
fix to honor reruns count from config check-in: c260f8f3ea user: pjhatwal tags: v1.65
2018-06-19
19:22
fix to run post hook script only once check-in: 2f6d498c71 user: pjhatwal tags: v1.65
Changes

Modified megatest.scm from [d7d2b320b7] to [30b1232f2c].

1667
1668
1669
1670
1671
1672
1673






1674
1675
1676
1677
1678
1679
1680

1681
1682
1683
1684
1685
1686
1687
               (runs:operate-on 'set-state-status
                                target
                                (common:args-get-runname)  ;; (or (args:get-arg "-runname")(args:get-arg ":runname"))
                                "%" ;; (common:args-get-testpatt #f) ;; (args:get-arg "-testpatt")
                                ;; state:  states
                                status: #f
                                new-state-status: "NOT_STARTED,n/a")))






         (runs:run-tests target
                         runname
                         #f ;; (common:args-get-testpatt #f)
                         ;; (or (args:get-arg "-testpatt")
                         ;;     "%")
                         user
                         args:arg-hash)))))


;;======================================================================
;; run one test
;;======================================================================

;; 1. find the config file
;; 2. change to the test directory







>
>
>
>
>
>






|
>







1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
               (runs:operate-on 'set-state-status
                                target
                                (common:args-get-runname)  ;; (or (args:get-arg "-runname")(args:get-arg ":runname"))
                                "%" ;; (common:args-get-testpatt #f) ;; (args:get-arg "-testpatt")
                                ;; state:  states
                                status: #f
                                new-state-status: "NOT_STARTED,n/a")))
         (let* ((config-reruns      (let ((x (configf:lookup *configdat* "setup" "reruns")))
			       				(if x (string->number x) #f)))
               (rerun-cnt (if config-reruns
                              config-reruns
                              1)))

         (runs:run-tests target
                         runname
                         #f ;; (common:args-get-testpatt #f)
                         ;; (or (args:get-arg "-testpatt")
                         ;;     "%")
                         user
                         args:arg-hash
                         run-count: rerun-cnt))))))

;;======================================================================
;; run one test
;;======================================================================

;; 1. find the config file
;; 2. change to the test directory

Modified runs.scm from [b809f52b3a] to [672152f618].

393
394
395
396
397
398
399

400
401
402
403
404
405
406
407
408
409
      (exit 1))

    ;; per user request. If less than 100Meg space on dbdir partition, bail out with error
    ;; this will reduce issues in database corruption
    (common:check-db-dir-and-exit-if-insufficient)

    ;; override the number of reruns from the configs

    (if (and config-reruns
	     (> run-count config-reruns))
	(set! run-count config-reruns))

    ;; (if (tasks:need-server run-id)(tasks:start-and-wait-for-server tdbdat run-id 10))

    (let ((sighand (lambda (signum)
		     ;; (signal-mask! signum) ;; to mask or not? seems to cause issues in exiting
		     (set! *time-to-exit* #t)
		     (print "Received signal " signum ", cleaning up before exit. Please wait...")







>
|
|
|







393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
      (exit 1))

    ;; per user request. If less than 100Meg space on dbdir partition, bail out with error
    ;; this will reduce issues in database corruption
    (common:check-db-dir-and-exit-if-insufficient)

    ;; override the number of reruns from the configs
    ;; this needs to be done at the place where is first runs:run-tests called 
    ;(if (and config-reruns
	  ;   (> run-count config-reruns))
 	  ;(set! run-count config-reruns))

    ;; (if (tasks:need-server run-id)(tasks:start-and-wait-for-server tdbdat run-id 10))

    (let ((sighand (lambda (signum)
		     ;; (signal-mask! signum) ;; to mask or not? seems to cause issues in exiting
		     (set! *time-to-exit* #t)
		     (print "Received signal " signum ", cleaning up before exit. Please wait...")
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
      (runs:run-tests target runname test-patts user flags run-count: (- run-count 1)))))
	  (debug:print-info 0 *default-log-port* "No tests to run")))
    (debug:print-info 4 *default-log-port* "All done by here")
    ;; TODO: try putting post hook call here
    (if (eq? run-count 0)
     (begin  
      (debug:print-info 0 *default-log-port* "Calling Post Hook")  
      (debug:print-info 4 *default-log-port* " run-count " run-count)
      (runs:run-post-hook run-id))
      (debug:print-info 4 *default-log-port* "Not calling post hook runcount = " run-count ))   
    (rmt:tasks-set-state-given-param-key task-key "done")
    ;; (sqlite3:finalize! tasks-db)
    ))


;; loop logic. These are used in runs:run-tests-queue to make it a bit more readable.
;;







|

|







666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
      (runs:run-tests target runname test-patts user flags run-count: (- run-count 1)))))
	  (debug:print-info 0 *default-log-port* "No tests to run")))
    (debug:print-info 4 *default-log-port* "All done by here")
    ;; TODO: try putting post hook call here
    (if (eq? run-count 0)
     (begin  
      (debug:print-info 0 *default-log-port* "Calling Post Hook")  
      (debug:print-info 2 *default-log-port* " run-count " run-count)
      (runs:run-post-hook run-id))
      (debug:print-info 2 *default-log-port* "Not calling post hook runcount = " run-count ))   
    (rmt:tasks-set-state-given-param-key task-key "done")
    ;; (sqlite3:finalize! tasks-db)
    ))


;; loop logic. These are used in runs:run-tests-queue to make it a bit more readable.
;;