Check-in [5b8b902667]
Not logged in
Overview
SHA1 Hash:5b8b902667247dd0ab12e679f3d1e9e699b0d8b0
Date: 2011-12-05 13:03:13
User: mrwellan
Comment:Only re-run if using the -rerun switch or -force switch (difference from old behaviour)
Timelines: family | ancestors | descendants | both | trunk | waiton-broken-but-works
Downloads: Tarball | ZIP archive
Other Links: files | file ages | manifest
Tags And Properties
Changes

Modified runs.scm from [bf2ea0777435e7e1] to [82d8e33935b02421].

279 "itemdat: " itemdat 279 "itemdat: " itemdat 280 "\n items: " items 280 "\n items: " items 281 "\n item-path: " item-path) 281 "\n item-path: " item-path) 282 (cond 282 (cond 283 ((not items) ;; when false the test is ok to be handed off to launch (b 283 ((not items) ;; when false the test is ok to be handed off to launch (b 284 (let ((have-resources (runs:can-run-more-tests db test-record)) ;; lo 284 (let ((have-resources (runs:can-run-more-tests db test-record)) ;; lo 285 (prereqs-not-met (db:get-prereqs-not-met db run-id waitons item- 285 (prereqs-not-met (db:get-prereqs-not-met db run-id waitons item- > 286 ;; Don't know at this time if the test have been launched at some ti > 287 ;; i.e. is this a re-launch? 286 (if (and have-resources 288 (if (and have-resources 287 (null? prereqs-not-met)) 289 (null? prereqs-not-met)) 288 ;; no loop - drop though and use the loop at the bottom 290 ;; no loop - drop though and use the loop at the bottom 289 (run:test db run-id runname keyvallst test-record flags #f) 291 (run:test db run-id runname keyvallst test-record flags #f) 290 ;; else the run is stuck, temporarily or permanently 292 ;; else the run is stuck, temporarily or permanently 291 (let ((newtal (append tal (list hed)))) 293 (let ((newtal (append tal (list hed)))) 292 ;; couldn't run, take a breather 294 ;; couldn't run, take a breather ................................................................................................................................................................................ 369 (debug:print 5 371 (debug:print 5 370 "test-config: " (hash-table->alist test-conf) 372 "test-config: " (hash-table->alist test-conf) 371 "\n itemdat: " itemdat 373 "\n itemdat: " itemdat 372 ) 374 ) 373 ;; setting itemdat to a list if it is #f 375 ;; setting itemdat to a list if it is #f 374 (if (not itemdat)(set! itemdat '())) 376 (if (not itemdat)(set! itemdat '())) 375 (set! item-path (item-list->path itemdat)) 377 (set! item-path (item-list->path itemdat)) 376 (debug:print 1 "Attempting to launch test " test-name "/" item-path) | 378 (debug:print 2 "Attempting to launch test " test-name "/" item-path) 377 (setenv "MT_TEST_NAME" test-name) ;; 379 (setenv "MT_TEST_NAME" test-name) ;; 378 (setenv "MT_RUNNAME" runname) 380 (setenv "MT_RUNNAME" runname) 379 (set-megatest-env-vars db run-id) ;; these may be needed by the launching pr 381 (set-megatest-env-vars db run-id) ;; these may be needed by the launching pr 380 (change-directory *toppath*) 382 (change-directory *toppath*) 381 383 382 ;; Here is where the test_meta table is best updated 384 ;; Here is where the test_meta table is best updated 383 (runs:update-test_meta db test-name test-conf) 385 (runs:update-test_meta db test-name test-conf) ................................................................................................................................................................................ 405 ;; -force, run no matter what 407 ;; -force, run no matter what 406 (force (set! runflag #t)) 408 (force (set! runflag #t)) 407 ;; NOT_STARTED, run no matter what 409 ;; NOT_STARTED, run no matter what 408 ((equal? (test:get-state testdat) "NOT_STARTED")(set! runflag #t)) 410 ((equal? (test:get-state testdat) "NOT_STARTED")(set! runflag #t)) 409 ;; not -rerun and PASS, WARN or CHECK, do no run 411 ;; not -rerun and PASS, WARN or CHECK, do no run 410 ((and (or (not rerun) 412 ((and (or (not rerun) 411 keepgoing) 413 keepgoing) > 414 ;; Require to force re-run for COMPLETED or *anything* + PASS, 412 (member (test:get-status testdat) '("PASS" "WARN" "CHECK"))) | 415 (or (member (test:get-status testdat) '("PASS" "WARN" "CHECK") > 416 (member (test:get-state testdat) '("COMPLETED")))) 413 (set! runflag #f)) 417 (set! runflag #f)) 414 ;; -rerun and status is one of the specifed, run it 418 ;; -rerun and status is one of the specifed, run it 415 ((and rerun 419 ((and rerun 416 (let ((rerunlst (string-split rerun ","))) ;; FAIL, 420 (let ((rerunlst (string-split rerun ","))) ;; FAIL, 417 (member (test:get-status testdat) rerunlst))) 421 (member (test:get-status testdat) rerunlst))) 418 (set! runflag #t)) 422 (set! runflag #t)) 419 ;; -keepgoing, do not rerun FAIL 423 ;; -keepgoing, do not rerun FAIL ................................................................................................................................................................................ 423 ((and (not rerun) 427 ((and (not rerun) 424 (member (test:get-status testdat) '("FAIL" "n/a"))) 428 (member (test:get-status testdat) '("FAIL" "n/a"))) 425 (set! runflag #t)) 429 (set! runflag #t)) 426 (else (set! runflag #f))) 430 (else (set! runflag #f))) 427 (debug:print 6 "RUNNING => runflag: " runflag " STATE: " (test:get-st 431 (debug:print 6 "RUNNING => runflag: " runflag " STATE: " (test:get-st 428 (if (not runflag) 432 (if (not runflag) 429 (if (not parent-test) 433 (if (not parent-test) 430 (debug:print 1 "NOTE: Not starting test " new-test-name " as | 434 (debug:print 1 "NOTE: Not starting test " new-test-name " as > 435 "\" and status \"" (test:get-status testdat) "\" 431 ;; NOTE: No longer be checking prerequisites here! Will never get 436 ;; NOTE: No longer be checking prerequisites here! Will never get 432 ;; already met. 437 ;; already met. 433 (if (not (launch-test db run-id runname test-conf keyvallst test- 438 (if (not (launch-test db run-id runname test-conf keyvallst test- 434 (begin 439 (begin 435 (print "ERROR: Failed to launch the test. Exiting as soon a 440 (print "ERROR: Failed to launch the test. Exiting as soon a 436 (set! *globalexitstatus* 1) ;; 441 (set! *globalexitstatus* 1) ;; 437 (process-signal (current-process-id) signal/kill)))))) 442 (process-signal (current-process-id) signal/kill))))))