]> www.wagner.pp.ru Git - openssl-gost/engine.git/blobdiff - tcl_tests/test.tcl
tcl_tests: Introduce new exitStatus -1 to ignore exit codes
[openssl-gost/engine.git] / tcl_tests / test.tcl
index cf7c2b7121cc56e6bcf3ef2cb481aa666097a8e1..276db7eb897ae0185205b758b9c7ba901157ac2f 100644 (file)
@@ -117,7 +117,10 @@ namespace eval test {
                                if [info exists $file] {puts [test_log] "Deleting $file"
                                   file delete $file}
                        }       
-               }       
+               } {
+                       # signal to a caller that we had failures
+                       exit 1
+               }
        }
    #
    # Вовзращает идентификатор канала, куда пишется лог тестов.
@@ -195,7 +198,8 @@ namespace eval test {
                                set timestamp "$teststart+[expr $testend-$teststart]"
                        }
                }       
-               if {$status!=$exitStatus || ($status==1?![regexp --\
+               if {($exitStatus!=-1 && $status!=$exitStatus) ||
+                       ($exitStatus!=0?![regexp --\
                        [rus $expectedResult] $result]:([info exists opts(-time)]?\
                    ![listcompare $result $expectedResult $opts(-time)]:\
                        [string compare "$result" "$expectedResult"]))} {
@@ -282,7 +286,7 @@ proc rus {string} {
                puts -nonewline [rus [format "Тест%5d: %-60s:" $no [string range $testname 0 59]]]
                flush stdout
                set curtest $testname
-               log [rus "Тест $no: $testname start"]
+               log [rus "\n\nТест $no: $testname start"]
        }
        #
        # Вызывается при пропуске теста