xref: /sqlite-3.40.0/test/quick.test (revision 1077e3f7)
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.81 2008/06/21 18:07:37 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  soak.test
72  speed1.test
73  speed1p.test
74  speed2.test
75  speed3.test
76  speed4.test
77  speed4p.test
78  sqllimits1.test
79
80  thread001.test
81  thread002.test
82
83  incrvacuum_ioerr.test
84  autovacuum_crash.test
85  btree8.test
86  utf16.test
87  shared_err.test
88  vtab_err.test
89  veryquick.test
90}
91
92if {[sqlite3 -has-codec]} {
93  # lappend EXCLUDE \
94  #  conflict.test
95}
96
97
98# Files to include in the test.  If this list is empty then everything
99# that is not in the EXCLUDE list is run.
100#
101set INCLUDE {
102}
103
104foreach testfile [lsort -dictionary [glob $testdir/*.test]] {
105  set tail [file tail $testfile]
106  if {[lsearch -exact $EXCLUDE $tail]>=0} continue
107  if {[llength $INCLUDE]>0 && [lsearch -exact $INCLUDE $tail]<0} continue
108  if {[info exists STARTAT] && [string match $STARTAT $tail]} {unset STARTAT}
109  if {[info exists STARTAT]} continue
110  source $testfile
111  catch {db close}
112  if {$sqlite_open_file_count>0} {
113    puts "$tail did not close all files: $sqlite_open_file_count"
114    incr nErr
115    lappend ::failList $tail
116    set sqlite_open_file_count 0
117  }
118}
119set argv quick
120source $testdir/permutations.test
121set argv ""
122source $testdir/misuse.test
123
124set sqlite_open_file_count 0
125really_finish_test
126