| OLD | NEW |
| 1 | 1 |
| 2 set rcsid {$Id: $} | 2 set rcsid {$Id: $} |
| 3 | 3 |
| 4 # Documentation for this script. This may be output to stderr | 4 # Documentation for this script. This may be output to stderr |
| 5 # if the script is invoked incorrectly. See the [process_options] | 5 # if the script is invoked incorrectly. See the [process_options] |
| 6 # proc below. | 6 # proc below. |
| 7 # | 7 # |
| 8 set ::USAGE_MESSAGE { | 8 set ::USAGE_MESSAGE { |
| 9 This Tcl script is used to test the various configurations required | 9 This Tcl script is used to test the various configurations required |
| 10 before releasing a new version. Supported command line options (all | 10 before releasing a new version. Supported command line options (all |
| 11 optional) are: | 11 optional) are: |
| 12 | 12 |
| 13 -makefile PATH-TO-MAKEFILE (default "releasetest.mk") | 13 -makefile PATH-TO-MAKEFILE (default "releasetest.mk") |
| 14 -platform PLATFORM (see below) | 14 -platform PLATFORM (see below) |
| 15 -quick BOOLEAN (default "0") | 15 -quick BOOLEAN (default "0") |
| 16 -config CONFIGNAME (Run only CONFIGNAME) |
| 16 | 17 |
| 17 The default value for -makefile is "./releasetest.mk". | 18 The default value for -makefile is "./releasetest.mk". |
| 18 | 19 |
| 19 The script determines the default value for -platform using the | 20 The script determines the default value for -platform using the |
| 20 $tcl_platform(os) and $tcl_platform(machine) variables. Supported | 21 $tcl_platform(os) and $tcl_platform(machine) variables. Supported |
| 21 platforms are "Linux-x86", "Linux-x86_64" and "Darwin-i386". | 22 platforms are "Linux-x86", "Linux-x86_64" and "Darwin-i386". |
| 22 | 23 |
| 23 If the -quick option is set to true, then the "veryquick.test" script | 24 If the -quick option is set to true, then the "veryquick.test" script |
| 24 is run for all compilation configurations. Otherwise, sometimes "all.test" | 25 is run for all compilation configurations. Otherwise, sometimes "all.test" |
| 25 is run, sometimes "veryquick.test". | 26 is run, sometimes "veryquick.test". |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 "Secure-Delete" { | 75 "Secure-Delete" { |
| 75 -O2 | 76 -O2 |
| 76 -DSQLITE_SECURE_DELETE=1 | 77 -DSQLITE_SECURE_DELETE=1 |
| 77 -DSQLITE_SOUNDEX=1 | 78 -DSQLITE_SOUNDEX=1 |
| 78 } | 79 } |
| 79 "Update-Delete-Limit" { | 80 "Update-Delete-Limit" { |
| 80 -O2 | 81 -O2 |
| 81 -DSQLITE_DEFAULT_FILE_FORMAT=4 | 82 -DSQLITE_DEFAULT_FILE_FORMAT=4 |
| 82 -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT=1 | 83 -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT=1 |
| 83 } | 84 } |
| 85 "Check-Symbols" { |
| 86 -DSQLITE_MEMDEBUG=1 |
| 87 -DSQLITE_ENABLE_FTS3_PARENTHESIS=1 |
| 88 -DSQLITE_ENABLE_FTS3=1 |
| 89 -DSQLITE_ENABLE_RTREE=1 |
| 90 -DSQLITE_ENABLE_MEMSYS5=1 |
| 91 -DSQLITE_ENABLE_MEMSYS3=1 |
| 92 -DSQLITE_ENABLE_COLUMN_METADATA=1 |
| 93 -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT=1 |
| 94 -DSQLITE_SECURE_DELETE=1 |
| 95 -DSQLITE_SOUNDEX=1 |
| 96 -DSQLITE_ENABLE_ATOMIC_WRITE=1 |
| 97 -DSQLITE_ENABLE_IOTRACE=1 |
| 98 -DSQLITE_ENABLE_MEMORY_MANAGEMENT=1 |
| 99 -DSQLITE_ENABLE_OVERSIZE_CELL_CHECK=1 |
| 100 } |
| 84 "Debug-One" { | 101 "Debug-One" { |
| 85 -O2 | 102 -O2 |
| 86 -DSQLITE_DEBUG=1 | 103 -DSQLITE_DEBUG=1 |
| 87 -DSQLITE_MEMDEBUG=1 | 104 -DSQLITE_MEMDEBUG=1 |
| 88 -DSQLITE_MUTEX_NOOP=1 | 105 -DSQLITE_MUTEX_NOOP=1 |
| 89 -DSQLITE_TCL_DEFAULT_FULLMUTEX=1 | 106 -DSQLITE_TCL_DEFAULT_FULLMUTEX=1 |
| 90 -DSQLITE_ENABLE_FTS3=1 | 107 -DSQLITE_ENABLE_FTS3=1 |
| 91 -DSQLITE_ENABLE_RTREE=1 | 108 -DSQLITE_ENABLE_RTREE=1 |
| 92 -DSQLITE_ENABLE_MEMSYS5=1 | 109 -DSQLITE_ENABLE_MEMSYS5=1 |
| 93 -DSQLITE_ENABLE_MEMSYS3=1 | 110 -DSQLITE_ENABLE_MEMSYS3=1 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 -DSQLITE_DEFAULT_CACHE_SIZE=1000 | 161 -DSQLITE_DEFAULT_CACHE_SIZE=1000 |
| 145 -DSQLITE_MAX_LENGTH=2147483645 | 162 -DSQLITE_MAX_LENGTH=2147483645 |
| 146 -DSQLITE_MAX_VARIABLE_NUMBER=500000 | 163 -DSQLITE_MAX_VARIABLE_NUMBER=500000 |
| 147 -DSQLITE_DEBUG=1 | 164 -DSQLITE_DEBUG=1 |
| 148 -DSQLITE_PREFER_PROXY_LOCKING=1 | 165 -DSQLITE_PREFER_PROXY_LOCKING=1 |
| 149 } | 166 } |
| 150 "Extra-Robustness" { | 167 "Extra-Robustness" { |
| 151 -DSQLITE_ENABLE_OVERSIZE_CELL_CHECK=1 | 168 -DSQLITE_ENABLE_OVERSIZE_CELL_CHECK=1 |
| 152 -DSQLITE_MAX_ATTACHED=62 | 169 -DSQLITE_MAX_ATTACHED=62 |
| 153 } | 170 } |
| 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 } |
| 180 |
| 181 "No-lookaside" { |
| 182 -DSQLITE_TEST_REALLOC_STRESS=1 |
| 183 -DSQLITE_OMIT_LOOKASIDE=1 |
| 184 -DHAVE_USLEEP=1 |
| 185 } |
| 154 } | 186 } |
| 155 | 187 |
| 156 array set ::Platforms { | 188 array set ::Platforms { |
| 157 Linux-x86_64 { | 189 Linux-x86_64 { |
| 190 "Check-Symbols" checksymbols |
| 191 "Debug-One" test |
| 158 "Secure-Delete" test | 192 "Secure-Delete" test |
| 159 "Unlock-Notify" "QUICKTEST_INCLUDE=notify2.test test" | 193 "Unlock-Notify" "QUICKTEST_INCLUDE=notify2.test test" |
| 160 "Update-Delete-Limit" test | 194 "Update-Delete-Limit" test |
| 161 "Debug-One" test | |
| 162 "Extra-Robustness" test | 195 "Extra-Robustness" test |
| 163 "Device-Two" test | 196 "Device-Two" test |
| 164 "Ftrapv" test | 197 "Ftrapv" test |
| 165 "Default" "threadtest test" | 198 "No-lookaside" test |
| 199 "Devkit" test |
| 200 "Default" "threadtest fulltest" |
| 166 "Device-One" fulltest | 201 "Device-One" fulltest |
| 167 } | 202 } |
| 168 Linux-i686 { | 203 Linux-i686 { |
| 204 "Devkit" test |
| 169 "Unlock-Notify" "QUICKTEST_INCLUDE=notify2.test test" | 205 "Unlock-Notify" "QUICKTEST_INCLUDE=notify2.test test" |
| 170 "Device-One" test | 206 "Device-One" test |
| 171 "Device-Two" test | 207 "Device-Two" test |
| 172 "Default" "threadtest fulltest" | 208 "Default" "threadtest fulltest" |
| 173 } | 209 } |
| 174 Darwin-i386 { | 210 Darwin-i386 { |
| 175 "Locking-Style" test | 211 "Locking-Style" test |
| 176 "OS-X" "threadtest fulltest" | 212 "OS-X" "threadtest fulltest" |
| 177 } | 213 } |
| 178 } | 214 } |
| 179 | 215 |
| 216 |
| 180 # End of configuration section. | 217 # End of configuration section. |
| 181 ######################################################################### | 218 ######################################################################### |
| 182 ######################################################################### | 219 ######################################################################### |
| 183 | 220 |
| 184 foreach {key value} [array get ::Platforms] { | 221 foreach {key value} [array get ::Platforms] { |
| 185 foreach {v t} $value { | 222 foreach {v t} $value { |
| 186 if {0==[info exists ::Configs($v)]} { | 223 if {0==[info exists ::Configs($v)]} { |
| 187 puts stderr "No such configuration: \"$v\"" | 224 puts stderr "No such configuration: \"$v\"" |
| 188 exit -1 | 225 exit -1 |
| 189 } | 226 } |
| (...skipping 20 matching lines...) Expand all Loading... |
| 210 set cflags [join $cflags " "] | 247 set cflags [join $cflags " "] |
| 211 set opts [join $opts " "] | 248 set opts [join $opts " "] |
| 212 append opts " -DSQLITE_NO_SYNC=1 -DHAVE_USLEEP" | 249 append opts " -DSQLITE_NO_SYNC=1 -DHAVE_USLEEP" |
| 213 | 250 |
| 214 # Set the sub-directory to use. | 251 # Set the sub-directory to use. |
| 215 # | 252 # |
| 216 set dir [string tolower [string map {- _ " " _} $name]] | 253 set dir [string tolower [string map {- _ " " _} $name]] |
| 217 | 254 |
| 218 if {$::tcl_platform(platform)=="windows"} { | 255 if {$::tcl_platform(platform)=="windows"} { |
| 219 append opts " -DSQLITE_OS_WIN=1" | 256 append opts " -DSQLITE_OS_WIN=1" |
| 220 } elseif {$::tcl_platform(platform)=="os2"} { | |
| 221 append opts " -DSQLITE_OS_OS2=1" | |
| 222 } else { | 257 } else { |
| 223 append opts " -DSQLITE_OS_UNIX=1" | 258 append opts " -DSQLITE_OS_UNIX=1" |
| 224 } | 259 } |
| 225 | 260 |
| 226 # Run the test. | 261 # Run the test. |
| 227 # | 262 # |
| 228 set makefile [file normalize $::MAKEFILE] | 263 set makefile [file normalize $::MAKEFILE] |
| 229 file mkdir $dir | 264 file mkdir $dir |
| 230 puts -nonewline "Testing configuration \"$name\" (logfile=$dir/test.log)..." | 265 puts -nonewline "Testing configuration \"$name\" (logfile=$dir/test.log)..." |
| 231 flush stdout | 266 flush stdout |
| (...skipping 20 matching lines...) Expand all Loading... |
| 252 | 287 |
| 253 | 288 |
| 254 # This proc processes the command line options passed to this script. | 289 # This proc processes the command line options passed to this script. |
| 255 # Currently the only option supported is "-makefile", default | 290 # Currently the only option supported is "-makefile", default |
| 256 # "releasetest.mk". Set the ::MAKEFILE variable to the value of this | 291 # "releasetest.mk". Set the ::MAKEFILE variable to the value of this |
| 257 # option. | 292 # option. |
| 258 # | 293 # |
| 259 proc process_options {argv} { | 294 proc process_options {argv} { |
| 260 set ::MAKEFILE releasetest.mk ;# Default value | 295 set ::MAKEFILE releasetest.mk ;# Default value |
| 261 set ::QUICK 0 ;# Default value | 296 set ::QUICK 0 ;# Default value |
| 297 set config {} |
| 262 set platform $::tcl_platform(os)-$::tcl_platform(machine) | 298 set platform $::tcl_platform(os)-$::tcl_platform(machine) |
| 263 | 299 |
| 264 for {set i 0} {$i < [llength $argv]} {incr i} { | 300 for {set i 0} {$i < [llength $argv]} {incr i} { |
| 265 switch -- [lindex $argv $i] { | 301 switch -- [lindex $argv $i] { |
| 266 -makefile { | 302 -makefile { |
| 267 incr i | 303 incr i |
| 268 set ::MAKEFILE [lindex $argv $i] | 304 set ::MAKEFILE [lindex $argv $i] |
| 269 } | 305 } |
| 270 | 306 |
| 271 -platform { | 307 -platform { |
| 272 incr i | 308 incr i |
| 273 set platform [lindex $argv $i] | 309 set platform [lindex $argv $i] |
| 274 } | 310 } |
| 275 | 311 |
| 276 -quick { | 312 -quick { |
| 277 incr i | 313 incr i |
| 278 set ::QUICK [lindex $argv $i] | 314 set ::QUICK [lindex $argv $i] |
| 279 } | 315 } |
| 316 |
| 317 -config { |
| 318 incr i |
| 319 set config [lindex $argv $i] |
| 320 } |
| 280 | 321 |
| 281 default { | 322 default { |
| 282 puts stderr "" | 323 puts stderr "" |
| 283 puts stderr [string trim $::USAGE_MESSAGE] | 324 puts stderr [string trim $::USAGE_MESSAGE] |
| 284 exit -1 | 325 exit -1 |
| 285 } | 326 } |
| 286 } | 327 } |
| 287 } | 328 } |
| 288 | 329 |
| 289 set ::MAKEFILE [file normalize $::MAKEFILE] | 330 set ::MAKEFILE [file normalize $::MAKEFILE] |
| 290 | 331 |
| 291 if {0==[info exists ::Platforms($platform)]} { | 332 if {0==[info exists ::Platforms($platform)]} { |
| 292 puts "Unknown platform: $platform" | 333 puts "Unknown platform: $platform" |
| 293 puts -nonewline "Set the -platform option to " | 334 puts -nonewline "Set the -platform option to " |
| 294 set print [list] | 335 set print [list] |
| 295 foreach p [array names ::Platforms] { | 336 foreach p [array names ::Platforms] { |
| 296 lappend print "\"$p\"" | 337 lappend print "\"$p\"" |
| 297 } | 338 } |
| 298 lset print end "or [lindex $print end]" | 339 lset print end "or [lindex $print end]" |
| 299 puts "[join $print {, }]." | 340 puts "[join $print {, }]." |
| 300 exit | 341 exit |
| 301 } | 342 } |
| 302 | 343 |
| 303 set ::CONFIGLIST $::Platforms($platform) | 344 if {$config!=""} { |
| 345 if {[llength $config]==1} {lappend config fulltest} |
| 346 set ::CONFIGLIST $config |
| 347 } else { |
| 348 set ::CONFIGLIST $::Platforms($platform) |
| 349 } |
| 304 puts "Running the following configurations for $platform:" | 350 puts "Running the following configurations for $platform:" |
| 305 puts " [string trim $::CONFIGLIST]" | 351 puts " [string trim $::CONFIGLIST]" |
| 306 } | 352 } |
| 307 | 353 |
| 308 # Main routine. | 354 # Main routine. |
| 309 # | 355 # |
| 310 proc main {argv} { | 356 proc main {argv} { |
| 311 | 357 |
| 312 # Process any command line options. | 358 # Process any command line options. |
| 313 process_options $argv | 359 process_options $argv |
| 314 | 360 |
| 315 foreach {zConfig target} $::CONFIGLIST { | 361 foreach {zConfig target} $::CONFIGLIST { |
| 316 if {$::QUICK} {set target test} | 362 if {$::QUICK} {set target test} |
| 317 set config_options $::Configs($zConfig) | 363 set config_options $::Configs($zConfig) |
| 318 | 364 |
| 319 run_test_suite $zConfig $target $config_options | 365 run_test_suite $zConfig $target $config_options |
| 320 | 366 |
| 321 # If the configuration included the SQLITE_DEBUG option, then remove | 367 # If the configuration included the SQLITE_DEBUG option, then remove |
| 322 # it and run veryquick.test. If it did not include the SQLITE_DEBUG option | 368 # it and run veryquick.test. If it did not include the SQLITE_DEBUG option |
| 323 # add it and run veryquick.test. | 369 # add it and run veryquick.test. |
| 324 set debug_idx [lsearch -glob $config_options -DSQLITE_DEBUG*] | 370 if {$target!="checksymbols"} { |
| 325 if {$debug_idx < 0} { | 371 set debug_idx [lsearch -glob $config_options -DSQLITE_DEBUG*] |
| 326 run_test_suite "${zConfig}_debug" test [ | 372 if {$debug_idx < 0} { |
| 327 concat $config_options -DSQLITE_DEBUG=1 | 373 run_test_suite "${zConfig}_debug" test [ |
| 328 ] | 374 concat $config_options -DSQLITE_DEBUG=1 |
| 329 } else { | 375 ] |
| 330 run_test_suite "${zConfig}_ndebug" test [ | 376 } else { |
| 331 lreplace $config_options $debug_idx $debug_idx | 377 run_test_suite "${zConfig}_ndebug" test [ |
| 332 ] | 378 lreplace $config_options $debug_idx $debug_idx |
| 379 ] |
| 380 } |
| 333 } | 381 } |
| 334 | 382 |
| 335 } | 383 } |
| 336 } | 384 } |
| 337 | 385 |
| 338 main $argv | 386 main $argv |
| OLD | NEW |