SQLite

Check-in [d4ea1287a8]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add a script for "soak" testing. (CVS 4074)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: d4ea1287a8b013a97fcb55bb7f7feba427222bab
User & Date: drh 2007-06-15 18:43:37.000
Context
2007-06-15
18:53
Remove a C++ism from the test harness. Get the TCL interface working with older versions of TCL. (CVS 4075) (check-in: c8beb8674e user: drh tags: trunk)
18:43
Add a script for "soak" testing. (CVS 4074) (check-in: d4ea1287a8 user: drh tags: trunk)
17:50
Fix a race condition in test_server.c/test7.c (test changes only). (CVS 4073) (check-in: d0de32e4c6 user: danielk1977 tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Added tool/soak1.tcl.
























































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#!/usr/bin/tclsh
#
# Usage:
#
#    tclsh soak1.tcl local-makefile.mk ?target? ?scenario?
#
# This generates many variations on local-makefile.mk (by modifing
# the OPT = lines) and runs them will fulltest, one by one.  The
# constructed makefiles are named "soak1.mk".
#
# If ?target? is provided, that is the makefile target that is run.
# The default is "fulltest"
#
# If ?scenario? is provided, it is the name of a single scenario to
# be run.   All other scenarios are skipped.
#
set localmake [lindex $argv 0]
set target [lindex $argv 1]
set scene [lindex $argv 2]
if {$target==""} {set target fulltest}
if {$scene==""} {set scene all}

set in [open $localmake]
set maketxt [read $in]
close $in
regsub -all {\\\n} $maketxt {} maketxt
#set makefilename "soak1-[expr {int(rand()*1000000000)}].mk"
set makefilename "soak1.mk"

# Generate a makefile
#
proc generate_makefile {pattern} {
  global makefilename maketxt
  set out [open $makefilename w]
  set seen_opt 0
  foreach line [split $maketxt \n] {
    if {[regexp {^ *#? *OPTS[ =+]} $line]} {
      if {!$seen_opt} {
         puts $out "OPTS += -DSQLITE_NO_SYNC=1"
         foreach x $pattern {
           puts $out "OPTS += -D$x"
         }
         set seen_opt 1
      }
    } else {
      puts $out $line
    }
  }
  close $out
}

# Run a test
#
proc scenario {id title pattern} {
  global makefilename target scene
  if {$scene!="all" && $scene!=$id && $scene!=$title} return
  puts "**************** $title ***************"
  generate_makefile $pattern
  exec make -f $makefilename clean >@stdout 2>@stdout
  exec make -f $makefilename $target >@stdout 2>@stdout
}

###############################################################################
# Add new scenarios here
#
scenario 0 {Default} {}
scenario 1 {Debug} {
  SQLITE_DEBUG=1
  SQLITE_MEMDEBUG=1
}
scenario 2 {Everything} {
  SQLITE_DEBUG=1
  SQLITE_MEMDEBUG=1
  SQLITE_ENABLE_MEMORY_MANAGEMENT=1
  SQLITE_ENABLE_COLUMN_METADATA=1
  SQLITE_ENABLE_LOAD_EXTENSION=1 HAVE_DLOPEN=1
  SQLITE_ENABLE_MEMORY_MANAGEMENT=1
  SQLITE_ENABLE_REDEF_IO=1
}
scenario 3 {Customer-1} {
  SQLITE_DISABLE_LFS=1
  SQLITE_DEFAULT_AUTOVACUUM=1
  SQLITE_DEFAULT_PAGE_SIZE=1024
  SQLITE_MAX_PAGE_SIZE=4096
  SQLITE_DEFAULT_CACHE_SIZE=64
  SQLITE_DEFAULT_TEMP_CACHE_SIZE=32
  TEMP_STORE=3
  SQLITE_OMIT_PROGRESS_CALLBACK=1
  SQLITE_OMIT_LOAD_EXTENSION=1
  SQLITE_OMIT_VIRTUALTABLE=1
  SQLITE_ENABLE_IOTRACE=1
}