xref: /sqlite-3.40.0/test/quick.test (revision 8a29dfde)
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.77 2008/04/11 14:56:53 drh 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  loadext.test
58  mallocAll.test
59  malloc.test
60  malloc2.test
61  malloc3.test
62  malloc4.test
63  memleak.test
64  misc7.test
65  misuse.test
66  onefile.test
67  quick.test
68  soak.test
69  speed1.test
70  speed1p.test
71  speed2.test
72  speed3.test
73  speed4.test
74  speed4p.test
75  sqllimits1.test
76
77  thread001.test
78  thread002.test
79
80  incrvacuum_ioerr.test
81  autovacuum_crash.test
82  btree8.test
83  utf16.test
84  shared_err.test
85  vtab_err.test
86  veryquick.test
87}
88
89if {[sqlite3 -has-codec]} {
90  # lappend EXCLUDE \
91  #  conflict.test
92}
93
94
95# Files to include in the test.  If this list is empty then everything
96# that is not in the EXCLUDE list is run.
97#
98set INCLUDE {
99}
100
101foreach testfile [lsort -dictionary [glob $testdir/*.test]] {
102  set tail [file tail $testfile]
103  if {[lsearch -exact $EXCLUDE $tail]>=0} continue
104  if {[llength $INCLUDE]>0 && [lsearch -exact $INCLUDE $tail]<0} continue
105  if {[info exists STARTAT] && [string match $STARTAT $tail]} {unset STARTAT}
106  if {[info exists STARTAT]} continue
107  source $testfile
108  catch {db close}
109  if {$sqlite_open_file_count>0} {
110    puts "$tail did not close all files: $sqlite_open_file_count"
111    incr nErr
112    lappend ::failList $tail
113    set sqlite_open_file_count 0
114  }
115}
116source $testdir/misuse.test
117
118set sqlite_open_file_count 0
119really_finish_test
120