Overview
Comment: | Fixed regression in item running |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | v1.60 | v1.6018 |
Files: | files | file ages | folders |
SHA1: |
c897553b7ad06b4516780b883cdc31c7 |
User & Date: | matt on 2015-07-05 21:17:27 |
Other Links: | branch diff | manifest | tags |
Context
2015-07-06
| ||
23:23 | Fixed waiton runner issues check-in: 4a3e5b5724 user: matt tags: v1.60 | |
2015-07-05
| ||
21:17 | Fixed regression in item running check-in: c897553b7a user: matt tags: v1.60, v1.6018 | |
16:58 | Fixed item based waiting. check-in: e2d83122be user: matt tags: v1.60, v1.6018 | |
Changes
Modified runs.scm from [8e1563ef2c] to [b5f1b11249].
︙ | ︙ | |||
309 310 311 312 313 314 315 316 317 318 319 320 321 322 | ;; now add non-directly referenced dependencies (i.e. waiton) ;;====================================================================== ;; refactoring this block into tests:get-full-data ;; ;; What happended, this code is now duplicated in tests!? ;; ;;====================================================================== (if (not (null? test-names)) (let loop ((hed (car test-names)) (tal (cdr test-names))) ;; 'return-procs tells the config reader to prep running system but return a proc (change-directory *toppath*) ;; PLEASE OPTIMIZE ME!!! I think this should be a no-op but there are several places where change-directories could be happening. (setenv "MT_TEST_NAME" hed) ;; (let* ((config (tests:get-testconfig hed all-tests-registry 'return-procs)) (waitons (let ((instr (if config | > | 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 | ;; now add non-directly referenced dependencies (i.e. waiton) ;;====================================================================== ;; refactoring this block into tests:get-full-data ;; ;; What happended, this code is now duplicated in tests!? ;; ;;====================================================================== (if (not (null? test-names)) (let loop ((hed (car test-names)) (tal (cdr test-names))) ;; 'return-procs tells the config reader to prep running system but return a proc (change-directory *toppath*) ;; PLEASE OPTIMIZE ME!!! I think this should be a no-op but there are several places where change-directories could be happening. (setenv "MT_TEST_NAME" hed) ;; (let* ((config (tests:get-testconfig hed all-tests-registry 'return-procs)) (waitons (let ((instr (if config |
︙ | ︙ | |||
383 384 385 386 387 388 389 | (else #f))) ;; not iterated #f ;; itemsdat 5 #f ;; spare - used for item-path ))) (for-each (lambda (waiton) (if (and waiton (not (member waiton test-names))) | | > > > > > > > > > > > > > > > > | < | | > > > > > > | | > > > | | 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 | (else #f))) ;; not iterated #f ;; itemsdat 5 #f ;; spare - used for item-path ))) (for-each (lambda (waiton) (if (and waiton (not (member waiton test-names))) (let* ((new-test-patts (tests:extend-test-patts test-patts hed waiton #f)) (waiton-record (hash-table-ref/default test-records waiton #f)) (waiton-tconfig (if waiton-record (vector-ref waiton-record 1) #f)) (waiton-itemized (and waiton-tconfig (or (hash-table-ref/default waiton-tconfig "items" #f) (hash-table-ref/default waiton-tconfig "itemstable" #f))))) (debug:print-info 0 "Test " waiton " has " (if waiton-record "no" "a") " waiton-record and" (if waiton-itemized " " " no ") "items") ;; need to account for test-patt here, if I am test "a", selected with a test-patt of "hed/b%" ;; and we are waiting on "waiton" we need to add "waiton/,waiton/b%" to test-patt ;; is this satisfied by merely appending "/" to the waiton name added to the list? ;; ;; This approach causes all of the items in an upstream test to be run ;; if we have this waiton already processed once we can analzye it for extending ;; tests to be run, since we can't properly process waitons unless they have been ;; initially added we add them again to be processed on second round AND add the hed ;; back in to also be processed on second round ;; (if waiton-tconfig (begin (set! test-names (cons waiton test-names)) ;; need to process this one, only add once the waiton tconfig read (if waiton-itemized (begin (debug:print-info 0 "New test patts: " new-test-patts ", prev test patts: " test-patts) (set! required-tests (cons (conc waiton "/") required-tests)) (set! test-patts new-test-patts)) (begin (debug:print-info 0 "Adding non-itemized test " waiton " to required-tests") (set! required-tests (cons waiton required-tests))))) (begin (debug:print-info 0 "No testconfig info yet for " waiton ", setting up to re-process it") (set! tal (append (cons waiton tal)(list hed))))) ;; (cons (conc waiton "/") required-tests)) ;; NOPE: didn't work. required needs to be plain test names. Try tacking on to test-patts ;; - doesn't work ;; (set! test-patts (conc test-patts "," waiton "/")) ;; (set! test-names (cons waiton test-names))))) ;; was an append, now a cons ))) waitons) (let ((remtests (delete-duplicates (append waitons tal)))) (if (not (null? remtests)) (begin (debug:print-info 0 "Preprocessing continues for " (string-intersperse remtests ", ")) (loop (car remtests)(cdr remtests)))))))) (if (not (null? required-tests)) (debug:print-info 1 "Adding \"" (string-intersperse required-tests " ") "\" to the run queue")) ;; NOTE: these are all parent tests, items are not expanded yet. (debug:print-info 4 "test-records=" (hash-table->alist test-records)) (let ((reglen (configf:lookup *configdat* "setup" "runqueue"))) (if (> (length (hash-table-keys test-records)) 0) |
︙ | ︙ |
Modified tests.scm from [55460ac9b9] to [cf5fd4c786].
︙ | ︙ | |||
77 78 79 80 81 82 83 | ;; given test-b that is waiting on test-a extend test-patt appropriately ;; (define (tests:extend-test-patts test-patt test-b test-a itemmap) (let* ((patts (string-split test-patt ",")) (test-b-len (+ (string-length test-b) 1)) (patts-b (map (lambda (x) (let ((newpatt (conc test-a "/" (substring x test-b-len (string-length x))))) | | | | 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | ;; given test-b that is waiting on test-a extend test-patt appropriately ;; (define (tests:extend-test-patts test-patt test-b test-a itemmap) (let* ((patts (string-split test-patt ",")) (test-b-len (+ (string-length test-b) 1)) (patts-b (map (lambda (x) (let ((newpatt (conc test-a "/" (substring x test-b-len (string-length x))))) ;; (print "in map, x=" x ", newpatt=" newpatt) newpatt)) (filter (lambda (x) (eq? (substring-index (conc test-b "/") x) 0)) patts)))) (string-intersperse (delete-duplicates (append patts patts-b)) ","))) ;; tests:glob-like-match (define (tests:glob-like-match patt str) (let ((like (substring-index "%" patt))) (let* ((notpatt (equal? (substring-index "~" patt) 0)) (newpatt (if notpatt (substring patt 1) patt)) (finpatt (if like (string-substitute (regexp "%") ".*" newpatt #f) (string-substitute (regexp "\\*") ".*" newpatt #f))) |
︙ | ︙ |
Modified tests/fdktestqa/testqa/tests/bigrun/testconfig from [edca99e35e] to [679e59d899].
1 2 3 4 5 6 7 8 9 | # Add additional steps here. Format is "stepname script" [vars] step1var step1.sh [ezsteps] step1 #{get vars step1var} # Test requirements are specified here [requirements] | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # Add additional steps here. Format is "stepname script" [vars] step1var step1.sh [ezsteps] step1 #{get vars step1var} # Test requirements are specified here [requirements] waiton setup priority 0 # Iteration for your tests are controlled by the items section [items] NUMBER #{scheme (string-intersperse (map number->string (sort (let loop ((a 0)(res '()))(if (<= a (or (any->number (get-environment-variable "NUMTESTS")) 2500))(loop (+ a 1)(cons a res)) res)) <)) " ")} # test_meta is a section for storing additional data on your test |
︙ | ︙ |