/ Check-in [af166c5c]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Draft of changes necessary to make releasetest work on Windows via MinGW.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | releasetest-refactor
Files: files | file ages | folders
SHA1:af166c5c64216d845269410d1ac2493310694b86
User & Date: mistachkin 2014-12-23 20:22:57
Context
2014-12-23
20:31
Add the threadtest target to Makefile.in. Add --enable-load-extension to the configure issued by releasetest.tcl. check-in: cb128067 user: drh tags: releasetest-refactor
20:22
Draft of changes necessary to make releasetest work on Windows via MinGW. check-in: af166c5c user: mistachkin tags: releasetest-refactor
19:52
Add the "checksymbols" target to Makefile.in check-in: 5bd73dba user: drh tags: releasetest-refactor
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/releasetest.tcl.

     2      2   #
     3      3   # Documentation for this script. This may be output to stderr
     4      4   # if the script is invoked incorrectly. See the [process_options]
     5      5   # proc below.
     6      6   #
     7      7   set ::USAGE_MESSAGE {
     8      8   This Tcl script is used to test the various configurations required
     9         -before releasing a new version. Supported command line options (all 
            9  +before releasing a new version. Supported command line options (all
    10     10   optional) are:
    11     11   
    12     12       --srcdir   TOP-OF-SQLITE-TREE      (see below)
    13     13       --platform PLATFORM                (see below)
    14     14       --config   CONFIGNAME              (Run only CONFIGNAME)
    15     15       --quick                            (Run "veryquick.test" only)
    16     16       --buildonly                        (Just build testfixture - do not run)
    17         -    --dryrun                           (Print what would have happened)      
           17  +    --dryrun                           (Print what would have happened)
    18     18       --info                             (Show diagnostic info)
    19     19   
    20     20   The default value for --srcdir is the parent of the directory holding
    21     21   this script.
    22     22   
    23     23   The script determines the default value for --platform using the
    24         -$tcl_platform(os) and $tcl_platform(machine) variables. Supported 
           24  +$tcl_platform(os) and $tcl_platform(machine) variables. Supported
    25     25   platforms are "Linux-x86", "Linux-x86_64" and "Darwin-i386".
    26     26   
    27     27   Every test begins with a fresh run of the configure script at the top
    28     28   of the SQLite source tree.
    29     29   }
    30     30   
    31     31   array set ::Configs {
................................................................................
   128    128       -DUSE_PREAD=1
   129    129       -DSQLITE_ENABLE_RTREE=1
   130    130       -DSQLITE_ENABLE_FTS3=1
   131    131       -DSQLITE_ENABLE_FTS3_PARENTHESIS=1
   132    132       -DSQLITE_DEFAULT_CACHE_SIZE=1000
   133    133       -DSQLITE_MAX_LENGTH=2147483645
   134    134       -DSQLITE_MAX_VARIABLE_NUMBER=500000
   135         -    -DSQLITE_DEBUG=1 
          135  +    -DSQLITE_DEBUG=1
   136    136       -DSQLITE_PREFER_PROXY_LOCKING=1
   137    137     }
   138    138     "Extra-Robustness" {
   139    139       -DSQLITE_ENABLE_OVERSIZE_CELL_CHECK=1
   140    140       -DSQLITE_MAX_ATTACHED=62
   141    141     }
   142    142     "Devkit" {
................................................................................
   178    178       "Device-Two"              test
   179    179       "Default"                 "threadtest fulltest"
   180    180     }
   181    181     Darwin-i386 {
   182    182       "Locking-Style"           test
   183    183       "OS-X"                    "threadtest fulltest"
   184    184     }
          185  +  "Windows NT-intel" {
          186  +    "Default"                 "threadtest fulltest"
          187  +  }
   185    188   }
   186    189   
   187    190   
   188    191   # End of configuration section.
   189    192   #########################################################################
   190    193   #########################################################################
   191    194   
................................................................................
   195    198         puts stderr "No such configuration: \"$v\""
   196    199         exit -1
   197    200       }
   198    201     }
   199    202   }
   200    203   
   201    204   proc run_test_suite {name testtarget config} {
   202         -  # Tcl variable $opts is used to build up the value used to set the 
          205  +  # Tcl variable $opts is used to build up the value used to set the
   203    206     # OPTS Makefile variable. Variable $cflags holds the value for
   204    207     # CFLAGS. The makefile will pass OPTS to both gcc and lemon, but
   205    208     # CFLAGS is only passed to gcc.
   206    209     #
   207    210     set cflags "-g"
   208    211     set opts ""
   209    212     foreach arg $config {
................................................................................
   234    237       puts -nonewline "${name}[string repeat . [expr {40-$n}]]"
   235    238       flush stdout
   236    239     }
   237    240   
   238    241     set tm1 [clock seconds]
   239    242     set origdir [pwd]
   240    243     dryrun cd $dir
   241         -  set rc [catch [list dryrun exec $::SRCDIR/configure >& test.log]]
          244  +  set rc [catch [configureCommand]]
   242    245     if {!$rc} {
   243         -    set rc [catch [list dryrun exec make clean $testtarget \
   244         -                             CFLAGS=$cflags OPTS=$opts >>& test.log]]
          246  +    set rc [catch [makeCommand $testtarget $cflags $opts]]
   245    247     }
   246    248     set tm2 [clock seconds]
   247    249     dryrun cd $origdir
   248    250   
   249    251     if {!$::DRYRUN} {
   250    252       set minutes [expr {($tm2-$tm1)/60}]
   251    253       set seconds [expr {($tm2-$tm1)%60}]
................................................................................
   254    256         puts " FAIL $tm"
   255    257         incr ::NERR
   256    258       } else {
   257    259         puts " Ok   $tm"
   258    260       }
   259    261     }
   260    262   }
          263  +
          264  +# The following procedure returns the "configure" command to be exectued for
          265  +# the current platform, which may be Windows (via MinGW, etc).
          266  +#
          267  +proc configureCommand {} {
          268  +  set result [list dryrun exec]
          269  +  if {$::tcl_platform(platform)=="windows"} {
          270  +    lappend result sh
          271  +  }
          272  +  lappend result $::SRCDIR/configure >& test.log
          273  +}
          274  +
          275  +# The following procedure returns the "make" command to be executed for the
          276  +# specified targets, compiler flags, and options.
          277  +#
          278  +proc makeCommand { targets cflags opts } {
          279  +  set result [list dryrun exec make clean]
          280  +  foreach target $targets {
          281  +    lappend result $target
          282  +  }
          283  +  lappend result CFLAGS=$cflags OPTS=$opts >>& test.log
          284  +}
   261    285   
   262    286   # The following procedure either prints its arguments (if ::DRYRUN is true)
   263         -# or executes the command of its arguments in the calling context 
          287  +# or executes the command of its arguments in the calling context
   264    288   # (if ::DRYRUN is false).
   265    289   #
   266    290   proc dryrun {args} {
   267    291     if {$::DRYRUN} {
   268    292       puts $args
   269    293     } else {
   270    294       uplevel 1 $args
................................................................................
   331    355           }
   332    356           puts "\nAvailable --config options:"
   333    357           foreach y [lsort [array names ::Configs]] {
   334    358             puts "   [list $y]"
   335    359           }
   336    360           exit
   337    361         }
   338         -  
          362  +
   339    363         default {
   340    364           puts stderr ""
   341    365           puts stderr [string trim $::USAGE_MESSAGE]
   342    366           exit -1
   343    367         }
   344    368       }
   345    369     }