/ Check-in [c1c9f6fa]
Login

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

Overview
Comment:Fix a problem introduced into lock2.test by the previous commit.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c1c9f6fa9d75df740e577dbc5e6a24b91ad2bdd0
User & Date: dan 2010-06-15 18:00:06
Context
2010-06-15
19:07
Rationalize a common pattern in tcl test cases into proc do_multiclient_test. check-in: efe44564 user: dan tags: trunk
18:00
Fix a problem introduced into lock2.test by the previous commit. check-in: c1c9f6fa user: dan tags: trunk
17:44
Add test file pager1.test, containing tests of inter-process locking in non-wal mode. check-in: 6e43eed9 user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/lock2.test.

    55     55         BEGIN;
    56     56         SELECT * FROM sqlite_master;
    57     57       }
    58     58     }
    59     59   } {}
    60     60   do_test lock2-1.4 {
    61     61     testfixture $::tf1 {
    62         -    db eval {
    63         -      CREATE TABLE def(d, e, f)
    64         -    }
           62  +    catch { db eval { CREATE TABLE def(d, e, f) } } msg
           63  +    set msg
    65     64     }
    66     65   } {database is locked}
    67     66   do_test lock2-1.5 {
    68     67     catchsql {
    69     68       COMMIT;
    70     69     }
    71     70   } {1 {database is locked}}
................................................................................
    75     74         SELECT * FROM sqlite_master;
    76     75         COMMIT;
    77     76       }
    78     77     }
    79     78   } {}
    80     79   do_test lock2-1.7 {
    81     80     testfixture $::tf1 {
    82         -    db eval {
           81  +    catch { db eval {
    83     82         BEGIN;
    84     83         SELECT * FROM sqlite_master;
    85         -    }
           84  +    } } msg 
           85  +    set msg
    86     86     }
    87     87   } {database is locked}
    88     88   do_test lock2-1.8 {
    89     89     catchsql {
    90     90       COMMIT;
    91     91     }
    92     92   } {0 {}}

Changes to test/permutations.test.

    20     20   # where available options are:  
    21     21   #
    22     22   #       -description TITLE                  (default "")
    23     23   #       -initialize  SCRIPT                 (default "")
    24     24   #       -shutdown    SCRIPT                 (default "")
    25     25   #       -presql      SQL                    (default "")
    26     26   #       -files       LIST-OF-FILES          (default $::ALLTESTS)
    27         -#
           27  +#       -prefix      NAME                   (default "$::NAME.")
    28     28   #
    29     29   proc test_suite {name args} {
    30     30   
    31     31     set default(-shutdown)    ""
    32     32     set default(-initialize)  ""
    33     33     set default(-presql)      ""
    34     34     set default(-description) "no description supplied (fixme)"
    35         -  set default(-files)     ""
           35  +  set default(-files)       ""
           36  +  set default(-prefix)      "${name}."
    36     37   
    37     38     array set options [array get default]
    38     39     if {[llength $args]%2} {
    39     40       error "uneven number of options/switches passed to test_suite"
    40     41     }
    41     42     foreach {k v} $args {
    42     43       set o [array names options ${k}*]
................................................................................
    75     76   }
    76     77   
    77     78   #-------------------------------------------------------------------------
    78     79   # Set up the following global list variables containing the names of 
    79     80   # various test scripts:
    80     81   #
    81     82   #   $alltests
    82         -#   $slowtests
           83  +#   $allquicktests
    83     84   #
    84         -
    85     85   set alltests [list]
    86     86   foreach f [glob $testdir/*.test] { lappend alltests [file tail $f] }
    87     87   if {$::tcl_platform(platform)!="unix"} {
    88     88     set alltests [test_set $alltests -exclude crash.test crash2.test]
    89     89   }
    90     90   set alltests [test_set $alltests -exclude {
    91     91     all.test        async.test         quick.test  veryquick.test
................................................................................
   118    118   #   veryquick
   119    119   #   quick
   120    120   #   full
   121    121   #   veryquick_plus_notify2
   122    122   #
   123    123   lappend ::testsuitelist xxx
   124    124   
   125         -test_suite "veryquick" -description {
          125  +test_suite "veryquick" -prefix "" -description {
   126    126     "Very" quick test suite. Runs in less than 5 minutes on a workstation. 
   127    127     This test suite is the same as the "quick" tests, except that some files
   128    128     that test malloc and IO errors are omitted.
   129    129   } -files [
   130    130     test_set $allquicktests -exclude *malloc* *ioerr* *fault*
   131    131   ]
   132    132   
   133         -test_suite "quick" -description {
          133  +test_suite "quick" -prefix "" -description {
   134    134     Quick test suite. Runs in around 10 minutes on a workstation.
   135    135   } -files [
   136    136     test_set $allquicktests
   137    137   ]
   138    138   
   139         -test_suite "veryquick_plus_notify2" -description {
          139  +test_suite "veryquick_plus_notify2" -prefix "" -description {
   140    140     Very quick test suite + file notify2.test. This is used by one of the 
   141    141     sqlite.org release test configurations.
   142    142   } -files [ 
   143    143     test_set $allquicktests notify2.test -exclude *malloc* *ioerr* *fault*
   144    144   ]
   145    145   
   146         -test_suite "full" -description {
          146  +test_suite "full" -prefix "" -description {
   147    147     Full test suite. Takes a long time.
   148    148   } -files [ 
   149    149     test_set $alltests 
   150    150   ] -initialize {
   151    151     unset -nocomplain ::G(isquick)
   152    152   }
   153    153   
................................................................................
   773    773   # End of tests
   774    774   #############################################################################
   775    775   
   776    776   # run_tests NAME OPTIONS
   777    777   #
   778    778   # where available options are:  
   779    779   #
   780         -#       -description TITLE                  (default "")
   781         -#       -initialize  SCRIPT                 (default "")
   782         -#       -shutdown    SCRIPT                 (default "")
   783         -#       -presql      SQL                    (default "")
   784         -#       -files       LIST-OF-FILES          (default "")
          780  +#       -description TITLE
          781  +#       -initialize  SCRIPT
          782  +#       -shutdown    SCRIPT
          783  +#       -presql      SQL
          784  +#       -files       LIST-OF-FILES
          785  +#       -prefix      NAME
   785    786   #
   786    787   proc run_tests {name args} {
   787    788     array set options $args
   788    789   
   789         -  set ::G(perm:name)         $name
          790  +  set ::G(perm:name)         $options(-prefix)
   790    791     set ::G(perm:presql)       $options(-presql)
   791    792     set ::G(isquick)           1
   792    793   
   793    794     uplevel $options(-initialize)
   794    795   
   795    796     foreach file [lsort $options(-files)] {
   796    797       slave_test_file $::testdir/$file

Changes to test/tester.tcl.

   295    295           break
   296    296         }
   297    297       }
   298    298     }
   299    299     if {!$go} return
   300    300   
   301    301     if {[info exists ::G(perm:name)]} {
   302         -    set name "$::G(perm:name).$name"
          302  +    set name "$::G(perm:name)$name"
   303    303     }
   304    304   
   305    305     incr_ntest
   306    306     puts -nonewline $name...
   307    307     flush stdout
   308    308     if {[catch {uplevel #0 "$cmd;\n"} result]} {
   309    309       puts "\nError: $result"