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