xref: /sqlite-3.40.0/test/quick.test (revision 6b6ab133)
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.51 2007/03/31 10:00:49 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    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  crash2.test
47  exclusive3.test
48  loadext.test
49  malloc.test
50  malloc2.test
51  malloc3.test
52  memleak.test
53  misc7.test
54  misuse.test
55  quick.test
56  speed1.test
57  speed2.test
58
59  autovacuum_crash.test
60  btree8.test
61  utf16.test
62  shared_err.test
63  vtab_err.test
64}
65
66if {[sqlite3 -has-codec]} {
67  # lappend EXCLUDE \
68  #  conflict.test
69}
70
71
72# Files to include in the test.  If this list is empty then everything
73# that is not in the EXCLUDE list is run.
74#
75set INCLUDE {
76}
77
78foreach testfile [lsort -dictionary [glob $testdir/*.test]] {
79  set tail [file tail $testfile]
80  if {[lsearch -exact $EXCLUDE $tail]>=0} continue
81  if {[llength $INCLUDE]>0 && [lsearch -exact $INCLUDE $tail]<0} continue
82  source $testfile
83  catch {db close}
84  if {$sqlite_open_file_count>0} {
85    puts "$tail did not close all files: $sqlite_open_file_count"
86    incr nErr
87    lappend ::failList $tail
88  }
89}
90source $testdir/misuse.test
91
92set sqlite_open_file_count 0
93really_finish_test
94