Index: third_party/sqlite/src/test/all.test |
diff --git a/third_party/sqlite/src/test/all.test b/third_party/sqlite/src/test/all.test |
index 980d252115da01f09f54c8e7d29e718c0fb5799e..967124668152beeeee5e657bb17fc13f3fba0aa9 100644 |
--- a/third_party/sqlite/src/test/all.test |
+++ b/third_party/sqlite/src/test/all.test |
@@ -10,135 +10,41 @@ |
#*********************************************************************** |
# This file runs all tests. |
# |
-# $Id: all.test,v 1.62 2009/01/06 18:43:51 drh Exp $ |
set testdir [file dirname $argv0] |
-source $testdir/tester.tcl |
-rename finish_test really_finish_test |
-proc finish_test {} { |
- catch {db close} |
- show_memstats |
-} |
- |
-if {[file exists ./sqlite_test_count]} { |
- set COUNT [exec cat ./sqlite_test_count] |
-} else { |
- set COUNT 1 |
-} |
- |
-if {[llength $argv]>0} { |
- foreach {name value} $argv { |
- switch -- $name { |
- -count { |
- set COUNT $value |
- } |
- -quick { |
- set ISQUICK $value |
- } |
- -soak { |
- set SOAKTEST $value |
- } |
- default { |
- puts stderr "Unknown option: $name" |
- exit |
- } |
- } |
- } |
-} |
-set argv {} |
- |
-# LeakList will hold a list of the number of unfreed mallocs after |
-# each round of the test. This number should be constant. If it |
-# grows, it may mean there is a memory leak in the library. |
-# |
-set LeakList {} |
- |
-set EXCLUDE {} |
-lappend EXCLUDE all.test ;# This file |
-lappend EXCLUDE async.test |
-lappend EXCLUDE crash.test ;# Run seperately later. |
-lappend EXCLUDE crash2.test ;# Run seperately later. |
-lappend EXCLUDE quick.test ;# Alternate test driver script |
-lappend EXCLUDE veryquick.test ;# Alternate test driver script |
-lappend EXCLUDE malloc.test ;# Run seperately later. |
-lappend EXCLUDE misuse.test ;# Run seperately later. |
-lappend EXCLUDE memleak.test ;# Alternate test driver script |
-lappend EXCLUDE permutations.test ;# Run seperately later. |
-lappend EXCLUDE soak.test ;# Takes a very long time (default 1 hr) |
-lappend EXCLUDE fts3.test ;# Wrapper for muliple fts3*.tests |
-lappend EXCLUDE mallocAll.test ;# Wrapper for running all malloc tests |
- |
-# Files to include in the test. If this list is empty then everything |
-# that is not in the EXCLUDE list is run. |
-# |
-set INCLUDE { |
-} |
- |
-for {set Counter 0} {$Counter<$COUNT && $nErr==0} {incr Counter} { |
- foreach testfile [lsort -dictionary [glob $testdir/*.test]] { |
- set tail [file tail $testfile] |
- if {[lsearch -exact $EXCLUDE $tail]>=0} continue |
- if {[llength $INCLUDE]>0 && [lsearch -exact $INCLUDE $tail]<0} continue |
- reset_prng_state |
- source $testfile |
- catch {db close} |
- if {$sqlite_open_file_count>0} { |
- puts "$tail did not close all files: $sqlite_open_file_count" |
- incr nErr |
- lappend ::failList $tail |
- set sqlite_open_file_count 0 |
- } |
- } |
- if {[info exists Leak]} { |
- lappend LeakList $Leak |
- } |
-} |
-set argv all |
source $testdir/permutations.test |
-set argv "" |
-# Do one last test to look for a memory leak in the library. This will |
-# only work if SQLite is compiled with the -DSQLITE_DEBUG=1 flag. |
-# |
-if {$LeakList!=""} { |
- puts -nonewline memory-leak-test... |
- incr ::nTest |
- foreach x $LeakList { |
- if {$x!=[lindex $LeakList 0]} { |
- puts " failed!" |
- puts "Expected: all values to be the same" |
- puts " Got: $LeakList" |
- incr ::nErr |
- lappend ::failList memory-leak-test |
- break |
- } |
- } |
- puts " Ok" |
-} |
+run_test_suite full |
+ |
+run_test_suite no_optimization |
+run_test_suite memsubsys1 |
+run_test_suite memsubsys2 |
+run_test_suite singlethread |
+run_test_suite multithread |
+run_test_suite onefile |
+run_test_suite utf16 |
+run_test_suite exclusive |
+run_test_suite persistent_journal |
+run_test_suite persistent_journal_error |
+run_test_suite no_journal |
+run_test_suite no_journal_error |
+run_test_suite autovacuum_ioerr |
+run_test_suite no_mutex_try |
+run_test_suite fullmutex |
+run_test_suite journaltest |
+run_test_suite inmemory_journal |
+run_test_suite pcache0 |
+run_test_suite pcache10 |
+run_test_suite pcache50 |
+run_test_suite pcache90 |
+run_test_suite pcache100 |
-# Run the crashtest only on unix and only once. If the library does not |
-# always create auto-vacuum databases, also run autovacuum_crash.test. |
-# |
if {$::tcl_platform(platform)=="unix"} { |
- source $testdir/crash.test |
- source $testdir/crash2.test |
ifcapable !default_autovacuum { |
- set argv autovacuum_crash |
- source $testdir/permutations.test |
- set argv "" |
+ run_test_suite autovacuum_crash |
} |
} |
-# Run the malloc tests and the misuse test after memory leak detection. |
-# Both tests leak memory. Currently, misuse.test also leaks a handful of |
-# file descriptors. This is not considered a problem, but can cause tests |
-# in malloc.test to fail. So set the open-file count to zero before running |
-# malloc.test to get around this. |
-# |
-catch {source $testdir/misuse.test} |
-set sqlite_open_file_count 0 |
-catch {source $testdir/malloc.test} |
+finish_test |
+ |
-catch {db close} |
-set sqlite_open_file_count 0 |
-really_finish_test |