Fossil SCM
The tester.tcl report summary now lists only the skips caused by a missing requirement, and a count is given for files skipped due to the given level.
Commit
f977b0361de3ab40592bd73e9353b132dc653d6b57a3577944fdb854283af649
Parent
80e92738a38a38d…
2 files changed
+2
-1
+23
-2
+2
-1
| --- test/README.md | ||
| +++ test/README.md | ||
| @@ -68,11 +68,12 @@ | ||
| 68 | 68 | make test TESTFLAGS="-assurance stress" # ci plus generated cases |
| 69 | 69 | ``` |
| 70 | 70 | |
| 71 | 71 | `tester.tcl` exits with status 0 when all tests pass, 1 when one or more tests |
| 72 | 72 | fail. Failed tests are reported with what it expected vs what it got. The |
| 73 | -summary lists skipped files with a reason, and all known bugs reported as | |
| 73 | +summary lists skipped files with a reason, counts the files that need a | |
| 74 | +higher `-assurance` level to run in full, and lists all known bugs reported as | |
| 74 | 75 | `FAILED (knownBug)`. Skips and known bugs do not change the exit status unless |
| 75 | 76 | `-strict` is given. |
| 76 | 77 | |
| 77 | 78 | A new test should only require adding another `.test` file. |
| 78 | 79 | |
| 79 | 80 |
| --- test/README.md | |
| +++ test/README.md | |
| @@ -68,11 +68,12 @@ | |
| 68 | make test TESTFLAGS="-assurance stress" # ci plus generated cases |
| 69 | ``` |
| 70 | |
| 71 | `tester.tcl` exits with status 0 when all tests pass, 1 when one or more tests |
| 72 | fail. Failed tests are reported with what it expected vs what it got. The |
| 73 | summary lists skipped files with a reason, and all known bugs reported as |
| 74 | `FAILED (knownBug)`. Skips and known bugs do not change the exit status unless |
| 75 | `-strict` is given. |
| 76 | |
| 77 | A new test should only require adding another `.test` file. |
| 78 | |
| 79 |
| --- test/README.md | |
| +++ test/README.md | |
| @@ -68,11 +68,12 @@ | |
| 68 | make test TESTFLAGS="-assurance stress" # ci plus generated cases |
| 69 | ``` |
| 70 | |
| 71 | `tester.tcl` exits with status 0 when all tests pass, 1 when one or more tests |
| 72 | fail. Failed tests are reported with what it expected vs what it got. The |
| 73 | summary lists skipped files with a reason, counts the files that need a |
| 74 | higher `-assurance` level to run in full, and lists all known bugs reported as |
| 75 | `FAILED (knownBug)`. Skips and known bugs do not change the exit status unless |
| 76 | `-strict` is given. |
| 77 | |
| 78 | A new test should only require adding another `.test` file. |
| 79 | |
| 80 |
+23
-2
| --- test/tester.tcl | ||
| +++ test/tester.tcl | ||
| @@ -829,12 +829,23 @@ | ||
| 829 | 829 | |
| 830 | 830 | # Record that some tests of the current test file are skipped because |
| 831 | 831 | # of REASON, which says which tests. The final summary reports REASON |
| 832 | 832 | # beside the file name, and the test file continues. |
| 833 | 833 | # |
| 834 | +# A REASON that has "-assurance" in it says that the tests need a higher | |
| 835 | +# assurance level. The final summary counts on one line the test files | |
| 836 | +# that give such a REASON, and -quiet leaves out their SKIPPED lines. | |
| 837 | +# | |
| 834 | 838 | proc test_skip_part {reason} { |
| 835 | - global skipped_tests testfile | |
| 839 | + global skipped_tests level_limited_tests testfile | |
| 840 | + if {[string first "-assurance" $reason] >= 0} { | |
| 841 | + if {$testfile ni $level_limited_tests} { | |
| 842 | + lappend level_limited_tests $testfile | |
| 843 | + } | |
| 844 | + protOut "SKIPPED $testfile: $reason" | |
| 845 | + return | |
| 846 | + } | |
| 836 | 847 | lappend skipped_tests [list $testfile $reason] |
| 837 | 848 | protOut "SKIPPED $testfile: $reason" 1 |
| 838 | 849 | } |
| 839 | 850 | |
| 840 | 851 | # Record test NAME as failed because of REASON, then stop the current |
| @@ -1269,10 +1280,11 @@ | ||
| 1269 | 1280 | test_report $name [regexp -- $pattern $actual] $constraints $detail |
| 1270 | 1281 | } |
| 1271 | 1282 | set bad_test {} |
| 1272 | 1283 | set ignored_test {} |
| 1273 | 1284 | set skipped_tests {} |
| 1285 | +set level_limited_tests {} | |
| 1274 | 1286 | |
| 1275 | 1287 | # Return a random string N characters long. |
| 1276 | 1288 | # |
| 1277 | 1289 | set vocabulary 01234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" |
| 1278 | 1290 | append vocabulary " ()*^!.eeeeeeeeaaaaattiioo " |
| @@ -1647,15 +1659,24 @@ | ||
| 1647 | 1659 | if {$nIgnored>0} { |
| 1648 | 1660 | protOut "***** Ignored failures: $ignored_test" 1 |
| 1649 | 1661 | } |
| 1650 | 1662 | set nSkipped [llength $skipped_tests] |
| 1651 | 1663 | if {$nSkipped>0} { |
| 1652 | - protOut "***** Skipped tests: [lmap s $skipped_tests {lindex $s 0}]" 1 | |
| 1664 | + set skippedFiles {} | |
| 1665 | + foreach s $skipped_tests { | |
| 1666 | + if {[lindex $s 0] ni $skippedFiles} {lappend skippedFiles [lindex $s 0]} | |
| 1667 | + } | |
| 1668 | + protOut "***** Skipped tests: $skippedFiles" 1 | |
| 1653 | 1669 | foreach s $skipped_tests { |
| 1654 | 1670 | protOut "***** [lindex $s 0]: [lindex $s 1]" 1 |
| 1655 | 1671 | } |
| 1656 | 1672 | } |
| 1673 | +set nLimited [llength $level_limited_tests] | |
| 1674 | +if {$nLimited>0} { | |
| 1675 | + set files [expr {$nLimited==1 ? "test file" : "test files"}] | |
| 1676 | + protOut "***** Limited by -assurance $::ASSURANCE: $nLimited $files" 1 | |
| 1677 | +} | |
| 1657 | 1678 | if {[llength $bad_test]>0} { |
| 1658 | 1679 | printElapsedTime |
| 1659 | 1680 | exit 1 |
| 1660 | 1681 | } |
| 1661 | 1682 | printElapsedTime |
| 1662 | 1683 |
| --- test/tester.tcl | |
| +++ test/tester.tcl | |
| @@ -829,12 +829,23 @@ | |
| 829 | |
| 830 | # Record that some tests of the current test file are skipped because |
| 831 | # of REASON, which says which tests. The final summary reports REASON |
| 832 | # beside the file name, and the test file continues. |
| 833 | # |
| 834 | proc test_skip_part {reason} { |
| 835 | global skipped_tests testfile |
| 836 | lappend skipped_tests [list $testfile $reason] |
| 837 | protOut "SKIPPED $testfile: $reason" 1 |
| 838 | } |
| 839 | |
| 840 | # Record test NAME as failed because of REASON, then stop the current |
| @@ -1269,10 +1280,11 @@ | |
| 1269 | test_report $name [regexp -- $pattern $actual] $constraints $detail |
| 1270 | } |
| 1271 | set bad_test {} |
| 1272 | set ignored_test {} |
| 1273 | set skipped_tests {} |
| 1274 | |
| 1275 | # Return a random string N characters long. |
| 1276 | # |
| 1277 | set vocabulary 01234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" |
| 1278 | append vocabulary " ()*^!.eeeeeeeeaaaaattiioo " |
| @@ -1647,15 +1659,24 @@ | |
| 1647 | if {$nIgnored>0} { |
| 1648 | protOut "***** Ignored failures: $ignored_test" 1 |
| 1649 | } |
| 1650 | set nSkipped [llength $skipped_tests] |
| 1651 | if {$nSkipped>0} { |
| 1652 | protOut "***** Skipped tests: [lmap s $skipped_tests {lindex $s 0}]" 1 |
| 1653 | foreach s $skipped_tests { |
| 1654 | protOut "***** [lindex $s 0]: [lindex $s 1]" 1 |
| 1655 | } |
| 1656 | } |
| 1657 | if {[llength $bad_test]>0} { |
| 1658 | printElapsedTime |
| 1659 | exit 1 |
| 1660 | } |
| 1661 | printElapsedTime |
| 1662 |
| --- test/tester.tcl | |
| +++ test/tester.tcl | |
| @@ -829,12 +829,23 @@ | |
| 829 | |
| 830 | # Record that some tests of the current test file are skipped because |
| 831 | # of REASON, which says which tests. The final summary reports REASON |
| 832 | # beside the file name, and the test file continues. |
| 833 | # |
| 834 | # A REASON that has "-assurance" in it says that the tests need a higher |
| 835 | # assurance level. The final summary counts on one line the test files |
| 836 | # that give such a REASON, and -quiet leaves out their SKIPPED lines. |
| 837 | # |
| 838 | proc test_skip_part {reason} { |
| 839 | global skipped_tests level_limited_tests testfile |
| 840 | if {[string first "-assurance" $reason] >= 0} { |
| 841 | if {$testfile ni $level_limited_tests} { |
| 842 | lappend level_limited_tests $testfile |
| 843 | } |
| 844 | protOut "SKIPPED $testfile: $reason" |
| 845 | return |
| 846 | } |
| 847 | lappend skipped_tests [list $testfile $reason] |
| 848 | protOut "SKIPPED $testfile: $reason" 1 |
| 849 | } |
| 850 | |
| 851 | # Record test NAME as failed because of REASON, then stop the current |
| @@ -1269,10 +1280,11 @@ | |
| 1280 | test_report $name [regexp -- $pattern $actual] $constraints $detail |
| 1281 | } |
| 1282 | set bad_test {} |
| 1283 | set ignored_test {} |
| 1284 | set skipped_tests {} |
| 1285 | set level_limited_tests {} |
| 1286 | |
| 1287 | # Return a random string N characters long. |
| 1288 | # |
| 1289 | set vocabulary 01234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" |
| 1290 | append vocabulary " ()*^!.eeeeeeeeaaaaattiioo " |
| @@ -1647,15 +1659,24 @@ | |
| 1659 | if {$nIgnored>0} { |
| 1660 | protOut "***** Ignored failures: $ignored_test" 1 |
| 1661 | } |
| 1662 | set nSkipped [llength $skipped_tests] |
| 1663 | if {$nSkipped>0} { |
| 1664 | set skippedFiles {} |
| 1665 | foreach s $skipped_tests { |
| 1666 | if {[lindex $s 0] ni $skippedFiles} {lappend skippedFiles [lindex $s 0]} |
| 1667 | } |
| 1668 | protOut "***** Skipped tests: $skippedFiles" 1 |
| 1669 | foreach s $skipped_tests { |
| 1670 | protOut "***** [lindex $s 0]: [lindex $s 1]" 1 |
| 1671 | } |
| 1672 | } |
| 1673 | set nLimited [llength $level_limited_tests] |
| 1674 | if {$nLimited>0} { |
| 1675 | set files [expr {$nLimited==1 ? "test file" : "test files"}] |
| 1676 | protOut "***** Limited by -assurance $::ASSURANCE: $nLimited $files" 1 |
| 1677 | } |
| 1678 | if {[llength $bad_test]>0} { |
| 1679 | printElapsedTime |
| 1680 | exit 1 |
| 1681 | } |
| 1682 | printElapsedTime |
| 1683 |