xref: /sqlite-3.40.0/test/quick.test (revision a6f46e99)
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.66 2007/11/23 17:31:19 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    default {
26      set argv [linsert $argv 0 $arg]
27      break
28    }
29  }
30}
31
32set testdir [file dirname $argv0]
33source $testdir/tester.tcl
34rename finish_test really_finish_test
35proc finish_test {} {}
36set ISQUICK 1
37
38set EXCLUDE {
39  all.test
40  async.test
41  async2.test
42  btree2.test
43  btree3.test
44  btree4.test
45  btree5.test
46  btree6.test
47  corrupt.test
48  crash.test
49  crash2.test
50  crash3.test
51  exclusive3.test
52  fts3.test
53  fuzz.test
54  fuzz_malloc.test
55  in2.test
56  loadext.test
57  malloc.test
58  malloc2.test
59  malloc3.test
60  malloc4.test
61  memleak.test
62  misc7.test
63  misuse.test
64  onefile.test
65  quick.test
66  soak.test
67  speed1.test
68  speed2.test
69  speed4.test
70  sqllimits1.test
71
72  thread001.test
73  thread002.test
74
75  incrvacuum_ioerr.test
76  autovacuum_crash.test
77  btree8.test
78  utf16.test
79  shared_err.test
80  vtab_err.test
81}
82
83if {[sqlite3 -has-codec]} {
84  # lappend EXCLUDE \
85  #  conflict.test
86}
87
88
89# Files to include in the test.  If this list is empty then everything
90# that is not in the EXCLUDE list is run.
91#
92set INCLUDE {
93}
94
95foreach testfile [lsort -dictionary [glob $testdir/*.test]] {
96  set tail [file tail $testfile]
97  if {[lsearch -exact $EXCLUDE $tail]>=0} continue
98  if {[llength $INCLUDE]>0 && [lsearch -exact $INCLUDE $tail]<0} continue
99  source $testfile
100  catch {db close}
101  if {$sqlite_open_file_count>0} {
102    puts "$tail did not close all files: $sqlite_open_file_count"
103    incr nErr
104    lappend ::failList $tail
105    set sqlite_open_file_count 0
106  }
107}
108source $testdir/misuse.test
109
110set sqlite_open_file_count 0
111really_finish_test
112