Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Remove proprietary information from the releasetest.tcl script and add it to the public repository. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
e1d4a87e4e195b3a217f6d8a15d6bece |
User & Date: | drh 2010-09-06 18:44:14.000 |
Context
2010-09-06
| ||
18:50 | Add test cases to e_select.test. (check-in: 9db26d5ef5 user: dan tags: trunk) | |
18:44 | Remove proprietary information from the releasetest.tcl script and add it to the public repository. (check-in: e1d4a87e4e user: drh tags: trunk) | |
2010-09-04
| ||
18:52 | Add test file e_select.test. (check-in: 8b9d8c226e user: dan tags: trunk) | |
Changes
Added test/releasetest.mk.
> > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ######################################################## TOP=/home/drh/sqlite/sqlite TCL_FLAGS=-I/home/drh/tcltk/86linux LIBTCL=/home/drh/tcltk/86linux/libtcl8.6.a -lm -ldl -lpthread BCC = gcc TCC = gcc -ansi -g $(CFLAGS) NAWK = awk AR = ar cr RANLIB = ranlib THREADLIB = -lpthread -ldl -lz include $(TOP)/main.mk ######################################################## |
Added test/releasetest.tcl.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 | set rcsid {$Id: $} # Documentation for this script. This may be output to stderr # if the script is invoked incorrectly. See the [process_options] # proc below. # set ::USAGE_MESSAGE { This Tcl script is used to test the various configurations required before releasing a new version. Supported command line options (all optional) are: -makefile PATH-TO-MAKEFILE (default "releasetest.mk") -platform PLATFORM (see below) -quick BOOLEAN (default "0") The default value for -makefile is "./releasetest.mk". The script determines the default value for -platform using the $tcl_platform(os) and $tcl_platform(machine) variables. Supported platforms are "Linux-x86", "Linux-x86_64" and "Darwin-i386". If the -quick option is set to true, then the "veryquick.test" script is run for all compilation configurations. Otherwise, sometimes "all.test" is run, sometimes "veryquick.test". Almost any SQLite makefile (except those generated by configure - see below) should work. The following properties are required: * The makefile should support the "fulltest" target. * The makefile should support the variable "OPTS" as a way to pass options from the make command line to lemon and the C compiler. More precisely, the following invocation must be supported: make -f $::MAKEFILE fulltest OPTS="-DSQLITE_SECURE_DELETE=1 -DSQLITE_DEBUG=1" Makefiles generated by the sqlite configure program cannot be used as they do not respect the OPTS variable. Example Makefile contents: ######################################################## TOP=/home/dan/work/sqlite/sqlite TCL_FLAGS=-I/home/dan/tcl/include LIBTCL=-L/home/dan/tcl/lib -ltcl BCC = gcc TCC = gcc -ansi -g $(CFLAGS) NAWK = awk AR = ar cr RANLIB = ranlib THREADLIB = -lpthread -ldl include $(TOP)/main.mk ######################################################## } array set ::Configs { "Default" { -O2 } "Unlock-Notify" { -O2 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_THREADSAFE -DOS_UNIX -DSQLITE_TCL_DEFAULT_FULLMUTEX=1 } "Secure-Delete" { -O2 -DSQLITE_SECURE_DELETE=1 -DSQLITE_SOUNDEX=1 } "Update-Delete-Limit" { -O2 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT=1 } "Debug-One" { -O2 -DSQLITE_DEBUG=1 -DSQLITE_MEMDEBUG=1 -DSQLITE_MUTEX_NOOP=1 -DSQLITE_TCL_DEFAULT_FULLMUTEX=1 -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_ENABLE_MEMSYS5=1 -DSQLITE_ENABLE_MEMSYS3=1 -DSQLITE_ENABLE_COLUMN_METADATA=1 } "Memory-Leak" { -O2 -DSQLITE_DEBUG=1 -DSQLITE_MEMDEBUG=1 -DSQLITE_OMIT_LOOKASIDE=1 -DSQLITE_ENABLE_ASYNCIO=1 -DSQLITE_TCL_DEFAULT_FULLMUTEX=1 } "Device-One" { -O2 -DSQLITE_DEBUG=1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT=1 -DSQLITE_DISABLE_LFS=1 -DSQLITE_DEFAULT_AUTOVACUUM=1 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_MAX_PAGE_SIZE=4096 -DSQLITE_DEFAULT_CACHE_SIZE=64 -DSQLITE_DEFAULT_TEMP_CACHE_SIZE=32 -DSQLITE_TEMP_STORE=3 -DSQLITE_OMIT_PROGRESS_CALLBACK=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_OMIT_VIRTUALTABLE=1 -DSQLITE_ENABLE_IOTRACE=1 -DSQLITE_ENABLE_ATOMIC_WRITE=1 } "Locking-Style" { -O2 -DSQLITE_ENABLE_LOCKING_STYLE=1 } "OS-X" { -DSQLITE_ENABLE_LOCKING_STYLE=1 -DSQLITE_TCL_DEFAULT_FULLMUTEX=1 } "Extra-Robustness" { -DSQLITE_ENABLE_OVERSIZE_CELL_CHECK=1 } "Coverage" { -O0 -fprofile-arcs -ftest-coverage -DSQLITE_COVERAGE_TEST=1 } } array set ::Platforms { Linux-x86_64 { "Secure-Delete" test "Unlock-Notify" "QUICKTEST_INCLUDE=notify2.test test" "Device-One" fulltest "Update-Delete-Limit" test "Debug-One" test "Extra-Robustness" test "Memory-Leak" fulltest "Default" test } Linux-i686 { "Default" test "Unlock-Notify" "QUICKTEST_INCLUDE=notify2.test test" "Device-One" fulltest } Darwin-i386 { "OS-X" test "Locking-Style" fulltest } } # End of configuration section. ######################################################################### ######################################################################### foreach {key value} [array get ::Platforms] { foreach {v t} $value { if {0==[info exists ::Configs($v)]} { puts stderr "No such configuration: \"$v\"" exit -1 } } } proc run_test_suite {name testtarget config} { # Tcl variable $opts is used to build up the value used to set the # OPTS Makefile variable. Variable $cflags holds the value for # CFLAGS. The makefile will pass OPTS to both gcc and lemon, but # CFLAGS is only passed to gcc. # set cflags "" set opts "" foreach arg $config { if {[string match -D* $arg]} { lappend opts $arg } else { lappend cflags $arg } } set cflags [join $cflags " "] set opts [join $opts " "] append opts " -DSQLITE_NO_SYNC=1 -DHAVE_USLEEP" # Set the sub-directory to use. # set dir [string tolower [string map {- _ " " _} $name]] if {$::tcl_platform(platform)=="windows"} { append opts " -DSQLITE_OS_WIN=1" } elseif {$::tcl_platform(platform)=="os2"} { append opts " -DSQLITE_OS_OS2=1" } else { append opts " -DSQLITE_OS_UNIX=1" } # Run the test. # set makefile [file normalize $::MAKEFILE] file mkdir $dir puts -nonewline "Testing configuration \"$name\" (logfile=$dir/test.log)..." flush stdout set makecmd [concat \ [list exec make -C $dir -f $makefile clean] \ $testtarget \ [list CFLAGS=$cflags OPTS=$opts >& $dir/test.log] \ ] set rc [catch $makecmd] if {$rc} { puts " FAILED." } else { puts "Ok." } } # This proc processes the command line options passed to this script. # Currently the only option supported is "-makefile", default # "releasetest.mk". Set the ::MAKEFILE variable to the value of this # option. # proc process_options {argv} { set ::MAKEFILE releasetest.mk ;# Default value set ::QUICK 0 ;# Default value set platform $::tcl_platform(os)-$::tcl_platform(machine) for {set i 0} {$i < [llength $argv]} {incr i} { switch -- [lindex $argv $i] { -makefile { incr i set ::MAKEFILE [lindex $argv $i] } -platform { incr i set platform [lindex $argv $i] } -quick { incr i set ::QUICK [lindex $argv $i] } default { puts stderr "" puts stderr [string trim $::USAGE_MESSAGE] exit -1 } } } set ::MAKEFILE [file normalize $::MAKEFILE] if {0==[info exists ::Platforms($platform)]} { puts "Unknown platform: $platform" puts -nonewline "Set the -platform option to " set print [list] foreach p [array names ::Platforms] { lappend print "\"$p\"" } lset print end "or [lindex $print end]" puts "[join $print {, }]." exit } set ::CONFIGLIST $::Platforms($platform) puts "Running the following configurations for $platform:" puts " [string trim $::CONFIGLIST]" } # Main routine. # proc main {argv} { # Process any command line options. process_options $argv foreach {zConfig target} $::CONFIGLIST { if {$::QUICK} {set target test} set config_options $::Configs($zConfig) run_test_suite $zConfig $target $config_options # If the configuration included the SQLITE_DEBUG option, then remove # it and run veryquick.test. If it did not include the SQLITE_DEBUG option # add it and run veryquick.test. set debug_idx [lsearch -glob $config_options -DSQLITE_DEBUG*] if {$debug_idx < 0} { run_test_suite "${zConfig}_debug" test [ concat $config_options -DSQLITE_DEBUG=1 ] } else { run_test_suite "${zConfig}_ndebug" test [ lreplace $config_options $debug_idx $debug_idx ] } } } main $argv |