xref: /sqlite-3.40.0/test/quick.test (revision 545311ee)
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.46 2006/11/09 00:24:55 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    default {
23      set argv [linsert $argv 0 $arg]
24      break
25    }
26  }
27}
28
29set testdir [file dirname $argv0]
30source $testdir/tester.tcl
31rename finish_test really_finish_test
32proc finish_test {} {}
33set ISQUICK 1
34
35set EXCLUDE {
36  all.test
37  async.test
38  async2.test
39  btree2.test
40  btree3.test
41  btree4.test
42  btree5.test
43  btree6.test
44  corrupt.test
45  crash.test
46  loadext.test
47  malloc.test
48  malloc2.test
49  malloc3.test
50  memleak.test
51  misuse.test
52  quick.test
53
54  autovacuum_crash.test
55  btree8.test
56  utf16.test
57  shared_err.test
58  vtab_err.test
59}
60
61if {[sqlite3 -has-codec]} {
62  # lappend EXCLUDE \
63  #  conflict.test
64}
65
66
67# Files to include in the test.  If this list is empty then everything
68# that is not in the EXCLUDE list is run.
69#
70set INCLUDE {
71}
72
73foreach testfile [lsort -dictionary [glob $testdir/*.test]] {
74  set tail [file tail $testfile]
75  if {[lsearch -exact $EXCLUDE $tail]>=0} continue
76  if {[llength $INCLUDE]>0 && [lsearch -exact $INCLUDE $tail]<0} continue
77  source $testfile
78  catch {db close}
79  if {$sqlite_open_file_count>0} {
80    puts "$tail did not close all files: $sqlite_open_file_count"
81    incr nErr
82    lappend ::failList $tail
83  }
84}
85source $testdir/misuse.test
86
87set sqlite_open_file_count 0
88really_finish_test
89