Changeset 2167 for trunk/tester/scripts


Ignore:
Timestamp:
Mar 30, 2011 11:07:37 AM (9 years ago)
Author:
mmc
Message:

Added a fix to guard against missing/duplicate test names when loading
test cases. It now prints a message to standard error and skips the
malformed test.

Fixed a bug when you regoldenize a test then try to run it again. It
runs cleanly now.

Location:
trunk/tester/scripts
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/tester/scripts/main.tcl

    r2165 r2167  
    297297foreach file [glob -nocomplain -directory $params(-testdir) *.xml] {
    298298    set testobj [Rappture::Tester::Test ::#auto $ToolObj $file]
    299     $testtree add $testobj
     299    if {[$testobj getTestInfo test.label] eq ""} {
     300        puts stderr "ERROR:  Missing test label in $file"
     301        puts stderr "        skipping that test..."
     302    } elseif {[catch {$testtree add $testobj} err]} {
     303        puts stderr "ERROR:  Can't load test $file"
     304        puts stderr "        $err"
     305        puts stderr "        skipping that test..."
     306    }
    300307}
    301308$testtree component treeview open -recurse root
  • trunk/tester/scripts/test.tcl

    r2163 r2167  
    249249    itcl::delete object $_testobj
    250250    set _testobj $_runobj
     251    set _runobj ""
    251252
    252253    set _diffs ""
Note: See TracChangeset for help on using the changeset viewer.