/ Check-in [f5f46dc7]
Login

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

Overview
Comment:Added limited support to omittest.tcl for nmake makefile.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: f5f46dc7b8c23e77fd1ff792b7d0cf070de47ca3
User & Date: shaneh 2011-06-22 20:14:09
Context
2011-06-23
00:59
If "PRAGMA page_size" commands are not authorized, the FTS module will assume a page size of 1024. check-in: ba39382e user: drh tags: trunk
2011-06-22
20:14
Added limited support to omittest.tcl for nmake makefile. check-in: f5f46dc7 user: shaneh tags: trunk
15:40
Update a test case for Windows that failed because of size_hint implementation differences. check-in: f853fa63 user: shaneh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to tool/omittest.tcl.

    27     27     * The makefile should support the "testfixture" target.
    28     28     * The makefile should support the "test" target.
    29     29     * The makefile should support the variable "OPTS" as a way to pass
    30     30       options from the make command line to lemon and the C compiler.
    31     31   
    32     32   More precisely, the following two invocations must be supported:
    33     33   
    34         -  make -f $::MAKEFILE testfixture OPTS="-DSQLITE_OMIT_ALTERTABLE=1"
    35         -  make -f $::MAKEFILE test
           34  +  $::MAKEBIN -f $::MAKEFILE testfixture OPTS="-DSQLITE_OMIT_ALTERTABLE=1"
           35  +  $::MAKEBIN -f $::MAKEFILE test
    36     36   
    37     37   Makefiles generated by the sqlite configure program cannot be used as
    38     38   they do not respect the OPTS variable.
    39     39   }
    40     40   
    41     41   
    42     42   # Build a testfixture executable and run quick.test using it. The first
................................................................................
    69     69     puts -nonewline "Building $dir..."
    70     70     flush stdout
    71     71   catch {
    72     72     file copy -force ./config.h $dir
    73     73     file copy -force ./libtool $dir
    74     74   }
    75     75     set rc [catch {
    76         -    exec make -C $dir -f $::MAKEFILE $target OPTS=$opts >& $dir/build.log
           76  +    exec $::MAKEBIN -C $dir -f $::MAKEFILE clean $target OPTS=$opts >& $dir/build.log
    77     77     }]
    78     78     if {$rc} {
    79     79       puts "No good. See $dir/build.log."
    80     80       return
    81     81     } else {
    82     82       puts "Ok"
    83     83     }
................................................................................
    98     98     if {$::SKIP_RUN} {
    99     99         puts "Skip testing $dir."
   100    100     } else {
   101    101       # Run the test suite.
   102    102       puts -nonewline "Testing $dir..."
   103    103       flush stdout
   104    104       set rc [catch {
   105         -      exec make -C $dir -f $::MAKEFILE test OPTS=$opts >& $dir/test.log
          105  +      exec $::MAKEBIN -C $dir -f $::MAKEFILE test OPTS=$opts >& $dir/test.log
   106    106       }]
   107    107       if {$rc} {
   108    108         puts "No good. See $dir/test.log."
   109    109       } else {
   110    110         puts "Ok"
   111    111       }
   112    112     }
................................................................................
   115    115   
   116    116   # This proc processes the command line options passed to this script.
   117    117   # Currently the only option supported is "-makefile", default
   118    118   # "../Makefile.linux-gcc". Set the ::MAKEFILE variable to the value of this
   119    119   # option.
   120    120   #
   121    121   proc process_options {argv} {
          122  +  set ::MAKEBIN make                        ;# Default value
   122    123     if {$::tcl_platform(platform)=="windows" || $::tcl_platform(platform)=="os2"} {
   123         -    set ::MAKEFILE ./Makefile               ;# Default value
          124  +    set ::MAKEFILE ./Makefile               ;# Default value on Windows and OS2
   124    125     } else {
   125    126       set ::MAKEFILE ./Makefile.linux-gcc     ;# Default value
   126    127     }
   127    128     set ::SKIP_RUN 0                          ;# Default to attempt test
   128    129   
   129    130     for {set i 0} {$i < [llength $argv]} {incr i} {
   130    131       switch -- [lindex $argv $i] {
   131    132         -makefile {
   132    133           incr i
   133    134           set ::MAKEFILE [lindex $argv $i]
   134    135         }
   135    136     
          137  +      -nmake {
          138  +        set ::MAKEBIN nmake
          139  +        set ::MAKEFILE ./Makefile.msc
          140  +      }
          141  +
   136    142         -skip_run {
   137    143           set ::SKIP_RUN 1
   138    144         }
   139    145   
   140    146         default {
   141    147           if {[info exists ::SYMBOL]} {
   142    148             puts stderr [string trim $::USAGE_MESSAGE]
................................................................................
   247    253       set sym $::SYMBOL
   248    254   
   249    255       if {[lsearch $::OMIT_SYMBOLS $sym]<0 && [lsearch $::ENABLE_SYMBOLS $sym]<0} {
   250    256         puts stderr "No such symbol: $sym"
   251    257         exit -1
   252    258       }
   253    259   
   254         -    set dirname "test_[string range $sym 7 end]"
          260  +    set dirname "test_[regsub -nocase {^x*SQLITE_} $sym {}]"
   255    261       run_quick_test $dirname $sym
   256    262     } else {
   257    263       # First try a test with all OMIT symbols except SQLITE_OMIT_FLOATING_POINT 
   258    264       # and SQLITE_OMIT_PRAGMA defined. The former doesn't work (causes segfaults)
   259    265       # and the latter is currently incompatible with the test suite (this should
   260    266       # be fixed, but it will be a lot of work).
   261    267       set allsyms [list]
................................................................................
   266    272       }
   267    273       run_quick_test test_OMIT_EVERYTHING $allsyms
   268    274     
   269    275       # Now try one quick.test with each of the OMIT symbols defined. Included
   270    276       # are the OMIT_FLOATING_POINT and OMIT_PRAGMA symbols, even though we
   271    277       # know they will fail. It's good to be reminded of this from time to time.
   272    278       foreach sym $::OMIT_SYMBOLS {
   273         -      set dirname "test_[string range $sym 7 end]"
          279  +      set dirname "test_[regsub -nocase {^x*SQLITE_} $sym {}]"
   274    280         run_quick_test $dirname $sym
   275    281       }
   276    282     
   277    283       # Try the ENABLE/DISABLE symbols one at a time.  
   278    284       # We don't do them all at once since some are conflicting.
   279    285       foreach sym $::ENABLE_SYMBOLS {
   280         -      set dirname "test_[string range $sym 7 end]"
          286  +      set dirname "test_[regsub -nocase {^x*SQLITE_} $sym {}]"
   281    287         run_quick_test $dirname $sym
   282    288       }
   283    289     }
   284    290   }
   285    291   
   286    292   main $argv