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

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

Overview
Comment:Replace most uses of the unit test infrastructure procedure 'getBuildFileName' with 'getBinaryFileName' because we almost always want to load assemblies from the application directory, not the build directory.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: eac43ed4b44645328cd6144ce59f2992b388548e
User & Date: mistachkin 2011-09-29 05:53:04
Context
2011-09-29
06:20
Missed one instance of common.eagle being loaded manually. check-in: e206579218 user: mistachkin tags: trunk
05:53
Replace most uses of the unit test infrastructure procedure 'getBuildFileName' with 'getBinaryFileName' because we almost always want to load assemblies from the application directory, not the build directory. check-in: eac43ed4b4 user: mistachkin tags: trunk
04:43
Allow the various binary file delete/copy/load operations to be skipped during the test prologue (for the System.Data.SQLite related binaries). check-in: d2e601c947 user: mistachkin tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to Tests/common.eagle.

200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
...
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263

      if {$pdb} then {
        tryDeleteBinaryFile [appendArgs [file rootname $fileName] .pdb]
      }
    }
 
    proc tryLoadAssembly { fileName } {
      set fileName [getBuildFileName $fileName]

      if {[catch {set assembly \
          [object load -loadtype File $fileName]}] == 0} then {
        #
        # NOTE: Now, add the necessary test constraint.
        #
        addConstraint [file rootname [file tail $fileName]]
................................................................................
          ReferencedAssemblies.Add System.dll ReferencedAssemblies.Add \
          System.Data.dll ReferencedAssemblies.Add System.Xml.dll]

      #
      # NOTE: Add all the provided file names as assembly references.
      #
      foreach fileName $fileNames {
        lappend command ReferencedAssemblies.Add [getBuildFileName $fileName]
      }

      #
      # NOTE: Add the extra arguments, if any, to the command to evaluate.
      #
      eval lappend command $args








|







 







|







200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
...
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263

      if {$pdb} then {
        tryDeleteBinaryFile [appendArgs [file rootname $fileName] .pdb]
      }
    }
 
    proc tryLoadAssembly { fileName } {
      set fileName [getBinaryFileName $fileName]

      if {[catch {set assembly \
          [object load -loadtype File $fileName]}] == 0} then {
        #
        # NOTE: Now, add the necessary test constraint.
        #
        addConstraint [file rootname [file tail $fileName]]
................................................................................
          ReferencedAssemblies.Add System.dll ReferencedAssemblies.Add \
          System.Data.dll ReferencedAssemblies.Add System.Xml.dll]

      #
      # NOTE: Add all the provided file names as assembly references.
      #
      foreach fileName $fileNames {
        lappend command ReferencedAssemblies.Add [getBinaryFileName $fileName]
      }

      #
      # NOTE: Add the extra arguments, if any, to the command to evaluate.
      #
      eval lappend command $args

Changes to Tests/tkt-b4a7ddc83f.eagle.

33
34
35
36
37
38
39

40
41


42
43
44
45
46
47
48
49
50
    set ::test_year {[getBuildYear]}
    set ::test_configuration {[getBuildConfiguration]}
  }] -body {
    set appDomainId(2) [object invoke AppDomain.CurrentDomain Id]

    package require EagleLibrary
    package require EagleTest


    source [file join $path common.eagle]



    object load -loadtype File [getBuildFileName System.Data.SQLite.dll]
    object invoke System.Data.SQLite.SQLiteLog Initialize

    list $appDomainId(1) $appDomainId(2) \
        [expr {$appDomainId(1) != $appDomainId(2)}] [setupDb $fileName]
  } -cleanup {
    cleanupDb $fileName
    unset -nocomplain appDomainId db fileName







>

<
>
>

<







33
34
35
36
37
38
39
40
41

42
43
44

45
46
47
48
49
50
51
    set ::test_year {[getBuildYear]}
    set ::test_configuration {[getBuildConfiguration]}
  }] -body {
    set appDomainId(2) [object invoke AppDomain.CurrentDomain Id]

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


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


    object invoke System.Data.SQLite.SQLiteLog Initialize

    list $appDomainId(1) $appDomainId(2) \
        [expr {$appDomainId(1) != $appDomainId(2)}] [setupDb $fileName]
  } -cleanup {
    cleanupDb $fileName
    unset -nocomplain appDomainId db fileName