os/persistentdata/persistentstorage/sqlite3api/TEST/TclScript/quick.test
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/persistentdata/persistentstorage/sqlite3api/TEST/TclScript/quick.test	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,146 @@
     1.4 +#
     1.5 +# Portions Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiaries. All rights reserved.
     1.6 +#
     1.7 +#    May you do good and not evil.
     1.8 +#    May you find forgiveness for yourself and forgive others.
     1.9 +#    May you share freely, never taking more than you give.
    1.10 +#
    1.11 +#***********************************************************************
    1.12 +# This file runs all tests.
    1.13 +#
    1.14 +# $Id: quick.test,v 1.87 2008/09/09 18:28:07 danielk1977 Exp $
    1.15 +
    1.16 +proc lshift {lvar} {
    1.17 +  upvar $lvar l
    1.18 +  set ret [lindex $l 0]
    1.19 +  set l [lrange $l 1 end]
    1.20 +  return $ret
    1.21 +}
    1.22 +while {[set arg [lshift argv]] != ""} {
    1.23 +  switch -- $arg {
    1.24 +    -sharedpagercache {
    1.25 +      sqlite3_enable_shared_cache 1
    1.26 +    }
    1.27 +    -soak {
    1.28 +       set SOAKTEST 1
    1.29 +    }
    1.30 +    -start {
    1.31 +       set STARTAT "[lshift argv]*"
    1.32 +    }
    1.33 +    default {
    1.34 +      set argv [linsert $argv 0 $arg]
    1.35 +      break
    1.36 +    }
    1.37 +  }
    1.38 +}
    1.39 +
    1.40 +set testdir [file dirname $argv0]
    1.41 +source $testdir/tester.tcl
    1.42 +rename finish_test really_finish_test
    1.43 +proc finish_test {} {}
    1.44 +set ISQUICK 1
    1.45 +
    1.46 +set EXCLUDE {
    1.47 +  all.test
    1.48 +  async.test
    1.49 +  async2.test
    1.50 +  async3.test
    1.51 +  corrupt.test
    1.52 +  crash.test
    1.53 +  crash2.test
    1.54 +  crash3.test
    1.55 +  crash4.test
    1.56 +  crash5.test
    1.57 +  crash6.test
    1.58 +  crash7.test
    1.59 +  delete3.test
    1.60 +  fts3.test
    1.61 +  fuzz.test
    1.62 +  fuzz3.test
    1.63 +  fuzz_malloc.test
    1.64 +  in2.test
    1.65 +  loadext.test
    1.66 +  memleak.test
    1.67 +  misc7.test
    1.68 +  misuse.test
    1.69 +  mutex2.test
    1.70 +  onefile.test
    1.71 +  permutations.test
    1.72 +  quick.test
    1.73 +  rtree.test
    1.74 +  select9.test
    1.75 +  soak.test
    1.76 +  speed1.test
    1.77 +  speed1p.test
    1.78 +  speed2.test
    1.79 +  speed3.test
    1.80 +  speed4.test
    1.81 +  speed4p.test
    1.82 +  sqllimits1.test
    1.83 +  tkt2686.test
    1.84 +  thread001.test
    1.85 +  thread002.test
    1.86 +  thread003.test
    1.87 +  trans2.test
    1.88 +  vacuum3.test
    1.89 +
    1.90 +  incrvacuum_ioerr.test
    1.91 +  autovacuum_crash.test
    1.92 +  btree8.test
    1.93 +  shared_err.test
    1.94 +  vtab_err.test
    1.95 +  veryquick.test
    1.96 +  mallocAll.test
    1.97 +}
    1.98 +
    1.99 +if {[sqlite3 -has-codec]} {
   1.100 +  # lappend EXCLUDE \
   1.101 +  #  conflict.test
   1.102 +}
   1.103 +
   1.104 +
   1.105 +# Files to include in the test.  If this list is empty then everything
   1.106 +# that is not in the EXCLUDE list is run.
   1.107 +#
   1.108 +set INCLUDE {
   1.109 +}
   1.110 +
   1.111 +foreach testfile [lsort -dictionary [glob $testdir/*.test]] {
   1.112 +  # If this is "veryquick.test", do not run any of the malloc or 
   1.113 +  # IO error simulations.
   1.114 +  if {[info exists ISVERYQUICK] && (
   1.115 +    [string match *malloc* $testfile] || [string match *ioerr* $testfile]
   1.116 +  ) } {
   1.117 +    continue
   1.118 +  }
   1.119 +
   1.120 +  #Symbian OS: tail is overwritten in misc5.test, so use a new var tname for it here.
   1.121 +  set tname [file tail $testfile]
   1.122 +  if {[lsearch -exact $EXCLUDE $tname]>=0} continue
   1.123 +  if {[llength $INCLUDE]>0 && [lsearch -exact $INCLUDE $tname]<0} continue
   1.124 +  if {[info exists STARTAT] && [string match $STARTAT $tname]} {unset STARTAT}
   1.125 +  if {[info exists STARTAT]} continue
   1.126 +  print_text "" $tname
   1.127 +  start_case $tname
   1.128 +  source $testfile
   1.129 +  catch {db close}
   1.130 +  if {$sqlite_open_file_count>0} {
   1.131 +    puts "$tname did not close all files: $sqlite_open_file_count"
   1.132 +    # Symbian OS: Set and increase error count with do_fail procedure (definition in Tester.tcl)
   1.133 +    do_fail $tname 
   1.134 +    set sqlite_open_file_count 0
   1.135 +  }
   1.136 +
   1.137 +  foreach var [info vars] {
   1.138 +    catch { if {[string length [set $var]] > 25000} { unset $var } }
   1.139 +  }
   1.140 +  
   1.141 +  end_case $tname
   1.142 +}
   1.143 +#set argv quick
   1.144 +#source $testdir/permutations.test
   1.145 +#set argv ""
   1.146 +source $testdir/misuse.test
   1.147 +
   1.148 +set sqlite_open_file_count 0
   1.149 +really_finish_test