/ Check-in [f7480e33]
Login

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

Overview
Comment:Fix the backcompat.test script so that it works with the --testdir test option.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: f7480e33eb82f2eae219d17ce46cd2d4edac07d2
User & Date: dan 2016-03-14 15:43:03
Context
2016-03-14
21:12
Update test scripts so that they work with SEE. check-in: f4693ba4 user: drh tags: trunk
18:42
Merge test script fixes from trunk. check-in: ea1d2cdd user: drh tags: see-testing
15:43
Fix the backcompat.test script so that it works with the --testdir test option. check-in: f7480e33 user: dan tags: trunk
15:03
Run TCL tests in the "testdir" subdirectory. check-in: 90e0cc7b user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/backcompat.test.

    81     81   array set ::incompatible [list]
    82     82   proc do_allbackcompat_test {script} {
    83     83   
    84     84     foreach bin $::BC(binaries) {
    85     85       set nErr [set_test_counter errors]
    86     86       foreach dir {0 1} {
    87     87   
    88         -      set bintag [string map {testfixture {}} $bin]
           88  +      set bintag $bin
           89  +      regsub {.*testfixture\.} $bintag {} bintag
    89     90         set bintag [string map {\.exe {}} $bintag]
    90     91         if {$bintag == ""} {set bintag self}
    91     92         set ::bcname ".$bintag.$dir."
    92     93   
    93     94         rename do_test _do_test
    94     95         proc do_test {nm sql res} {
    95     96           set nm [regsub {\.} $nm $::bcname]

Changes to test/bc_common.tcl.

     3      3   
     4      4   proc bc_find_binaries {zCaption} {
     5      5     # Search for binaries to test against. Any executable files that match
     6      6     # our naming convention are assumed to be testfixture binaries to test
     7      7     # against.
     8      8     #
     9      9     set binaries [list]
    10         -  set self [file tail [info nameofexec]]
           10  +  set self [info nameofexec]
    11     11     set pattern "$self?*"
    12     12     if {$::tcl_platform(platform)=="windows"} {
    13     13       set pattern [string map {\.exe {}} $pattern]
    14     14     }
    15     15     foreach file [glob -nocomplain $pattern] {
    16     16       if {$file==$self} continue
    17     17       if {[file executable $file] && [file isfile $file]} {lappend binaries $file}
................................................................................
    48     48     proc code2 {tcl} { testfixture $::bc_chan $tcl }
    49     49     proc sql1 sql { code1 [list db eval $sql] }
    50     50     proc sql2 sql { code2 [list db eval $sql] }
    51     51   
    52     52     code1 { sqlite3 db test.db }
    53     53     code2 { sqlite3 db test.db }
    54     54   
    55         -  set bintag [string map {testfixture {}} $bin]
           55  +  set bintag $bin
           56  +  regsub {.*testfixture\.} $bintag {} bintag
    56     57     set bintag [string map {\.exe {}} $bintag]
    57     58     if {$bintag == ""} {set bintag self}
    58     59     set saved_prefix $::testprefix
    59     60     append ::testprefix ".$bintag"
    60     61   
    61     62     uplevel $script
    62     63