drh | d477eee | 2014-12-23 19:40:51 +0000 | [diff] [blame] | 1 | #!/usr/bin/tclsh |
| 2 | # |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 3 | # Documentation for this script. This may be output to stderr |
| 4 | # if the script is invoked incorrectly. See the [process_options] |
| 5 | # proc below. |
| 6 | # |
| 7 | set ::USAGE_MESSAGE { |
| 8 | This Tcl script is used to test the various configurations required |
mistachkin | 7284056 | 2014-12-23 20:22:57 +0000 | [diff] [blame] | 9 | before releasing a new version. Supported command line options (all |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 10 | optional) are: |
| 11 | |
drh | d477eee | 2014-12-23 19:40:51 +0000 | [diff] [blame] | 12 | --srcdir TOP-OF-SQLITE-TREE (see below) |
| 13 | --platform PLATFORM (see below) |
| 14 | --config CONFIGNAME (Run only CONFIGNAME) |
| 15 | --quick (Run "veryquick.test" only) |
drh | 5bfff9d | 2015-01-08 01:05:42 +0000 | [diff] [blame] | 16 | --veryquick (Run "make smoketest" only) |
drh | d477eee | 2014-12-23 19:40:51 +0000 | [diff] [blame] | 17 | --buildonly (Just build testfixture - do not run) |
mistachkin | 7284056 | 2014-12-23 20:22:57 +0000 | [diff] [blame] | 18 | --dryrun (Print what would have happened) |
drh | d477eee | 2014-12-23 19:40:51 +0000 | [diff] [blame] | 19 | --info (Show diagnostic info) |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 20 | |
drh | d477eee | 2014-12-23 19:40:51 +0000 | [diff] [blame] | 21 | The default value for --srcdir is the parent of the directory holding |
| 22 | this script. |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 23 | |
drh | d477eee | 2014-12-23 19:40:51 +0000 | [diff] [blame] | 24 | The script determines the default value for --platform using the |
mistachkin | 7284056 | 2014-12-23 20:22:57 +0000 | [diff] [blame] | 25 | $tcl_platform(os) and $tcl_platform(machine) variables. Supported |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 26 | platforms are "Linux-x86", "Linux-x86_64" and "Darwin-i386". |
| 27 | |
drh | d477eee | 2014-12-23 19:40:51 +0000 | [diff] [blame] | 28 | Every test begins with a fresh run of the configure script at the top |
| 29 | of the SQLite source tree. |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 30 | } |
| 31 | |
drh | 6aed1c4 | 2015-01-10 15:21:26 +0000 | [diff] [blame] | 32 | # Omit comments (text between # and \n) in a long multi-line string. |
| 33 | # |
| 34 | proc strip_comments {in} { |
| 35 | regsub -all {#[^\n]*\n} $in {} out |
| 36 | return $out |
| 37 | } |
| 38 | |
| 39 | array set ::Configs [strip_comments { |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 40 | "Default" { |
| 41 | -O2 |
drh | edb31cd | 2015-01-08 02:15:11 +0000 | [diff] [blame] | 42 | --disable-amalgamation --disable-shared |
drh | 149735d | 2015-01-01 19:53:10 +0000 | [diff] [blame] | 43 | } |
drh | 4081d5d | 2015-01-01 23:02:01 +0000 | [diff] [blame] | 44 | "Sanitize" { |
drh | 149735d | 2015-01-01 19:53:10 +0000 | [diff] [blame] | 45 | CC=clang -fsanitize=undefined |
drh | 4081d5d | 2015-01-01 23:02:01 +0000 | [diff] [blame] | 46 | -DSQLITE_ENABLE_STAT4 |
dan | 5608973 | 2011-04-06 12:37:09 +0000 | [diff] [blame] | 47 | } |
drh | 0ede9eb | 2015-01-10 16:49:23 +0000 | [diff] [blame] | 48 | "Have-Not" { |
| 49 | # The "Have-Not" configuration sets all possible -UHAVE_feature options |
| 50 | # in order to verify that the code works even on platforms that lack |
| 51 | # these support services. |
| 52 | -DHAVE_FDATASYNC=0 |
| 53 | -DHAVE_GMTIME_R=0 |
drh | 8567d40 | 2015-01-10 18:22:06 +0000 | [diff] [blame] | 54 | -DHAVE_ISNAN=0 |
drh | 0ede9eb | 2015-01-10 16:49:23 +0000 | [diff] [blame] | 55 | -DHAVE_LOCALTIME_R=0 |
| 56 | -DHAVE_LOCALTIME_S=0 |
| 57 | -DHAVE_MALLOC_USABLE_SIZE=0 |
| 58 | -DHAVE_STRCHRNUL=0 |
| 59 | -DHAVE_USLEEP=0 |
| 60 | -DHAVE_UTIME=0 |
| 61 | } |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 62 | "Unlock-Notify" { |
| 63 | -O2 |
| 64 | -DSQLITE_ENABLE_UNLOCK_NOTIFY |
| 65 | -DSQLITE_THREADSAFE |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 66 | -DSQLITE_TCL_DEFAULT_FULLMUTEX=1 |
| 67 | } |
| 68 | "Secure-Delete" { |
| 69 | -O2 |
| 70 | -DSQLITE_SECURE_DELETE=1 |
| 71 | -DSQLITE_SOUNDEX=1 |
| 72 | } |
| 73 | "Update-Delete-Limit" { |
| 74 | -O2 |
| 75 | -DSQLITE_DEFAULT_FILE_FORMAT=4 |
| 76 | -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT=1 |
drh | 1a80384 | 2015-01-09 20:00:21 +0000 | [diff] [blame] | 77 | -DSQLITE_ENABLE_STMT_SCANSTATUS |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 78 | } |
dan | b136e90 | 2012-12-10 10:22:48 +0000 | [diff] [blame] | 79 | "Check-Symbols" { |
| 80 | -DSQLITE_MEMDEBUG=1 |
| 81 | -DSQLITE_ENABLE_FTS3_PARENTHESIS=1 |
| 82 | -DSQLITE_ENABLE_FTS3=1 |
| 83 | -DSQLITE_ENABLE_RTREE=1 |
| 84 | -DSQLITE_ENABLE_MEMSYS5=1 |
| 85 | -DSQLITE_ENABLE_MEMSYS3=1 |
| 86 | -DSQLITE_ENABLE_COLUMN_METADATA=1 |
| 87 | -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT=1 |
| 88 | -DSQLITE_SECURE_DELETE=1 |
| 89 | -DSQLITE_SOUNDEX=1 |
| 90 | -DSQLITE_ENABLE_ATOMIC_WRITE=1 |
dan | b136e90 | 2012-12-10 10:22:48 +0000 | [diff] [blame] | 91 | -DSQLITE_ENABLE_MEMORY_MANAGEMENT=1 |
| 92 | -DSQLITE_ENABLE_OVERSIZE_CELL_CHECK=1 |
drh | 4081d5d | 2015-01-01 23:02:01 +0000 | [diff] [blame] | 93 | -DSQLITE_ENABLE_STAT4 |
drh | 1a80384 | 2015-01-09 20:00:21 +0000 | [diff] [blame] | 94 | -DSQLITE_ENABLE_STMT_SCANSTATUS |
dan | b136e90 | 2012-12-10 10:22:48 +0000 | [diff] [blame] | 95 | } |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 96 | "Debug-One" { |
drh | 8f45555 | 2015-01-07 14:41:18 +0000 | [diff] [blame] | 97 | --disable-shared |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 98 | -O2 |
| 99 | -DSQLITE_DEBUG=1 |
| 100 | -DSQLITE_MEMDEBUG=1 |
| 101 | -DSQLITE_MUTEX_NOOP=1 |
| 102 | -DSQLITE_TCL_DEFAULT_FULLMUTEX=1 |
| 103 | -DSQLITE_ENABLE_FTS3=1 |
| 104 | -DSQLITE_ENABLE_RTREE=1 |
| 105 | -DSQLITE_ENABLE_MEMSYS5=1 |
| 106 | -DSQLITE_ENABLE_MEMSYS3=1 |
| 107 | -DSQLITE_ENABLE_COLUMN_METADATA=1 |
drh | 4081d5d | 2015-01-01 23:02:01 +0000 | [diff] [blame] | 108 | -DSQLITE_ENABLE_STAT4 |
drh | edb31cd | 2015-01-08 02:15:11 +0000 | [diff] [blame] | 109 | -DSQLITE_MAX_ATTACHED=125 |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 110 | } |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 111 | "Device-One" { |
| 112 | -O2 |
| 113 | -DSQLITE_DEBUG=1 |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 114 | -DSQLITE_DEFAULT_AUTOVACUUM=1 |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 115 | -DSQLITE_DEFAULT_CACHE_SIZE=64 |
dan | 1c22a18 | 2010-09-13 11:29:02 +0000 | [diff] [blame] | 116 | -DSQLITE_DEFAULT_PAGE_SIZE=1024 |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 117 | -DSQLITE_DEFAULT_TEMP_CACHE_SIZE=32 |
dan | 1c22a18 | 2010-09-13 11:29:02 +0000 | [diff] [blame] | 118 | -DSQLITE_DISABLE_LFS=1 |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 119 | -DSQLITE_ENABLE_ATOMIC_WRITE=1 |
dan | 1c22a18 | 2010-09-13 11:29:02 +0000 | [diff] [blame] | 120 | -DSQLITE_ENABLE_IOTRACE=1 |
| 121 | -DSQLITE_ENABLE_MEMORY_MANAGEMENT=1 |
| 122 | -DSQLITE_MAX_PAGE_SIZE=4096 |
| 123 | -DSQLITE_OMIT_LOAD_EXTENSION=1 |
| 124 | -DSQLITE_OMIT_PROGRESS_CALLBACK=1 |
| 125 | -DSQLITE_OMIT_VIRTUALTABLE=1 |
| 126 | -DSQLITE_TEMP_STORE=3 |
| 127 | } |
| 128 | "Device-Two" { |
| 129 | -DSQLITE_4_BYTE_ALIGNED_MALLOC=1 |
| 130 | -DSQLITE_DEFAULT_AUTOVACUUM=1 |
| 131 | -DSQLITE_DEFAULT_CACHE_SIZE=1000 |
| 132 | -DSQLITE_DEFAULT_LOCKING_MODE=0 |
| 133 | -DSQLITE_DEFAULT_PAGE_SIZE=1024 |
| 134 | -DSQLITE_DEFAULT_TEMP_CACHE_SIZE=1000 |
| 135 | -DSQLITE_DISABLE_LFS=1 |
| 136 | -DSQLITE_ENABLE_FTS3=1 |
| 137 | -DSQLITE_ENABLE_MEMORY_MANAGEMENT=1 |
| 138 | -DSQLITE_ENABLE_RTREE=1 |
| 139 | -DSQLITE_MAX_COMPOUND_SELECT=50 |
| 140 | -DSQLITE_MAX_PAGE_SIZE=32768 |
dan | 1c22a18 | 2010-09-13 11:29:02 +0000 | [diff] [blame] | 141 | -DSQLITE_OMIT_TRACE=1 |
| 142 | -DSQLITE_TEMP_STORE=3 |
| 143 | -DSQLITE_THREADSAFE=2 |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 144 | } |
| 145 | "Locking-Style" { |
| 146 | -O2 |
| 147 | -DSQLITE_ENABLE_LOCKING_STYLE=1 |
| 148 | } |
| 149 | "OS-X" { |
drh | 149735d | 2015-01-01 19:53:10 +0000 | [diff] [blame] | 150 | -O1 # Avoid a compiler bug in gcc 4.2.1 build 5658 |
dan | 1c22a18 | 2010-09-13 11:29:02 +0000 | [diff] [blame] | 151 | -DSQLITE_OMIT_LOAD_EXTENSION=1 |
| 152 | -DSQLITE_DEFAULT_MEMSTATUS=0 |
| 153 | -DSQLITE_THREADSAFE=2 |
| 154 | -DSQLITE_OS_UNIX=1 |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 155 | -DSQLITE_ENABLE_LOCKING_STYLE=1 |
dan | 1c22a18 | 2010-09-13 11:29:02 +0000 | [diff] [blame] | 156 | -DUSE_PREAD=1 |
| 157 | -DSQLITE_ENABLE_RTREE=1 |
| 158 | -DSQLITE_ENABLE_FTS3=1 |
| 159 | -DSQLITE_ENABLE_FTS3_PARENTHESIS=1 |
| 160 | -DSQLITE_DEFAULT_CACHE_SIZE=1000 |
| 161 | -DSQLITE_MAX_LENGTH=2147483645 |
| 162 | -DSQLITE_MAX_VARIABLE_NUMBER=500000 |
mistachkin | 7284056 | 2014-12-23 20:22:57 +0000 | [diff] [blame] | 163 | -DSQLITE_DEBUG=1 |
dan | 1c22a18 | 2010-09-13 11:29:02 +0000 | [diff] [blame] | 164 | -DSQLITE_PREFER_PROXY_LOCKING=1 |
drh | c67d650 | 2014-12-31 15:14:29 +0000 | [diff] [blame] | 165 | -DSQLITE_ENABLE_API_ARMOR=1 |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 166 | } |
| 167 | "Extra-Robustness" { |
| 168 | -DSQLITE_ENABLE_OVERSIZE_CELL_CHECK=1 |
dan | 5608973 | 2011-04-06 12:37:09 +0000 | [diff] [blame] | 169 | -DSQLITE_MAX_ATTACHED=62 |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 170 | } |
dan | 4dc3d73 | 2012-08-20 17:24:48 +0000 | [diff] [blame] | 171 | "Devkit" { |
| 172 | -DSQLITE_DEFAULT_FILE_FORMAT=4 |
| 173 | -DSQLITE_MAX_ATTACHED=30 |
| 174 | -DSQLITE_ENABLE_COLUMN_METADATA |
| 175 | -DSQLITE_ENABLE_FTS4 |
| 176 | -DSQLITE_ENABLE_FTS4_PARENTHESIS |
| 177 | -DSQLITE_DISABLE_FTS4_DEFERRED |
| 178 | -DSQLITE_ENABLE_RTREE |
| 179 | } |
dan | d79d27a | 2014-08-12 14:06:13 +0000 | [diff] [blame] | 180 | "No-lookaside" { |
| 181 | -DSQLITE_TEST_REALLOC_STRESS=1 |
| 182 | -DSQLITE_OMIT_LOOKASIDE=1 |
| 183 | -DHAVE_USLEEP=1 |
| 184 | } |
drh | 8a2a0f5 | 2015-01-07 14:09:41 +0000 | [diff] [blame] | 185 | "Valgrind" { |
| 186 | -DSQLITE_ENABLE_STAT4 |
| 187 | -DSQLITE_ENABLE_FTS4 |
| 188 | -DSQLITE_ENABLE_RTREE |
| 189 | } |
drh | 6aed1c4 | 2015-01-10 15:21:26 +0000 | [diff] [blame] | 190 | |
| 191 | # The next group of configurations are used only by the |
| 192 | # Failure-Detection platform. They are all the same, but we need |
| 193 | # different names for them all so that they results appear in separate |
| 194 | # subdirectories. |
| 195 | # |
drh | edb31cd | 2015-01-08 02:15:11 +0000 | [diff] [blame] | 196 | Fail0 {-O0} |
| 197 | Fail2 {-O0} |
| 198 | Fail3 {-O0} |
drh | db6bafa | 2015-01-09 21:54:58 +0000 | [diff] [blame] | 199 | Fail4 {-O0} |
drh | 6aed1c4 | 2015-01-10 15:21:26 +0000 | [diff] [blame] | 200 | }] |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 201 | |
drh | 6aed1c4 | 2015-01-10 15:21:26 +0000 | [diff] [blame] | 202 | array set ::Platforms [strip_comments { |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 203 | Linux-x86_64 { |
dan | b136e90 | 2012-12-10 10:22:48 +0000 | [diff] [blame] | 204 | "Check-Symbols" checksymbols |
drh | bd41d56 | 2014-12-30 20:40:32 +0000 | [diff] [blame] | 205 | "Debug-One" "mptest test" |
drh | 0ede9eb | 2015-01-10 16:49:23 +0000 | [diff] [blame] | 206 | "Have-Not" test |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 207 | "Secure-Delete" test |
| 208 | "Unlock-Notify" "QUICKTEST_INCLUDE=notify2.test test" |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 209 | "Update-Delete-Limit" test |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 210 | "Extra-Robustness" test |
dan | 1c22a18 | 2010-09-13 11:29:02 +0000 | [diff] [blame] | 211 | "Device-Two" test |
dan | d79d27a | 2014-08-12 14:06:13 +0000 | [diff] [blame] | 212 | "No-lookaside" test |
dan | 5d510d4 | 2014-10-15 15:28:27 +0000 | [diff] [blame] | 213 | "Devkit" test |
drh | 8a2a0f5 | 2015-01-07 14:09:41 +0000 | [diff] [blame] | 214 | "Sanitize" {QUICKTEST_OMIT=func4.test,nan.test test} |
| 215 | "Valgrind" valgrindtest |
dan | 5d510d4 | 2014-10-15 15:28:27 +0000 | [diff] [blame] | 216 | "Default" "threadtest fulltest" |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 217 | "Device-One" fulltest |
| 218 | } |
dan | 1c22a18 | 2010-09-13 11:29:02 +0000 | [diff] [blame] | 219 | Linux-i686 { |
dan | 4dc3d73 | 2012-08-20 17:24:48 +0000 | [diff] [blame] | 220 | "Devkit" test |
drh | 0ede9eb | 2015-01-10 16:49:23 +0000 | [diff] [blame] | 221 | "Have-Not" test |
dan | 1c22a18 | 2010-09-13 11:29:02 +0000 | [diff] [blame] | 222 | "Unlock-Notify" "QUICKTEST_INCLUDE=notify2.test test" |
dan | 1c22a18 | 2010-09-13 11:29:02 +0000 | [diff] [blame] | 223 | "Device-One" test |
dan | d38bc1b | 2010-09-13 12:15:36 +0000 | [diff] [blame] | 224 | "Device-Two" test |
| 225 | "Default" "threadtest fulltest" |
dan | 1c22a18 | 2010-09-13 11:29:02 +0000 | [diff] [blame] | 226 | } |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 227 | Darwin-i386 { |
drh | bd41d56 | 2014-12-30 20:40:32 +0000 | [diff] [blame] | 228 | "Locking-Style" "mptest test" |
drh | 0ede9eb | 2015-01-10 16:49:23 +0000 | [diff] [blame] | 229 | "Have-Not" test |
dan | d38bc1b | 2010-09-13 12:15:36 +0000 | [diff] [blame] | 230 | "OS-X" "threadtest fulltest" |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 231 | } |
drh | bcbac68 | 2014-12-31 18:55:09 +0000 | [diff] [blame] | 232 | Darwin-x86_64 { |
| 233 | "Locking-Style" "mptest test" |
drh | 0ede9eb | 2015-01-10 16:49:23 +0000 | [diff] [blame] | 234 | "Have-Not" test |
drh | bcbac68 | 2014-12-31 18:55:09 +0000 | [diff] [blame] | 235 | "OS-X" "threadtest fulltest" |
| 236 | } |
mistachkin | 7284056 | 2014-12-23 20:22:57 +0000 | [diff] [blame] | 237 | "Windows NT-intel" { |
drh | bd41d56 | 2014-12-30 20:40:32 +0000 | [diff] [blame] | 238 | "Default" "mptest fulltestonly" |
drh | 0ede9eb | 2015-01-10 16:49:23 +0000 | [diff] [blame] | 239 | "Have-Not" test |
mistachkin | 7284056 | 2014-12-23 20:22:57 +0000 | [diff] [blame] | 240 | } |
drh | 6aed1c4 | 2015-01-10 15:21:26 +0000 | [diff] [blame] | 241 | |
| 242 | # The Failure-Detection platform runs various tests that deliberately |
| 243 | # fail. This is used as a test of this script to verify that this script |
| 244 | # correctly identifies failures. |
| 245 | # |
drh | edb31cd | 2015-01-08 02:15:11 +0000 | [diff] [blame] | 246 | Failure-Detection { |
| 247 | Fail0 "TEST_FAILURE=0 test" |
| 248 | Sanitize "TEST_FAILURE=1 test" |
| 249 | Fail2 "TEST_FAILURE=2 valgrindtest" |
| 250 | Fail3 "TEST_FAILURE=3 valgrindtest" |
drh | db6bafa | 2015-01-09 21:54:58 +0000 | [diff] [blame] | 251 | Fail4 "TEST_FAILURE=4 test" |
drh | edb31cd | 2015-01-08 02:15:11 +0000 | [diff] [blame] | 252 | } |
drh | 6aed1c4 | 2015-01-10 15:21:26 +0000 | [diff] [blame] | 253 | }] |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 254 | |
dan | e7152dc | 2011-07-07 08:19:16 +0000 | [diff] [blame] | 255 | |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 256 | # End of configuration section. |
| 257 | ######################################################################### |
| 258 | ######################################################################### |
| 259 | |
| 260 | foreach {key value} [array get ::Platforms] { |
| 261 | foreach {v t} $value { |
| 262 | if {0==[info exists ::Configs($v)]} { |
| 263 | puts stderr "No such configuration: \"$v\"" |
| 264 | exit -1 |
| 265 | } |
| 266 | } |
| 267 | } |
| 268 | |
drh | 277b4e4 | 2014-12-29 02:55:58 +0000 | [diff] [blame] | 269 | # Open the file $logfile and look for a report on the number of errors |
| 270 | # and the number of test cases run. Add these values to the global |
| 271 | # $::NERRCASE and $::NTESTCASE variables. |
| 272 | # |
| 273 | # If any errors occur, then write into $errmsgVar the text of an appropriate |
| 274 | # one-line error message to show on the output. |
| 275 | # |
| 276 | proc count_tests_and_errors {logfile rcVar errmsgVar} { |
drh | cb281a9 | 2014-12-29 19:54:10 +0000 | [diff] [blame] | 277 | if {$::DRYRUN} return |
drh | 277b4e4 | 2014-12-29 02:55:58 +0000 | [diff] [blame] | 278 | upvar 1 $rcVar rc $errmsgVar errmsg |
| 279 | set fd [open $logfile rb] |
| 280 | set seen 0 |
| 281 | while {![eof $fd]} { |
| 282 | set line [gets $fd] |
drh | bd41d56 | 2014-12-30 20:40:32 +0000 | [diff] [blame] | 283 | if {[regexp {(\d+) errors out of (\d+) tests} $line all nerr ntest]} { |
drh | 277b4e4 | 2014-12-29 02:55:58 +0000 | [diff] [blame] | 284 | incr ::NERRCASE $nerr |
| 285 | incr ::NTESTCASE $ntest |
| 286 | set seen 1 |
| 287 | if {$nerr>0} { |
| 288 | set rc 1 |
| 289 | set errmsg $line |
| 290 | } |
drh | 277b4e4 | 2014-12-29 02:55:58 +0000 | [diff] [blame] | 291 | } |
drh | 4081d5d | 2015-01-01 23:02:01 +0000 | [diff] [blame] | 292 | if {[regexp {runtime error: +(.*)} $line all msg]} { |
| 293 | incr ::NERRCASE |
| 294 | if {$rc==0} { |
| 295 | set rc 1 |
| 296 | set errmsg $msg |
| 297 | } |
| 298 | } |
drh | 8a2a0f5 | 2015-01-07 14:09:41 +0000 | [diff] [blame] | 299 | if {[regexp {ERROR SUMMARY: (\d+) errors.*} $line all cnt] && $cnt>0} { |
| 300 | incr ::NERRCASE |
| 301 | if {$rc==0} { |
| 302 | set rc 1 |
| 303 | set errmsg $all |
| 304 | } |
| 305 | } |
drh | 5bfff9d | 2015-01-08 01:05:42 +0000 | [diff] [blame] | 306 | if {[regexp {^VERSION: 3\.\d+.\d+} $line]} { |
| 307 | set v [string range $line 9 end] |
| 308 | if {$::SQLITE_VERSION eq ""} { |
| 309 | set ::SQLITE_VERSION $v |
| 310 | } elseif {$::SQLITE_VERSION ne $v} { |
| 311 | set rc 1 |
| 312 | set errmsg "version conflict: {$::SQLITE_VERSION} vs. {$v}" |
| 313 | } |
| 314 | } |
drh | 277b4e4 | 2014-12-29 02:55:58 +0000 | [diff] [blame] | 315 | } |
| 316 | close $fd |
| 317 | if {!$seen} { |
| 318 | set rc 1 |
| 319 | set errmsg "Test did not complete" |
drh | db6bafa | 2015-01-09 21:54:58 +0000 | [diff] [blame] | 320 | if {[file readable core]} { |
| 321 | append errmsg " - core file exists" |
| 322 | } |
drh | 277b4e4 | 2014-12-29 02:55:58 +0000 | [diff] [blame] | 323 | } |
| 324 | } |
| 325 | |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 326 | proc run_test_suite {name testtarget config} { |
mistachkin | 7284056 | 2014-12-23 20:22:57 +0000 | [diff] [blame] | 327 | # Tcl variable $opts is used to build up the value used to set the |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 328 | # OPTS Makefile variable. Variable $cflags holds the value for |
| 329 | # CFLAGS. The makefile will pass OPTS to both gcc and lemon, but |
| 330 | # CFLAGS is only passed to gcc. |
| 331 | # |
drh | d477eee | 2014-12-23 19:40:51 +0000 | [diff] [blame] | 332 | set cflags "-g" |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 333 | set opts "" |
drh | a780d8d | 2015-01-03 18:59:17 +0000 | [diff] [blame] | 334 | set title ${name}($testtarget) |
drh | 8f45555 | 2015-01-07 14:41:18 +0000 | [diff] [blame] | 335 | set configOpts "" |
drh | a780d8d | 2015-01-03 18:59:17 +0000 | [diff] [blame] | 336 | |
drh | 149735d | 2015-01-01 19:53:10 +0000 | [diff] [blame] | 337 | regsub -all {#[^\n]*\n} $config \n config |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 338 | foreach arg $config { |
drh | 0ede9eb | 2015-01-10 16:49:23 +0000 | [diff] [blame] | 339 | if {[regexp {^-[UD]} $arg]} { |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 340 | lappend opts $arg |
drh | 0ede9eb | 2015-01-10 16:49:23 +0000 | [diff] [blame] | 341 | } elseif {[regexp {^[A-Z]+=} $arg]} { |
drh | 149735d | 2015-01-01 19:53:10 +0000 | [diff] [blame] | 342 | lappend testtarget $arg |
drh | 8f45555 | 2015-01-07 14:41:18 +0000 | [diff] [blame] | 343 | } elseif {[regexp {^--(enable|disable)-} $arg]} { |
| 344 | lappend configOpts $arg |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 345 | } else { |
| 346 | lappend cflags $arg |
| 347 | } |
| 348 | } |
| 349 | |
| 350 | set cflags [join $cflags " "] |
| 351 | set opts [join $opts " "] |
| 352 | append opts " -DSQLITE_NO_SYNC=1 -DHAVE_USLEEP" |
| 353 | |
| 354 | # Set the sub-directory to use. |
| 355 | # |
| 356 | set dir [string tolower [string map {- _ " " _} $name]] |
| 357 | |
| 358 | if {$::tcl_platform(platform)=="windows"} { |
| 359 | append opts " -DSQLITE_OS_WIN=1" |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 360 | } else { |
| 361 | append opts " -DSQLITE_OS_UNIX=1" |
| 362 | } |
| 363 | |
drh | 8f45555 | 2015-01-07 14:41:18 +0000 | [diff] [blame] | 364 | if {!$::TRACE} { |
drh | e43ff92 | 2014-12-23 20:41:13 +0000 | [diff] [blame] | 365 | set n [string length $title] |
drh | c67d650 | 2014-12-31 15:14:29 +0000 | [diff] [blame] | 366 | puts -nonewline "${title}[string repeat . [expr {63-$n}]]" |
drh | d477eee | 2014-12-23 19:40:51 +0000 | [diff] [blame] | 367 | flush stdout |
| 368 | } |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 369 | |
drh | 8f45555 | 2015-01-07 14:41:18 +0000 | [diff] [blame] | 370 | set rc 0 |
drh | d477eee | 2014-12-23 19:40:51 +0000 | [diff] [blame] | 371 | set tm1 [clock seconds] |
| 372 | set origdir [pwd] |
drh | 8f45555 | 2015-01-07 14:41:18 +0000 | [diff] [blame] | 373 | trace_cmd file mkdir $dir |
| 374 | trace_cmd cd $dir |
drh | 277b4e4 | 2014-12-29 02:55:58 +0000 | [diff] [blame] | 375 | set errmsg {} |
drh | db6bafa | 2015-01-09 21:54:58 +0000 | [diff] [blame] | 376 | catch {file delete core} |
drh | 8f45555 | 2015-01-07 14:41:18 +0000 | [diff] [blame] | 377 | set rc [catch [configureCommand $configOpts]] |
drh | d477eee | 2014-12-23 19:40:51 +0000 | [diff] [blame] | 378 | if {!$rc} { |
mistachkin | 7284056 | 2014-12-23 20:22:57 +0000 | [diff] [blame] | 379 | set rc [catch [makeCommand $testtarget $cflags $opts]] |
drh | 277b4e4 | 2014-12-29 02:55:58 +0000 | [diff] [blame] | 380 | count_tests_and_errors test.log rc errmsg |
drh | d477eee | 2014-12-23 19:40:51 +0000 | [diff] [blame] | 381 | } |
drh | 8f45555 | 2015-01-07 14:41:18 +0000 | [diff] [blame] | 382 | trace_cmd cd $origdir |
dan | 1c22a18 | 2010-09-13 11:29:02 +0000 | [diff] [blame] | 383 | set tm2 [clock seconds] |
| 384 | |
drh | 8f45555 | 2015-01-07 14:41:18 +0000 | [diff] [blame] | 385 | if {!$::TRACE} { |
drh | 7203aed | 2015-01-01 18:54:23 +0000 | [diff] [blame] | 386 | set hours [expr {($tm2-$tm1)/3600}] |
drh | e43ff92 | 2014-12-23 20:41:13 +0000 | [diff] [blame] | 387 | set minutes [expr {(($tm2-$tm1)/60)%60}] |
drh | d477eee | 2014-12-23 19:40:51 +0000 | [diff] [blame] | 388 | set seconds [expr {($tm2-$tm1)%60}] |
drh | e43ff92 | 2014-12-23 20:41:13 +0000 | [diff] [blame] | 389 | set tm [format (%02d:%02d:%02d) $hours $minutes $seconds] |
drh | d477eee | 2014-12-23 19:40:51 +0000 | [diff] [blame] | 390 | if {$rc} { |
| 391 | puts " FAIL $tm" |
| 392 | incr ::NERR |
drh | 277b4e4 | 2014-12-29 02:55:58 +0000 | [diff] [blame] | 393 | if {$errmsg!=""} {puts " $errmsg"} |
drh | d477eee | 2014-12-23 19:40:51 +0000 | [diff] [blame] | 394 | } else { |
| 395 | puts " Ok $tm" |
| 396 | } |
| 397 | } |
| 398 | } |
| 399 | |
mistachkin | 7284056 | 2014-12-23 20:22:57 +0000 | [diff] [blame] | 400 | # The following procedure returns the "configure" command to be exectued for |
| 401 | # the current platform, which may be Windows (via MinGW, etc). |
| 402 | # |
drh | 8f45555 | 2015-01-07 14:41:18 +0000 | [diff] [blame] | 403 | proc configureCommand {opts} { |
| 404 | set result [list trace_cmd exec] |
mistachkin | 7284056 | 2014-12-23 20:22:57 +0000 | [diff] [blame] | 405 | if {$::tcl_platform(platform)=="windows"} { |
| 406 | lappend result sh |
| 407 | } |
drh | 8f45555 | 2015-01-07 14:41:18 +0000 | [diff] [blame] | 408 | lappend result $::SRCDIR/configure --enable-load-extension |
| 409 | foreach x $opts {lappend result $x} |
| 410 | lappend result >& test.log |
mistachkin | 7284056 | 2014-12-23 20:22:57 +0000 | [diff] [blame] | 411 | } |
| 412 | |
| 413 | # The following procedure returns the "make" command to be executed for the |
| 414 | # specified targets, compiler flags, and options. |
| 415 | # |
| 416 | proc makeCommand { targets cflags opts } { |
drh | 8f45555 | 2015-01-07 14:41:18 +0000 | [diff] [blame] | 417 | set result [list trace_cmd exec make clean] |
mistachkin | 7284056 | 2014-12-23 20:22:57 +0000 | [diff] [blame] | 418 | foreach target $targets { |
| 419 | lappend result $target |
| 420 | } |
| 421 | lappend result CFLAGS=$cflags OPTS=$opts >>& test.log |
| 422 | } |
| 423 | |
drh | 8f45555 | 2015-01-07 14:41:18 +0000 | [diff] [blame] | 424 | # The following procedure prints its arguments if ::TRACE is true. |
| 425 | # And it executes the command of its arguments in the calling context |
| 426 | # if ::DRYRUN is false. |
drh | d477eee | 2014-12-23 19:40:51 +0000 | [diff] [blame] | 427 | # |
drh | 8f45555 | 2015-01-07 14:41:18 +0000 | [diff] [blame] | 428 | proc trace_cmd {args} { |
| 429 | if {$::TRACE} { |
drh | d477eee | 2014-12-23 19:40:51 +0000 | [diff] [blame] | 430 | puts $args |
drh | 8f45555 | 2015-01-07 14:41:18 +0000 | [diff] [blame] | 431 | } |
| 432 | if {!$::DRYRUN} { |
drh | d477eee | 2014-12-23 19:40:51 +0000 | [diff] [blame] | 433 | uplevel 1 $args |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 434 | } |
| 435 | } |
| 436 | |
| 437 | |
| 438 | # This proc processes the command line options passed to this script. |
| 439 | # Currently the only option supported is "-makefile", default |
| 440 | # "releasetest.mk". Set the ::MAKEFILE variable to the value of this |
| 441 | # option. |
| 442 | # |
| 443 | proc process_options {argv} { |
drh | d477eee | 2014-12-23 19:40:51 +0000 | [diff] [blame] | 444 | set ::SRCDIR [file normalize [file dirname [file dirname $::argv0]]] |
| 445 | set ::QUICK 0 |
| 446 | set ::BUILDONLY 0 |
| 447 | set ::DRYRUN 0 |
| 448 | set ::EXEC exec |
drh | 8f45555 | 2015-01-07 14:41:18 +0000 | [diff] [blame] | 449 | set ::TRACE 0 |
drh | 2eeb7ae | 2014-10-10 17:44:03 +0000 | [diff] [blame] | 450 | set config {} |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 451 | set platform $::tcl_platform(os)-$::tcl_platform(machine) |
| 452 | |
| 453 | for {set i 0} {$i < [llength $argv]} {incr i} { |
drh | d477eee | 2014-12-23 19:40:51 +0000 | [diff] [blame] | 454 | set x [lindex $argv $i] |
| 455 | if {[regexp {^--[a-z]} $x]} {set x [string range $x 1 end]} |
drh | f167a40 | 2015-01-07 18:44:59 +0000 | [diff] [blame] | 456 | switch -glob -- $x { |
drh | d477eee | 2014-12-23 19:40:51 +0000 | [diff] [blame] | 457 | -srcdir { |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 458 | incr i |
drh | d477eee | 2014-12-23 19:40:51 +0000 | [diff] [blame] | 459 | set ::SRCDIR [file normalize [lindex $argv $i]] |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 460 | } |
| 461 | |
| 462 | -platform { |
| 463 | incr i |
| 464 | set platform [lindex $argv $i] |
| 465 | } |
| 466 | |
| 467 | -quick { |
drh | d477eee | 2014-12-23 19:40:51 +0000 | [diff] [blame] | 468 | set ::QUICK 1 |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 469 | } |
drh | 5bfff9d | 2015-01-08 01:05:42 +0000 | [diff] [blame] | 470 | -veryquick { |
| 471 | set ::QUICK 2 |
| 472 | } |
drh | 2eeb7ae | 2014-10-10 17:44:03 +0000 | [diff] [blame] | 473 | |
| 474 | -config { |
| 475 | incr i |
| 476 | set config [lindex $argv $i] |
| 477 | } |
drh | d477eee | 2014-12-23 19:40:51 +0000 | [diff] [blame] | 478 | |
| 479 | -buildonly { |
| 480 | set ::BUILDONLY 1 |
| 481 | } |
| 482 | |
| 483 | -dryrun { |
| 484 | set ::DRYRUN 1 |
| 485 | } |
| 486 | |
drh | 8f45555 | 2015-01-07 14:41:18 +0000 | [diff] [blame] | 487 | -trace { |
| 488 | set ::TRACE 1 |
| 489 | } |
| 490 | |
drh | d477eee | 2014-12-23 19:40:51 +0000 | [diff] [blame] | 491 | -info { |
| 492 | puts "Command-line Options:" |
| 493 | puts " --srcdir $::SRCDIR" |
| 494 | puts " --platform [list $platform]" |
| 495 | puts " --config [list $config]" |
| 496 | if {$::QUICK} {puts " --quick"} |
| 497 | if {$::BUILDONLY} {puts " --buildonly"} |
| 498 | if {$::DRYRUN} {puts " --dryrun"} |
drh | 8f45555 | 2015-01-07 14:41:18 +0000 | [diff] [blame] | 499 | if {$::TRACE} {puts " --trace"} |
drh | d477eee | 2014-12-23 19:40:51 +0000 | [diff] [blame] | 500 | puts "\nAvailable --platform options:" |
| 501 | foreach y [lsort [array names ::Platforms]] { |
| 502 | puts " [list $y]" |
| 503 | } |
| 504 | puts "\nAvailable --config options:" |
| 505 | foreach y [lsort [array names ::Configs]] { |
| 506 | puts " [list $y]" |
| 507 | } |
| 508 | exit |
| 509 | } |
drh | f167a40 | 2015-01-07 18:44:59 +0000 | [diff] [blame] | 510 | -g - |
| 511 | -D* - |
drh | 5bfff9d | 2015-01-08 01:05:42 +0000 | [diff] [blame] | 512 | -O* - |
drh | f167a40 | 2015-01-07 18:44:59 +0000 | [diff] [blame] | 513 | -enable-* - |
| 514 | -disable-* - |
| 515 | *=* { |
| 516 | lappend ::EXTRACONFIG [lindex $argv $i] |
| 517 | } |
mistachkin | 7284056 | 2014-12-23 20:22:57 +0000 | [diff] [blame] | 518 | |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 519 | default { |
| 520 | puts stderr "" |
| 521 | puts stderr [string trim $::USAGE_MESSAGE] |
| 522 | exit -1 |
| 523 | } |
| 524 | } |
| 525 | } |
| 526 | |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 527 | if {0==[info exists ::Platforms($platform)]} { |
| 528 | puts "Unknown platform: $platform" |
| 529 | puts -nonewline "Set the -platform option to " |
| 530 | set print [list] |
| 531 | foreach p [array names ::Platforms] { |
| 532 | lappend print "\"$p\"" |
| 533 | } |
| 534 | lset print end "or [lindex $print end]" |
| 535 | puts "[join $print {, }]." |
| 536 | exit |
| 537 | } |
| 538 | |
drh | 2eeb7ae | 2014-10-10 17:44:03 +0000 | [diff] [blame] | 539 | if {$config!=""} { |
drh | e35626f | 2014-10-10 17:47:00 +0000 | [diff] [blame] | 540 | if {[llength $config]==1} {lappend config fulltest} |
drh | 2eeb7ae | 2014-10-10 17:44:03 +0000 | [diff] [blame] | 541 | set ::CONFIGLIST $config |
| 542 | } else { |
| 543 | set ::CONFIGLIST $::Platforms($platform) |
| 544 | } |
drh | d477eee | 2014-12-23 19:40:51 +0000 | [diff] [blame] | 545 | puts "Running the following test configurations for $platform:" |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 546 | puts " [string trim $::CONFIGLIST]" |
drh | d477eee | 2014-12-23 19:40:51 +0000 | [diff] [blame] | 547 | puts -nonewline "Flags:" |
| 548 | if {$::DRYRUN} {puts -nonewline " --dryrun"} |
| 549 | if {$::BUILDONLY} {puts -nonewline " --buildonly"} |
drh | 5bfff9d | 2015-01-08 01:05:42 +0000 | [diff] [blame] | 550 | switch -- $::QUICK { |
| 551 | 1 {puts -nonewline " --quick"} |
| 552 | 2 {puts -nonewline " --veryquick"} |
| 553 | } |
drh | d477eee | 2014-12-23 19:40:51 +0000 | [diff] [blame] | 554 | puts "" |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 555 | } |
| 556 | |
| 557 | # Main routine. |
| 558 | # |
| 559 | proc main {argv} { |
| 560 | |
| 561 | # Process any command line options. |
drh | f167a40 | 2015-01-07 18:44:59 +0000 | [diff] [blame] | 562 | set ::EXTRACONFIG {} |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 563 | process_options $argv |
drh | c67d650 | 2014-12-31 15:14:29 +0000 | [diff] [blame] | 564 | puts [string repeat * 79] |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 565 | |
drh | 97876ee | 2014-12-24 23:35:36 +0000 | [diff] [blame] | 566 | set ::NERR 0 |
| 567 | set ::NTEST 0 |
drh | 277b4e4 | 2014-12-29 02:55:58 +0000 | [diff] [blame] | 568 | set ::NTESTCASE 0 |
| 569 | set ::NERRCASE 0 |
drh | 5bfff9d | 2015-01-08 01:05:42 +0000 | [diff] [blame] | 570 | set ::SQLITE_VERSION {} |
drh | d477eee | 2014-12-23 19:40:51 +0000 | [diff] [blame] | 571 | set STARTTIME [clock seconds] |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 572 | foreach {zConfig target} $::CONFIGLIST { |
drh | 5bfff9d | 2015-01-08 01:05:42 +0000 | [diff] [blame] | 573 | if {$target ne "checksymbols"} { |
| 574 | switch -- $::QUICK { |
| 575 | 1 {set target test} |
| 576 | 2 {set target smoketest} |
| 577 | } |
| 578 | if {$::BUILDONLY} {set target testfixture} |
| 579 | } |
drh | f167a40 | 2015-01-07 18:44:59 +0000 | [diff] [blame] | 580 | set config_options [concat $::Configs($zConfig) $::EXTRACONFIG] |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 581 | |
drh | d477eee | 2014-12-23 19:40:51 +0000 | [diff] [blame] | 582 | incr NTEST |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 583 | run_test_suite $zConfig $target $config_options |
| 584 | |
| 585 | # If the configuration included the SQLITE_DEBUG option, then remove |
| 586 | # it and run veryquick.test. If it did not include the SQLITE_DEBUG option |
| 587 | # add it and run veryquick.test. |
drh | 5bfff9d | 2015-01-08 01:05:42 +0000 | [diff] [blame] | 588 | if {$target!="checksymbols" && $target!="valgrindtest" |
| 589 | && !$::BUILDONLY && $::QUICK<2} { |
dan | b136e90 | 2012-12-10 10:22:48 +0000 | [diff] [blame] | 590 | set debug_idx [lsearch -glob $config_options -DSQLITE_DEBUG*] |
drh | bd41d56 | 2014-12-30 20:40:32 +0000 | [diff] [blame] | 591 | set xtarget $target |
drh | af700b3 | 2014-12-31 20:35:11 +0000 | [diff] [blame] | 592 | regsub -all {fulltest[a-z]*} $xtarget test xtarget |
dan | b136e90 | 2012-12-10 10:22:48 +0000 | [diff] [blame] | 593 | if {$debug_idx < 0} { |
drh | d477eee | 2014-12-23 19:40:51 +0000 | [diff] [blame] | 594 | incr NTEST |
drh | bd41d56 | 2014-12-30 20:40:32 +0000 | [diff] [blame] | 595 | append config_options " -DSQLITE_DEBUG=1" |
| 596 | run_test_suite "${zConfig}_debug" $xtarget $config_options |
dan | b136e90 | 2012-12-10 10:22:48 +0000 | [diff] [blame] | 597 | } else { |
drh | d477eee | 2014-12-23 19:40:51 +0000 | [diff] [blame] | 598 | incr NTEST |
drh | bd41d56 | 2014-12-30 20:40:32 +0000 | [diff] [blame] | 599 | regsub { *-DSQLITE_MEMDEBUG[^ ]* *} $config_options { } config_options |
| 600 | regsub { *-DSQLITE_DEBUG[^ ]* *} $config_options { } config_options |
| 601 | run_test_suite "${zConfig}_ndebug" $xtarget $config_options |
dan | b136e90 | 2012-12-10 10:22:48 +0000 | [diff] [blame] | 602 | } |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 603 | } |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 604 | } |
drh | d477eee | 2014-12-23 19:40:51 +0000 | [diff] [blame] | 605 | |
| 606 | set elapsetime [expr {[clock seconds]-$STARTTIME}] |
drh | 97876ee | 2014-12-24 23:35:36 +0000 | [diff] [blame] | 607 | set hr [expr {$elapsetime/3600}] |
| 608 | set min [expr {($elapsetime/60)%60}] |
| 609 | set sec [expr {$elapsetime%60}] |
| 610 | set etime [format (%02d:%02d:%02d) $hr $min $sec] |
drh | c67d650 | 2014-12-31 15:14:29 +0000 | [diff] [blame] | 611 | puts [string repeat * 79] |
drh | 5bfff9d | 2015-01-08 01:05:42 +0000 | [diff] [blame] | 612 | puts "$::NERRCASE failures out of $::NTESTCASE tests in $etime" |
| 613 | if {$::SQLITE_VERSION ne ""} { |
| 614 | puts "SQLite $::SQLITE_VERSION" |
| 615 | } |
drh | 96110de | 2010-09-06 18:44:14 +0000 | [diff] [blame] | 616 | } |
| 617 | |
| 618 | main $argv |