OLD | NEW |
1 # 2008 June 21 | 1 # 2008 June 21 |
2 # | 2 # |
3 # The author disclaims copyright to this source code. In place of | 3 # The author disclaims copyright to this source code. In place of |
4 # a legal notice, here is a blessing: | 4 # a legal notice, here is a blessing: |
5 # | 5 # |
6 # May you do good and not evil. | 6 # May you do good and not evil. |
7 # May you find forgiveness for yourself and forgive others. | 7 # May you find forgiveness for yourself and forgive others. |
8 # May you share freely, never taking more than you give. | 8 # May you share freely, never taking more than you give. |
9 # | 9 # |
10 #*********************************************************************** | 10 #*********************************************************************** |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 | 79 |
80 #------------------------------------------------------------------------- | 80 #------------------------------------------------------------------------- |
81 # Set up the following global list variables containing the names of | 81 # Set up the following global list variables containing the names of |
82 # various test scripts: | 82 # various test scripts: |
83 # | 83 # |
84 # $alltests | 84 # $alltests |
85 # $allquicktests | 85 # $allquicktests |
86 # | 86 # |
87 set alltests [list] | 87 set alltests [list] |
88 foreach f [glob $testdir/*.test] { lappend alltests [file tail $f] } | 88 foreach f [glob $testdir/*.test] { lappend alltests [file tail $f] } |
89 foreach f [glob -nocomplain $testdir/../ext/rtree/*.test] { | 89 foreach f [glob -nocomplain \ |
| 90 $testdir/../ext/rtree/*.test \ |
| 91 $testdir/../ext/fts5/test/*.test \ |
| 92 ] { |
| 93 lappend alltests $f |
| 94 } |
| 95 foreach f [glob -nocomplain $testdir/../ext/session/*.test] { |
90 lappend alltests $f | 96 lappend alltests $f |
91 } | 97 } |
92 | 98 |
93 if {$::tcl_platform(platform)!="unix"} { | 99 if {$::tcl_platform(platform)!="unix"} { |
94 set alltests [test_set $alltests -exclude crash.test crash2.test] | 100 set alltests [test_set $alltests -exclude crash.test crash2.test] |
95 } | 101 } |
96 set alltests [test_set $alltests -exclude { | 102 set alltests [test_set $alltests -exclude { |
97 all.test async.test quick.test veryquick.test | 103 all.test async.test quick.test veryquick.test |
98 memleak.test permutations.test soak.test fts3.test | 104 memleak.test permutations.test soak.test fts3.test |
99 mallocAll.test rtree.test full.test extraquick.test | 105 mallocAll.test rtree.test full.test extraquick.test |
| 106 session.test |
100 }] | 107 }] |
101 | 108 |
102 set allquicktests [test_set $alltests -exclude { | 109 set allquicktests [test_set $alltests -exclude { |
103 async2.test async3.test backup_ioerr.test corrupt.test | 110 async2.test async3.test backup_ioerr.test corrupt.test |
104 corruptC.test crash.test crash2.test crash3.test crash4.test crash5.test | 111 corruptC.test crash.test crash2.test crash3.test crash4.test crash5.test |
105 crash6.test crash7.test delete3.test e_fts3.test fts3rnd.test | 112 crash6.test crash7.test delete3.test e_fts3.test fts3rnd.test |
106 fkey_malloc.test fuzz.test fuzz3.test fuzz_malloc.test in2.test loadext.test | 113 fkey_malloc.test fuzz.test fuzz3.test fuzz_malloc.test in2.test loadext.test |
107 misc7.test mutex2.test notify2.test onefile.test pagerfault2.test | 114 misc7.test mutex2.test notify2.test onefile.test pagerfault2.test |
108 savepoint4.test savepoint6.test select9.test | 115 savepoint4.test savepoint6.test select9.test |
109 speed1.test speed1p.test speed2.test speed3.test speed4.test | 116 speed1.test speed1p.test speed2.test speed3.test speed4.test |
110 speed4p.test sqllimits1.test tkt2686.test thread001.test thread002.test | 117 speed4p.test sqllimits1.test tkt2686.test thread001.test thread002.test |
111 thread003.test thread004.test thread005.test trans2.test vacuum3.test | 118 thread003.test thread004.test thread005.test trans2.test vacuum3.test |
112 incrvacuum_ioerr.test autovacuum_crash.test btree8.test shared_err.test | 119 incrvacuum_ioerr.test autovacuum_crash.test btree8.test shared_err.test |
113 vtab_err.test walslow.test walcrash.test walcrash3.test | 120 vtab_err.test walslow.test walcrash.test walcrash3.test |
114 walthread.test rtree3.test indexfault.test securedel2.test | 121 walthread.test rtree3.test indexfault.test securedel2.test |
115 sort3.test sort4.test fts4growth.test fts4growth2.test | 122 sort3.test sort4.test fts4growth.test fts4growth2.test |
116 bigsort.test rbu.test | 123 bigsort.test rbu.test walprotocol.test mmap4.test fuzzer2.test |
| 124 walcrash2.test e_fkey.test backup.test |
| 125 |
| 126 fts4merge.test fts4merge2.test fts4merge4.test fts4check.test |
| 127 fts3cov.test fts3snippet.test fts3corrupt2.test fts3an.test |
| 128 fts3defer.test fts4langid.test fts3sort.test fts5unicode.test |
| 129 |
| 130 rtree4.test |
117 }] | 131 }] |
118 if {[info exists ::env(QUICKTEST_INCLUDE)]} { | 132 if {[info exists ::env(QUICKTEST_INCLUDE)]} { |
119 set allquicktests [concat $allquicktests $::env(QUICKTEST_INCLUDE)] | 133 set allquicktests [concat $allquicktests $::env(QUICKTEST_INCLUDE)] |
120 } | 134 } |
121 if {[info exists ::env(QUICKTEST_OMIT)]} { | 135 if {[info exists ::env(QUICKTEST_OMIT)]} { |
122 foreach x [split $::env(QUICKTEST_OMIT) ,] { | 136 foreach x [split $::env(QUICKTEST_OMIT) ,] { |
123 regsub -all \\y$x\\y $allquicktests {} allquicktests | 137 regsub -all \\y$x\\y $allquicktests {} allquicktests |
124 } | 138 } |
125 } | 139 } |
126 | 140 |
(...skipping 16 matching lines...) Expand all Loading... |
143 # quick | 157 # quick |
144 # full | 158 # full |
145 # | 159 # |
146 lappend ::testsuitelist xxx | 160 lappend ::testsuitelist xxx |
147 | 161 |
148 test_suite "veryquick" -prefix "" -description { | 162 test_suite "veryquick" -prefix "" -description { |
149 "Very" quick test suite. Runs in minutes on a workstation. | 163 "Very" quick test suite. Runs in minutes on a workstation. |
150 This test suite is the same as the "quick" tests, except that some files | 164 This test suite is the same as the "quick" tests, except that some files |
151 that test malloc and IO errors are omitted. | 165 that test malloc and IO errors are omitted. |
152 } -files [ | 166 } -files [ |
153 test_set $allquicktests -exclude *malloc* *ioerr* *fault* *bigfile* | 167 test_set $allquicktests -exclude *malloc* *ioerr* *fault* *bigfile* *_err* \ |
| 168 *fts5corrupt* *fts5big* *fts5aj* |
154 ] | 169 ] |
155 | 170 |
156 test_suite "extraquick" -prefix "" -description { | 171 test_suite "extraquick" -prefix "" -description { |
157 "Extra" quick test suite. Runs in a few minutes on a workstation. | 172 "Extra" quick test suite. Runs in a few minutes on a workstation. |
158 This test suite is the same as the "veryquick" tests, except that | 173 This test suite is the same as the "veryquick" tests, except that |
159 slower tests are omitted. | 174 slower tests are omitted. |
160 } -files [ | 175 } -files [ |
161 test_set $allquicktests -exclude *malloc* *ioerr* *fault* *bigfile* \ | 176 test_set $allquicktests -exclude *malloc* *ioerr* *fault* *bigfile* *_err* \ |
162 wal3.test fts4merge* sort2.test mmap1.test walcrash* \ | 177 wal3.test fts4merge* sort2.test mmap1.test walcrash* \ |
163 percentile.test where8m.test walcksum.test savepoint3.test \ | 178 percentile.test where8m.test walcksum.test savepoint3.test \ |
164 fuzzer1.test fuzzer3.test fts3expr3.test | 179 fuzzer1.test fuzzer3.test fts3expr3.test |
165 ] | 180 ] |
166 | 181 |
167 test_suite "mmap" -prefix "mm-" -description { | 182 test_suite "mmap" -prefix "mm-" -description { |
168 Similar to veryquick. Except with memory mapping enabled. | 183 Similar to veryquick. Except with memory mapping enabled. |
169 } -presql { | 184 } -presql { |
170 pragma mmap_size = 268435456; | 185 pragma mmap_size = 268435456; |
171 } -files [ | 186 } -files [ |
172 test_set $allquicktests -exclude *malloc* *ioerr* *fault* -include malloc.test | 187 test_set $allquicktests -exclude *malloc* *ioerr* *fault* -include malloc.test |
173 ] | 188 ] |
174 | 189 |
175 test_suite "valgrind" -prefix "" -description { | 190 test_suite "valgrind" -prefix "" -description { |
176 Run the "veryquick" test suite with a couple of multi-process tests (that | 191 Run the "veryquick" test suite with a couple of multi-process tests (that |
177 fail under valgrind) omitted. | 192 fail under valgrind) omitted. |
178 } -files [ | 193 } -files [ |
179 test_set $allquicktests -exclude *malloc* *ioerr* *fault* wal.test \ | 194 test_set $allquicktests -exclude *malloc* *ioerr* *fault* *_err* wal.test \ |
180 shell*.test crash8.test atof1.test selectG.test \ | 195 shell*.test crash8.test atof1.test selectG.test \ |
181 tkt-fc62af4523.test numindex1.test | 196 tkt-fc62af4523.test numindex1.test |
182 ] -initialize { | 197 ] -initialize { |
183 set ::G(valgrind) 1 | 198 set ::G(valgrind) 1 |
184 } -shutdown { | 199 } -shutdown { |
185 unset -nocomplain ::G(valgrind) | 200 unset -nocomplain ::G(valgrind) |
186 } | 201 } |
187 | 202 |
188 test_suite "valgrind-nolookaside" -prefix "" -description { | 203 test_suite "valgrind-nolookaside" -prefix "" -description { |
189 Run the "veryquick" test suite with a couple of multi-process tests (that | 204 Run the "veryquick" test suite with a couple of multi-process tests (that |
190 fail under valgrind) omitted. | 205 fail under valgrind) omitted. |
191 } -files [ | 206 } -files [ |
192 test_set $allquicktests -exclude *malloc* *ioerr* *fault* wal.test atof1.test | 207 test_set $allquicktests -exclude *malloc* *ioerr* *fault* *_err* \ |
| 208 wal.test atof1.test |
193 ] -initialize { | 209 ] -initialize { |
194 set ::G(valgrind) 1 | 210 set ::G(valgrind) 1 |
195 catch {db close} | 211 catch {db close} |
196 sqlite3_shutdown | 212 sqlite3_shutdown |
197 sqlite3_config_lookaside 0 0 | 213 sqlite3_config_lookaside 0 0 |
198 sqlite3_initialize | 214 sqlite3_initialize |
199 autoinstall_test_functions | 215 autoinstall_test_functions |
200 } -shutdown { | 216 } -shutdown { |
201 catch {db close} | 217 catch {db close} |
202 sqlite3_shutdown | 218 sqlite3_shutdown |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 test_set \ | 275 test_set \ |
260 [glob -nocomplain $::testdir/../ext/fts5/test/*.test] \ | 276 [glob -nocomplain $::testdir/../ext/fts5/test/*.test] \ |
261 -exclude *corrupt* *fault* *big* *fts5aj* | 277 -exclude *corrupt* *fault* *big* *fts5aj* |
262 ] | 278 ] |
263 | 279 |
264 test_suite "nofaultsim" -prefix "" -description { | 280 test_suite "nofaultsim" -prefix "" -description { |
265 "Very" quick test suite. Runs in less than 5 minutes on a workstation. | 281 "Very" quick test suite. Runs in less than 5 minutes on a workstation. |
266 This test suite is the same as the "quick" tests, except that some files | 282 This test suite is the same as the "quick" tests, except that some files |
267 that test malloc and IO errors are omitted. | 283 that test malloc and IO errors are omitted. |
268 } -files [ | 284 } -files [ |
269 test_set $allquicktests -exclude *malloc* *ioerr* *fault* | 285 test_set $allquicktests -exclude *malloc* *ioerr* *fault* *_err* |
270 ] -initialize { | 286 ] -initialize { |
271 catch {db close} | 287 catch {db close} |
272 sqlite3_shutdown | 288 sqlite3_shutdown |
273 install_malloc_faultsim 0 | 289 install_malloc_faultsim 0 |
274 sqlite3_initialize | 290 sqlite3_initialize |
275 autoinstall_test_functions | 291 autoinstall_test_functions |
276 } -shutdown { | 292 } -shutdown { |
277 unset -nocomplain ::G(valgrind) | 293 unset -nocomplain ::G(valgrind) |
278 } | 294 } |
279 | 295 |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
597 hook.test index.test insert2.test insert.test interrupt.test in.test | 613 hook.test index.test insert2.test insert.test interrupt.test in.test |
598 intpkey.test ioerr.test join2.test join.test lastinsert.test | 614 intpkey.test ioerr.test join2.test join.test lastinsert.test |
599 laststmtchanges.test limit.test lock2.test lock.test main.test | 615 laststmtchanges.test limit.test lock2.test lock.test main.test |
600 memdb.test minmax.test misc1.test misc2.test misc3.test notnull.test | 616 memdb.test minmax.test misc1.test misc2.test misc3.test notnull.test |
601 null.test progress.test quote.test rowid.test select1.test select2.test | 617 null.test progress.test quote.test rowid.test select1.test select2.test |
602 select3.test select4.test select5.test select6.test sort.test | 618 select3.test select4.test select5.test select6.test sort.test |
603 subselect.test tableapi.test table.test temptable.test | 619 subselect.test tableapi.test table.test temptable.test |
604 trace.test trigger1.test trigger2.test trigger3.test | 620 trace.test trigger1.test trigger2.test trigger3.test |
605 trigger4.test types2.test types.test unique.test update.test | 621 trigger4.test types2.test types.test unique.test update.test |
606 vacuum.test view.test where.test | 622 vacuum.test view.test where.test |
| 623 bestindex1.test |
607 } | 624 } |
608 | 625 |
609 # Run some tests in exclusive locking mode. | 626 # Run some tests in exclusive locking mode. |
610 # | 627 # |
611 test_suite "exclusive" -description { | 628 test_suite "exclusive" -description { |
612 Run tests in exclusive locking mode. | 629 Run tests in exclusive locking mode. |
613 } -presql { | 630 } -presql { |
614 pragma locking_mode = 'exclusive' | 631 pragma locking_mode = 'exclusive' |
615 } -files { | 632 } -files { |
616 rollback.test select1.test select2.test | 633 rollback.test select1.test select2.test |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
704 test_suite "inmemory_journal" -description { | 721 test_suite "inmemory_journal" -description { |
705 Run tests with an in-memory journal file. | 722 Run tests with an in-memory journal file. |
706 } -presql { | 723 } -presql { |
707 pragma journal_mode = 'memory' | 724 pragma journal_mode = 'memory' |
708 } -files [test_set $::allquicktests -exclude { | 725 } -files [test_set $::allquicktests -exclude { |
709 # Exclude all tests that simulate IO errors. | 726 # Exclude all tests that simulate IO errors. |
710 autovacuum_ioerr2.test cffault.test incrvacuum_ioerr.test ioerr.test | 727 autovacuum_ioerr2.test cffault.test incrvacuum_ioerr.test ioerr.test |
711 ioerr.test ioerr2.test ioerr3.test ioerr4.test ioerr5.test | 728 ioerr.test ioerr2.test ioerr3.test ioerr4.test ioerr5.test |
712 vacuum3.test incrblob_err.test diskfull.test backup_ioerr.test | 729 vacuum3.test incrblob_err.test diskfull.test backup_ioerr.test |
713 e_fts3.test fts3cov.test fts3malloc.test fts3rnd.test | 730 e_fts3.test fts3cov.test fts3malloc.test fts3rnd.test |
714 fts3snippet.test mmapfault.test | 731 fts3snippet.test mmapfault.test sessionfault.test sessionfault2.test |
715 | 732 |
716 # Exclude test scripts that use tcl IO to access journal files or count | 733 # Exclude test scripts that use tcl IO to access journal files or count |
717 # the number of fsync() calls. | 734 # the number of fsync() calls. |
718 pager.test exclusive.test jrnlmode.test sync.test misc1.test | 735 pager.test exclusive.test jrnlmode.test sync.test misc1.test |
719 journal1.test conflict.test crash8.test tkt3457.test io.test | 736 journal1.test conflict.test crash8.test tkt3457.test io.test |
720 journal3.test 8_3_names.test | 737 journal3.test 8_3_names.test |
721 | 738 |
722 pager1.test async4.test corrupt.test filefmt.test pager2.test | 739 pager1.test async4.test corrupt.test filefmt.test pager2.test |
723 corrupt5.test corruptA.test pageropt.test | 740 corrupt5.test corruptA.test pageropt.test |
724 | 741 |
725 # Exclude stmt.test, which expects sub-journals to use temporary files. | 742 # Exclude stmt.test, which expects sub-journals to use temporary files. |
726 stmt.test symlink.test | 743 stmt.test symlink.test |
727 | 744 |
728 zerodamage.test | 745 zerodamage.test |
729 | 746 |
730 # WAL mode is different. | 747 # WAL mode is different. |
731 wal* tkt-2d1a5c67d.test backcompat.test e_wal* rowallock.test | 748 wal* tkt-2d1a5c67d.test backcompat.test e_wal* rowallock.test |
| 749 |
| 750 # This test does not work as the "PRAGMA journal_mode = memory" |
| 751 # statement switches the database out of wal mode at inopportune |
| 752 # times. |
| 753 snapshot_fault.test |
| 754 |
| 755 # This test assumes a journal file is created on disk. |
| 756 delete_db.test |
| 757 |
| 758 # This test depends on a successful recovery from the pager error |
| 759 # state. Which is not possible with an in-memory journal |
| 760 fts5fault1.test |
732 }] | 761 }] |
733 | 762 |
734 ifcapable mem3 { | 763 ifcapable mem3 { |
735 test_suite "memsys3" -description { | 764 test_suite "memsys3" -description { |
736 Run tests using the allocator in mem3.c. | 765 Run tests using the allocator in mem3.c. |
737 } -files [test_set $::allquicktests -exclude { | 766 } -files [test_set $::allquicktests -exclude { |
738 autovacuum.test delete3.test manydb.test | 767 autovacuum.test delete3.test manydb.test |
739 bigrow.test incrblob2.test memdb.test | 768 bigrow.test incrblob2.test memdb.test |
740 bitvec.test index2.test memsubsys1.test | 769 bitvec.test index2.test memsubsys1.test |
741 capi3c.test ioerr.test memsubsys2.test | 770 capi3c.test ioerr.test memsubsys2.test |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
918 | 947 |
919 test_suite "journaltest" -description { | 948 test_suite "journaltest" -description { |
920 Check that pages are synced before being written (test_journal.c). | 949 Check that pages are synced before being written (test_journal.c). |
921 } -initialize { | 950 } -initialize { |
922 catch {db close} | 951 catch {db close} |
923 register_jt_vfs -default "" | 952 register_jt_vfs -default "" |
924 } -shutdown { | 953 } -shutdown { |
925 unregister_jt_vfs | 954 unregister_jt_vfs |
926 } -files [test_set $::allquicktests -exclude { | 955 } -files [test_set $::allquicktests -exclude { |
927 wal* incrvacuum.test ioerr.test corrupt4.test io.test crash8.test | 956 wal* incrvacuum.test ioerr.test corrupt4.test io.test crash8.test |
928 async4.test bigfile.test backcompat.test | 957 async4.test bigfile.test backcompat.test e_wal* fstat.test mmap2.test |
| 958 pager1.test syscall.test tkt3457.test *malloc* mmap* multiplex* nolock* |
| 959 pager2.test *fault* rowal* snapshot* superlock* symlink.test |
| 960 delete_db.test |
929 }] | 961 }] |
930 | 962 |
931 if {[info commands register_demovfs] != ""} { | 963 if {[info commands register_demovfs] != ""} { |
932 test_suite "demovfs" -description { | 964 test_suite "demovfs" -description { |
933 Check that the demovfs (code in test_demovfs.c) more or less works. | 965 Check that the demovfs (code in test_demovfs.c) more or less works. |
934 } -initialize { | 966 } -initialize { |
935 register_demovfs | 967 register_demovfs |
936 } -shutdown { | 968 } -shutdown { |
937 unregister_demovfs | 969 unregister_demovfs |
938 } -files { | 970 } -files { |
(...skipping 16 matching lines...) Expand all Loading... |
955 fts3ae.test fts3af.test fts3ag.test fts3ah.test | 987 fts3ae.test fts3af.test fts3ag.test fts3ah.test |
956 fts3ai.test fts3aj.test fts3ak.test fts3al.test | 988 fts3ai.test fts3aj.test fts3ak.test fts3al.test |
957 fts3am.test fts3an.test fts3ao.test fts3b.test | 989 fts3am.test fts3an.test fts3ao.test fts3b.test |
958 fts3c.test fts3d.test fts3e.test fts3query.test | 990 fts3c.test fts3d.test fts3e.test fts3query.test |
959 } | 991 } |
960 | 992 |
961 test_suite "rtree" -description { | 993 test_suite "rtree" -description { |
962 All R-tree related tests. Provides coverage of source file rtree.c. | 994 All R-tree related tests. Provides coverage of source file rtree.c. |
963 } -files [glob -nocomplain $::testdir/../ext/rtree/*.test] | 995 } -files [glob -nocomplain $::testdir/../ext/rtree/*.test] |
964 | 996 |
| 997 test_suite "session" -description { |
| 998 All session module related tests. |
| 999 } -files [glob -nocomplain $::testdir/../ext/session/*.test] |
| 1000 |
| 1001 test_suite "session_eec" -description { |
| 1002 All session module related tests with sqlite3_extended_result_codes() set. |
| 1003 } -files [ |
| 1004 glob -nocomplain $::testdir/../ext/session/*.test |
| 1005 ] -dbconfig { |
| 1006 sqlite3_extended_result_codes $::dbhandle 1 |
| 1007 } |
| 1008 |
| 1009 test_suite "session_strm" -description { |
| 1010 All session module related tests using the streaming APIs. |
| 1011 } -files [ |
| 1012 glob -nocomplain $::testdir/../ext/session/*.test |
| 1013 ] -dbconfig { |
| 1014 set ::sqlite3session_streams 1 |
| 1015 } |
| 1016 |
965 test_suite "rbu" -description { | 1017 test_suite "rbu" -description { |
966 RBU tests. | 1018 RBU tests. |
967 } -files [ | 1019 } -files [ |
968 test_set [glob -nocomplain $::testdir/../ext/rbu/*.test] -exclude rbu.test | 1020 test_set [glob -nocomplain $::testdir/../ext/rbu/*.test] -exclude rbu.test |
969 ] | 1021 ] |
970 | 1022 |
971 test_suite "no_optimization" -description { | 1023 test_suite "no_optimization" -description { |
972 Run test scripts with optimizations disabled using the | 1024 Run test scripts with optimizations disabled using the |
973 sqlite3_test_control(SQLITE_TESTCTRL_OPTIMIZATIONS) interface. | 1025 sqlite3_test_control(SQLITE_TESTCTRL_OPTIMIZATIONS) interface. |
974 } -files { | 1026 } -files { |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1006 # | 1058 # |
1007 proc run_tests {name args} { | 1059 proc run_tests {name args} { |
1008 array set options $args | 1060 array set options $args |
1009 | 1061 |
1010 set ::G(perm:name) $name | 1062 set ::G(perm:name) $name |
1011 set ::G(perm:prefix) $options(-prefix) | 1063 set ::G(perm:prefix) $options(-prefix) |
1012 set ::G(perm:presql) $options(-presql) | 1064 set ::G(perm:presql) $options(-presql) |
1013 set ::G(isquick) 1 | 1065 set ::G(isquick) 1 |
1014 set ::G(perm:dbconfig) $options(-dbconfig) | 1066 set ::G(perm:dbconfig) $options(-dbconfig) |
1015 | 1067 |
1016 uplevel $options(-initialize) | |
1017 | |
1018 foreach file [lsort $options(-files)] { | 1068 foreach file [lsort $options(-files)] { |
| 1069 uplevel $options(-initialize) |
1019 if {[file tail $file] == $file} { set file [file join $::testdir $file] } | 1070 if {[file tail $file] == $file} { set file [file join $::testdir $file] } |
1020 slave_test_file $file | 1071 slave_test_file $file |
| 1072 uplevel $options(-shutdown) |
1021 } | 1073 } |
1022 | 1074 |
1023 uplevel $options(-shutdown) | |
1024 | |
1025 unset ::G(perm:name) | 1075 unset ::G(perm:name) |
1026 unset ::G(perm:prefix) | 1076 unset ::G(perm:prefix) |
1027 unset ::G(perm:presql) | 1077 unset ::G(perm:presql) |
1028 unset ::G(perm:dbconfig) | 1078 unset ::G(perm:dbconfig) |
1029 } | 1079 } |
1030 | 1080 |
1031 proc run_test_suite {name} { | 1081 proc run_test_suite {name} { |
1032 if {[info exists ::testspec($name)]==0} { | 1082 if {[info exists ::testspec($name)]==0} { |
1033 error "No such test suite: $name" | 1083 error "No such test suite: $name" |
1034 } | 1084 } |
(...skipping 13 matching lines...) Expand all Loading... |
1048 puts "Test suite: \"$k\"" | 1098 puts "Test suite: \"$k\"" |
1049 set d [string trim $o(-description)] | 1099 set d [string trim $o(-description)] |
1050 set d [regsub {\n *} $d "\n "] | 1100 set d [regsub {\n *} $d "\n "] |
1051 puts " $d" | 1101 puts " $d" |
1052 puts "" | 1102 puts "" |
1053 } | 1103 } |
1054 } | 1104 } |
1055 exit -1 | 1105 exit -1 |
1056 } | 1106 } |
1057 | 1107 |
1058 if {[info script] == $argv0} { | 1108 if {[file tail $argv0] == "permutations.test"} { |
1059 proc main {argv} { | 1109 proc main {argv} { |
1060 if {[llength $argv]==0} { | 1110 if {[llength $argv]==0} { |
1061 help | 1111 help |
1062 } else { | 1112 } else { |
1063 set suite [lindex $argv 0] | 1113 set suite [file tail [lindex $argv 0]] |
1064 if {[info exists ::testspec($suite)]==0} help | 1114 if {[info exists ::testspec($suite)]==0} help |
1065 set extra "" | 1115 set extra "" |
1066 if {[llength $argv]>1} { set extra [list -files [lrange $argv 1 end]] } | 1116 if {[llength $argv]>1} { set extra [list -files [lrange $argv 1 end]] } |
1067 eval run_tests $suite $::testspec($suite) $extra | 1117 eval run_tests $suite $::testspec($suite) $extra |
1068 } | 1118 } |
1069 } | 1119 } |
1070 main $argv | 1120 main $argv |
1071 finish_test | 1121 finish_test |
1072 } | 1122 } |
OLD | NEW |