System.Data.SQLite
Check-in [ec423e6d9e]
Not logged in

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

Overview
Comment:Cleanup two tests that were leaking variables and/or objects.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: ec423e6d9e07c184bff66dcb5bcbce716cec50a9
User & Date: mistachkin 2011-11-23 02:40:54
Context
2011-11-23
07:12
Correct native platform checks in the interop project files and the test runner batch file. check-in: f42a1a5da8 user: mistachkin tags: trunk
02:40
Cleanup two tests that were leaking variables and/or objects. check-in: ec423e6d9e user: mistachkin tags: trunk
2011-11-16
05:13
Correct minor usage problem with the %_ECHO% 'macro' in the batch tools. check-in: bfd8d6874d user: mistachkin tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to Tests/tkt-2ce0870fad.eagle.

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

for {set i 1} {$i < 3} {incr i} {
  runTest {test [appendArgs tkt-2ce0870fad-1. $i] {logging setup} -setup \
      [getAppDomainPreamble {
    set i {$i}
    set appDomainId($i) {[object invoke AppDomain.CurrentDomain Id]}
    set fileName {[appendArgs tkt-2ce0870fad-1. $i .db]}








  }] -body {
    set appDomainId(3) [object invoke AppDomain.CurrentDomain Id]

    package require EagleLibrary
    package require EagleTest
    package require System.Data.SQLite.Test

    object load -loadtype File [file join [getBinaryDirectory] \
        System.Data.SQLite.dll]

    object invoke System.Data.SQLite.SQLiteLog Initialize

    list $appDomainId($i) $appDomainId(3) [expr {$i == 1 ? \
        $appDomainId($i) != $appDomainId(3) : \
        $appDomainId($i) == $appDomainId(3)}] [setupDb $fileName]
  } -cleanup {
    cleanupDb $fileName









    #
    # NOTE: If this is the primary application domain, skip unsetting the
    #       loop variable because the surrounding [for] command still needs
    #       it.
    #
    if {$i <= 1} then {
      unset -nocomplain i
    }

    unset -nocomplain appDomainId db fileName

  } -constraints {eagle monoBug28 command.sql compile.DATA\
compile.ISOLATED_INTERPRETERS SQLite System.Data.SQLite} -isolationLevel \
[expr {$i == 1 ? "AppDomain" : "Default"}] -match regexp -result \
{^\d+ \d+ True SQLiteConnection#\d+$}}
}

###############################################################################







>
>
>
>
>
>
>
>







|
|








>
>
>
>
>
>
>
>










|
>







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

for {set i 1} {$i < 3} {incr i} {
  runTest {test [appendArgs tkt-2ce0870fad-1. $i] {logging setup} -setup \
      [getAppDomainPreamble {
    set i {$i}
    set appDomainId($i) {[object invoke AppDomain.CurrentDomain Id]}
    set fileName {[appendArgs tkt-2ce0870fad-1. $i .db]}

    #
    # NOTE: Keep track of whether or not the global test year and configuration
    #       variables already exist in the primary application domain before the
    #       test.  If not, we will need to unset them after the test.
    #
    set hadTestYear {[info exists ::test_year]}
    set hadTestConfiguration {[info exists ::test_configuration]}
  }] -body {
    set appDomainId(3) [object invoke AppDomain.CurrentDomain Id]

    package require EagleLibrary
    package require EagleTest
    package require System.Data.SQLite.Test

    set assembly [object load -loadtype File [file join [getBinaryDirectory] \
        System.Data.SQLite.dll]]

    object invoke System.Data.SQLite.SQLiteLog Initialize

    list $appDomainId($i) $appDomainId(3) [expr {$i == 1 ? \
        $appDomainId($i) != $appDomainId(3) : \
        $appDomainId($i) == $appDomainId(3)}] [setupDb $fileName]
  } -cleanup {
    cleanupDb $fileName

    if {!$hadTestConfiguration} then {
      unset -nocomplain ::test_configuration
    }

    if {!$hadTestYear} then {
      unset -nocomplain ::test_year
    }

    #
    # NOTE: If this is the primary application domain, skip unsetting the
    #       loop variable because the surrounding [for] command still needs
    #       it.
    #
    if {$i <= 1} then {
      unset -nocomplain i
    }

    unset -nocomplain assembly appDomainId db fileName hadTestConfiguration \
        hadTestYear
  } -constraints {eagle monoBug28 command.sql compile.DATA\
compile.ISOLATED_INTERPRETERS SQLite System.Data.SQLite} -isolationLevel \
[expr {$i == 1 ? "AppDomain" : "Default"}] -match regexp -result \
{^\d+ \d+ True SQLiteConnection#\d+$}}
}

###############################################################################

Changes to Tests/tkt-e30b820248.eagle.

250
251
252
253
254
255
256
257

258
259
260
261
262
263
264
        [expr {$code eq "Ok" ? [catch {
          object invoke _Dynamic${id}.Test${id} Main
        } result] : [set result ""]}] $result \
        [reportSQLiteResources $test_channel true]
  } -cleanup {
    cleanupDb $fileName

    unset -nocomplain result code results errors sql dataSource id db fileName

  } -constraints {eagle logFile monoBug28 command.sql compile.DATA SQLite\
System.Data.SQLite} -match regexp -result [appendArgs "^Ok\
System#CodeDom#Compiler#CompilerResults#\\d+ \\{\\} 0 \\{\\} " $memory_used \$]}
}

###############################################################################








|
>







250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
        [expr {$code eq "Ok" ? [catch {
          object invoke _Dynamic${id}.Test${id} Main
        } result] : [set result ""]}] $result \
        [reportSQLiteResources $test_channel true]
  } -cleanup {
    cleanupDb $fileName

    unset -nocomplain result code results errors sql name dataSource id db \
        fileName
  } -constraints {eagle logFile monoBug28 command.sql compile.DATA SQLite\
System.Data.SQLite} -match regexp -result [appendArgs "^Ok\
System#CodeDom#Compiler#CompilerResults#\\d+ \\{\\} 0 \\{\\} " $memory_used \$]}
}

###############################################################################