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

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

Overview
Comment:Add more comments to the unit test infrastructure. Cleanup and modularize use of the test configuration.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: a9046f0f0285f3c571329e3be84d4819eb792e63
User & Date: mistachkin 2011-09-03 14:58:30
Context
2011-09-03
15:36
More comment updates to test suite. check-in: 5f2352effe user: mistachkin tags: trunk
14:58
Add more comments to the unit test infrastructure. Cleanup and modularize use of the test configuration. check-in: a9046f0f02 user: mistachkin tags: trunk
2011-09-02
17:57
Add comments to several test suite routines. Also, make sure to strip the directory information from file names provided to the setupDb and cleanupDb test helpers. check-in: a49d88c5aa user: mistachkin tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to Externals/Eagle/lib/Test1.0/prologue.eagle.

294
295
296
297
298
299
300

301
302
303
304
305
306
307
308
  tputs $test_channel [appendArgs "---- processId: " \
      [pid] \n]

  tputs $test_channel [appendArgs "---- test channel: " \
      $test_channel \n]

  tputs $test_channel [appendArgs "---- test configuration: " \

      $test_configuration \n]

  if {[isEagle]} then {
    tputs $test_channel [appendArgs "---- original command line: " \
        [info cmdline] \n]

    tputs $test_channel [appendArgs "---- threadId: " \
        [info tid] \n]







>
|







294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
  tputs $test_channel [appendArgs "---- processId: " \
      [pid] \n]

  tputs $test_channel [appendArgs "---- test channel: " \
      $test_channel \n]

  tputs $test_channel [appendArgs "---- test configuration: " \
      [expr {[info exists test_configuration] ? \
          $test_configuration : "<none>"}] \n]

  if {[isEagle]} then {
    tputs $test_channel [appendArgs "---- original command line: " \
        [info cmdline] \n]

    tputs $test_channel [appendArgs "---- threadId: " \
        [info tid] \n]

Changes to Tests/common.eagle.

10
11
12
13
14
15
16
17
18
19
20
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
if {[isEagle]} then {
  proc getBuildYear {} {
    #
    # NOTE: See if the "year" setting has been overridden by the user (e.g. on
    #       the command line).  This controls which binaries we are testing,
    #       those produced by either the Visual Studio 2008 or Visual Studio
    #       2010 build systems.  To override this value via the command line,
    #       enter a command similar to the following (all on one line):
    #
    #       EagleShell.exe -preInitialize "set test_year 2008"
    #         -file .\path\to\all.eagle
    #






    if {[info exists ::test_year] && [string length $::test_year] > 0} then {





      return $::test_year
    } else {






      return [expr {[haveConstraint imageRuntime40] ? "2010" : "2008"}]
    }
  }
 



































  proc getBuildDirectory {} {
    #
    # NOTE: See if the "native" runtime option has been added.  If so, use the
    #       directory for the mixed-mode assembly.  To enable this option via
    #       the command line, enter a command similar to the following (all on
    #       one line):


    #
    #       EagleShell.exe -initialize -runtimeOption native
    #         -file .\path\to\all.eagle
    #
    #       To enable this option via the command line prior to the "beta 16"
    #       release of Eagle, the following command must be used instead (also
    #       all on one line):
................................................................................
    #
    #       EagleShell.exe -initialize -postInitialize
    #         "object invoke Interpreter.GetActive AddRuntimeOption native"
    #         -file .\path\to\all.eagle
    #
    if {[hasRuntimeOption native]} then {
      return [file join [file dirname $::path] bin [getBuildYear] \
          [machineToPlatform $::tcl_platform(machine)] $::test_configuration]
    } else {
      return [file join [file dirname $::path] bin [getBuildYear] \
          $::test_configuration bin]
    }
  }
 
  proc getBuildFileName { fileName } {
    return [file nativename \
        [file join [getBuildDirectory] [file tail $fileName]]]
  }







|




>
>
>
>
>
>

>
>
>
>
>


>
>
>
>
>
>




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



|
<
<
>
>







 







|


|







10
11
12
13
14
15
16
17
18
19
20
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
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
92
93
..
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
if {[isEagle]} then {
  proc getBuildYear {} {
    #
    # NOTE: See if the "year" setting has been overridden by the user (e.g. on
    #       the command line).  This controls which binaries we are testing,
    #       those produced by either the Visual Studio 2008 or Visual Studio
    #       2010 build systems.  To override this value via the command line,
    #       enter a command similar to one of the following (all on one line):
    #
    #       EagleShell.exe -preInitialize "set test_year 2008"
    #         -file .\path\to\all.eagle
    #
    #       EagleShell.exe -preInitialize "set test_year 2010"
    #         -file .\path\to\all.eagle
    #
    #       EagleShell.exe -preInitialize "unset -nocomplain test_year"
    #         -file .\path\to\all.eagle
    #
    if {[info exists ::test_year] && [string length $::test_year] > 0} then {
      #
      # NOTE: Use the specified test year.  If this variable is not set, the
      #       default value will be based on whether or not Eagle has been
      #       compiled against the .NET Framework 2.0 or 4.0.
      #
      return $::test_year
    } else {
      #
      # NOTE: If Eagle has been compiled against the .NET Framework 4.0, use
      #       "2010" as the test year; otherwise, use "2008".  If another major
      #       [incompatible] version of the .NET Framework is released, this
      #       check will have to be changed.
      #
      return [expr {[haveConstraint imageRuntime40] ? "2010" : "2008"}]
    }
  }
 
  proc getBuildConfiguration {} {
    #
    # NOTE: See if the "configuration" setting has been overridden by the user
    #       (e.g. on the command line).  This controls which binaries we are
    #       testing, those produced with the Debug or Release build types.  To
    #       override this value via the command line, enter a command similar
    #       to one of the following (all on one line):
    #
    #       EagleShell.exe -preInitialize "set test_configuration Debug"
    #         -file .\path\to\all.eagle
    #
    #       EagleShell.exe -preInitialize "set test_configuration Release"
    #         -file .\path\to\all.eagle
    #
    #       EagleShell.exe -file .\path\to\all.eagle -preTest
    #         "unset -nocomplain test_configuration"
    #
    if {[info exists ::test_configuration] && \
        [string length $::test_configuration] > 0} then {
      #
      # NOTE: Use the specified test configuration.  The default value used
      #       for this variable is "Release", as set by the test suite itself.
      #
      return $::test_configuration
    } else {
      #
      # NOTE: Normally, we will never hit this case because the value of the
      #       test configuration variable is always set by the test suite
      #       itself; however, it can be overridden using the unset command
      #       from the -preTest option to the test suite.
      #
      return $::eagle_platform(configuration)
    }
  }
 
  proc getBuildDirectory {} {
    #
    # NOTE: See if the "native" runtime option has been added.  If so, use the
    #       directory for the mixed-mode assembly (a.k.a. the native interop


    #       assembly).  To enable this option via the command line, enter a
    #       command similar to one of the following (all on one line):
    #
    #       EagleShell.exe -initialize -runtimeOption native
    #         -file .\path\to\all.eagle
    #
    #       To enable this option via the command line prior to the "beta 16"
    #       release of Eagle, the following command must be used instead (also
    #       all on one line):
................................................................................
    #
    #       EagleShell.exe -initialize -postInitialize
    #         "object invoke Interpreter.GetActive AddRuntimeOption native"
    #         -file .\path\to\all.eagle
    #
    if {[hasRuntimeOption native]} then {
      return [file join [file dirname $::path] bin [getBuildYear] \
          [machineToPlatform $::tcl_platform(machine)] [getBuildConfiguration]]
    } else {
      return [file join [file dirname $::path] bin [getBuildYear] \
          [getBuildConfiguration] bin]
    }
  }
 
  proc getBuildFileName { fileName } {
    return [file nativename \
        [file join [getBuildDirectory] [file tail $fileName]]]
  }

Changes to Tests/tkt-b4a7ddc83f.eagle.

23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
for {set i 1} {$i < 3} {incr i} {
  runTest {test tkt-b4a7ddc83f-1.$i {logging shutdown} -setup [subst {
    set appDomainId(1) [object invoke AppDomain.CurrentDomain Id]
    set fileName tkt-b4a7ddc83f-1.$i.db

    set ::path {$::path}
    set ::test_year [getBuildYear]
    set ::test_configuration {$::test_configuration}
  }] -body {
    set appDomainId(2) [object invoke AppDomain.CurrentDomain Id]

    package require EagleLibrary
    package require EagleTest

    source [file join $path common.eagle]







|







23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
for {set i 1} {$i < 3} {incr i} {
  runTest {test tkt-b4a7ddc83f-1.$i {logging shutdown} -setup [subst {
    set appDomainId(1) [object invoke AppDomain.CurrentDomain Id]
    set fileName tkt-b4a7ddc83f-1.$i.db

    set ::path {$::path}
    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]