xref: /sqlite-3.40.0/test/quick.test (revision 9afe6847)
1#
2#    May you do good and not evil.
3#    May you find forgiveness for yourself and forgive others.
4#    May you share freely, never taking more than you give.
5#
6#***********************************************************************
7# This file runs all tests.
8#
9# $Id: quick.test,v 1.82 2008/06/24 11:21:21 danielk1977 Exp $
10
11proc lshift {lvar} {
12  upvar $lvar l
13  set ret [lindex $l 0]
14  set l [lrange $l 1 end]
15  return $ret
16}
17while {[set arg [lshift argv]] != ""} {
18  switch -- $arg {
19    -sharedpagercache {
20      sqlite3_enable_shared_cache 1
21    }
22    -soak {
23       set SOAKTEST 1
24    }
25    -start {
26       set STARTAT "[lshift argv]*"
27    }
28    default {
29      set argv [linsert $argv 0 $arg]
30      break
31    }
32  }
33}
34
35set testdir [file dirname $argv0]
36source $testdir/tester.tcl
37rename finish_test really_finish_test
38proc finish_test {} {}
39set ISQUICK 1
40
41set EXCLUDE {
42  all.test
43  async.test
44  async2.test
45  corrupt.test
46  crash.test
47  crash2.test
48  crash3.test
49  crash4.test
50  crash6.test
51  crash7.test
52  exclusive3.test
53  fts3.test
54  fuzz.test
55  fuzz_malloc.test
56  in2.test
57  jrnlmode3.test
58  loadext.test
59  mallocAll.test
60  malloc.test
61  malloc2.test
62  malloc3.test
63  malloc4.test
64  memleak.test
65  misc7.test
66  misuse.test
67  mutex2.test
68  onefile.test
69  permutations.test
70  quick.test
71  select9.test
72  soak.test
73  speed1.test
74  speed1p.test
75  speed2.test
76  speed3.test
77  speed4.test
78  speed4p.test
79  sqllimits1.test
80
81  thread001.test
82  thread002.test
83
84  incrvacuum_ioerr.test
85  autovacuum_crash.test
86  btree8.test
87  utf16.test
88  shared_err.test
89  vtab_err.test
90  veryquick.test
91}
92
93if {[sqlite3 -has-codec]} {
94  # lappend EXCLUDE \
95  #  conflict.test
96}
97
98
99# Files to include in the test.  If this list is empty then everything
100# that is not in the EXCLUDE list is run.
101#
102set INCLUDE {
103}
104
105foreach testfile [lsort -dictionary [glob $testdir/*.test]] {
106  set tail [file tail $testfile]
107  if {[lsearch -exact $EXCLUDE $tail]>=0} continue
108  if {[llength $INCLUDE]>0 && [lsearch -exact $INCLUDE $tail]<0} continue
109  if {[info exists STARTAT] && [string match $STARTAT $tail]} {unset STARTAT}
110  if {[info exists STARTAT]} continue
111  source $testfile
112  catch {db close}
113  if {$sqlite_open_file_count>0} {
114    puts "$tail did not close all files: $sqlite_open_file_count"
115    incr nErr
116    lappend ::failList $tail
117    set sqlite_open_file_count 0
118  }
119}
120set argv quick
121source $testdir/permutations.test
122set argv ""
123source $testdir/misuse.test
124
125set sqlite_open_file_count 0
126really_finish_test
127