/ Check-in [b0634d2f]
Login

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

Overview
Comment:Run some of the existing test scripts with optimizations disabled as part of all.test.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:b0634d2f909fb192d20315e59fa31fcd8f316541
User & Date: dan 2010-12-07 14:32:29
Context
2010-12-07
14:59
Version 3.7.4 release candidate 3 check-in: 11c74c0d user: drh tags: trunk
14:32
Run some of the existing test scripts with optimizations disabled as part of all.test. check-in: b0634d2f user: dan tags: trunk
07:57
Add tests to tkt-80ba201079.test. check-in: c370338c user: dan tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/all.test.

12
13
14
15
16
17
18

19
20
21
22
23
24
25
#

set testdir [file dirname $argv0]
source $testdir/permutations.test

run_test_suite full


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







>







12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#

set testdir [file dirname $argv0]
source $testdir/permutations.test

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

Changes to test/permutations.test.

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
...
753
754
755
756
757
758
759













760
761
762
763
764
765
766
...
775
776
777
778
779
780
781

782
783
784
785
786
787
788
789
790
791
792
793
794

795
796
797
798
799
800
801
#
#       -description TITLE                  (default "")
#       -initialize  SCRIPT                 (default "")
#       -shutdown    SCRIPT                 (default "")
#       -presql      SQL                    (default "")
#       -files       LIST-OF-FILES          (default $::ALLTESTS)
#       -prefix      NAME                   (default "$::NAME.")

#
proc test_suite {name args} {

  set default(-shutdown)    ""
  set default(-initialize)  ""
  set default(-presql)      ""
  set default(-description) "no description supplied (fixme)"
  set default(-files)       ""
  set default(-prefix)      "${name}."


  array set options [array get default]
  if {[llength $args]%2} {
    error "uneven number of options/switches passed to test_suite"
  }
  foreach {k v} $args {
    set o [array names options ${k}*]
................................................................................
    if {[llength $o]>1}  { error "ambiguous option: $k" }
    if {[llength $o]==0} { error "unknown option: $k" }
    set options([lindex $o 0]) $v
  }

  set     ::testspec($name) [array get options]
  lappend ::testsuitelist $name

}

#-------------------------------------------------------------------------
# test_set ARGS...
#
proc test_set {args} {
  set isExclude 0
................................................................................
  fts3am.test  fts3an.test  fts3ao.test  fts3b.test
  fts3c.test   fts3d.test   fts3e.test   fts3query.test 
}

test_suite "rtree" -description {
  All R-tree related tests. Provides coverage of source file rtree.c.
} -files [glob -nocomplain $::testdir/../ext/rtree/*.test]














# End of tests
#############################################################################

# run_tests NAME OPTIONS
#
# where available options are:  
................................................................................
proc run_tests {name args} {
  array set options $args

  set ::G(perm:name)         $name
  set ::G(perm:prefix)       $options(-prefix)
  set ::G(perm:presql)       $options(-presql)
  set ::G(isquick)           1


  uplevel $options(-initialize)

  foreach file [lsort $options(-files)] {
    if {[file tail $file] == $file} { set file [file join $::testdir $file] }
    slave_test_file $file
  }

  uplevel $options(-shutdown)

  unset ::G(perm:name)
  unset ::G(perm:prefix)
  unset ::G(perm:presql)

}

proc run_test_suite {name} {
  if {[info exists ::testspec($name)]==0} {
    error "No such test suite: $name"
  }
  uplevel run_tests $name $::testspec($name)







>









>







 







<







 







>
>
>
>
>
>
>
>
>
>
>
>
>







 







>













>







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
...
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
...
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
#
#       -description TITLE                  (default "")
#       -initialize  SCRIPT                 (default "")
#       -shutdown    SCRIPT                 (default "")
#       -presql      SQL                    (default "")
#       -files       LIST-OF-FILES          (default $::ALLTESTS)
#       -prefix      NAME                   (default "$::NAME.")
#       -dbconfig    SCRIPT                 (default "")
#
proc test_suite {name args} {

  set default(-shutdown)    ""
  set default(-initialize)  ""
  set default(-presql)      ""
  set default(-description) "no description supplied (fixme)"
  set default(-files)       ""
  set default(-prefix)      "${name}."
  set default(-dbconfig)    ""

  array set options [array get default]
  if {[llength $args]%2} {
    error "uneven number of options/switches passed to test_suite"
  }
  foreach {k v} $args {
    set o [array names options ${k}*]
................................................................................
    if {[llength $o]>1}  { error "ambiguous option: $k" }
    if {[llength $o]==0} { error "unknown option: $k" }
    set options([lindex $o 0]) $v
  }

  set     ::testspec($name) [array get options]
  lappend ::testsuitelist $name

}

#-------------------------------------------------------------------------
# test_set ARGS...
#
proc test_set {args} {
  set isExclude 0
................................................................................
  fts3am.test  fts3an.test  fts3ao.test  fts3b.test
  fts3c.test   fts3d.test   fts3e.test   fts3query.test 
}

test_suite "rtree" -description {
  All R-tree related tests. Provides coverage of source file rtree.c.
} -files [glob -nocomplain $::testdir/../ext/rtree/*.test]

test_suite "no_optimization" -description {
  Run test scripts with optimizations disabled using the
  sqlite3_test_control(SQLITE_TESTCTRL_OPTIMIZATIONS) interface.
} -files {
  where.test where2.test where3.test where4.test where5.test
  where6.test where7.test where8.test where9.test
  whereA.test whereB.test wherelimit.test
  select1.test select2.test select3.test select4.test select5.test
  select7.test select8.test selectA.test selectC.test
} -dbconfig {
  optimization_control $::dbhandle all 0
}

# End of tests
#############################################################################

# run_tests NAME OPTIONS
#
# where available options are:  
................................................................................
proc run_tests {name args} {
  array set options $args

  set ::G(perm:name)         $name
  set ::G(perm:prefix)       $options(-prefix)
  set ::G(perm:presql)       $options(-presql)
  set ::G(isquick)           1
  set ::G(perm:dbconfig)     $options(-dbconfig)

  uplevel $options(-initialize)

  foreach file [lsort $options(-files)] {
    if {[file tail $file] == $file} { set file [file join $::testdir $file] }
    slave_test_file $file
  }

  uplevel $options(-shutdown)

  unset ::G(perm:name)
  unset ::G(perm:prefix)
  unset ::G(perm:presql)
  unset ::G(perm:dbconfig)
}

proc run_test_suite {name} {
  if {[info exists ::testspec($name)]==0} {
    error "No such test suite: $name"
  }
  uplevel run_tests $name $::testspec($name)

Changes to test/tester.tcl.

104
105
106
107
108
109
110




111
112
113
114
115
116
117
      if {[sqlite_orig -has-codec] && ![info exists ::do_not_use_codec]} {
        lappend args -key {xyzzy}
      }

      set res [uplevel 1 sqlite_orig $args]
      if {[info exists ::G(perm:presql)]} {
        [lindex $args 0] eval $::G(perm:presql)




      }
      set res
    } else {
      # This command is not opening a new database connection. Pass the 
      # arguments through to the C implemenation as the are.
      #
      uplevel 1 sqlite_orig $args







>
>
>
>







104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
      if {[sqlite_orig -has-codec] && ![info exists ::do_not_use_codec]} {
        lappend args -key {xyzzy}
      }

      set res [uplevel 1 sqlite_orig $args]
      if {[info exists ::G(perm:presql)]} {
        [lindex $args 0] eval $::G(perm:presql)
      }
      if {[info exists ::G(perm:dbconfig)]} {
        set ::dbhandle [lindex $args 0]
        uplevel #0 $::G(perm:dbconfig)
      }
      set res
    } else {
      # This command is not opening a new database connection. Pass the 
      # arguments through to the C implemenation as the are.
      #
      uplevel 1 sqlite_orig $args