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

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

Overview
Comment:Update Eagle in Externals to the latest pre-beta 22 build.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: d05c18627d70a97040c815f4eafec1535f3f5662
User & Date: mistachkin 2012-03-12 03:11:03
Context
2012-03-12
06:54
Update several comments in the common unit test infrastructure. Slightly simplify the test for ticket [72905c9a77] and improve its comments. check-in: 916251d054 user: mistachkin tags: trunk
03:11
Update Eagle in Externals to the latest pre-beta 22 build. check-in: d05c18627d user: mistachkin tags: trunk
2012-03-11
07:20
Document more recent changes in the version history. check-in: 3a5eb8e472 user: mistachkin tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to Externals/Eagle/bin/Eagle.dll.

cannot compute difference between binary files

Changes to Externals/Eagle/bin/EagleShell.exe.

cannot compute difference between binary files

Changes to Externals/Eagle/lib/Eagle1.0/init.eagle.

1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
                    " is available as of " $dateTime] [list $baseUri \
                    $patchLevel] [list $notes]]
              } elseif {$compare < 0} then {
                #
                # NOTE: The patch level from the line is less, we are more
                #       up-to-date than the latest version?
                #
                return [list [appendArgs "your build " $enginePatchLevel \
                    " is newer than the latest build " $patchLevel]]
              } else {
                #
                # NOTE: The patch levels are equal, we are up-to-date.
                #
                return [list "you have the latest build"]
              }
            }
          }
        }
      }

      return [list "cannot determine if your build is the latest"]
    }
 
    proc getReturnType { object member } {
      if {[string length $object] == 0 || [string length $member] == 0} then {
        return ""
      }








|





|






|







1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
                    " is available as of " $dateTime] [list $baseUri \
                    $patchLevel] [list $notes]]
              } elseif {$compare < 0} then {
                #
                # NOTE: The patch level from the line is less, we are more
                #       up-to-date than the latest version?
                #
                return [list [appendArgs "running build " $enginePatchLevel \
                    " is newer than the latest build " $patchLevel]]
              } else {
                #
                # NOTE: The patch levels are equal, we are up-to-date.
                #
                return [list "running build is the latest"]
              }
            }
          }
        }
      }

      return [list "cannot determine if running build is the latest"]
    }
 
    proc getReturnType { object member } {
      if {[string length $object] == 0 || [string length $member] == 0} then {
        return ""
      }

Changes to Externals/Eagle/lib/Eagle1.0/test.eagle.

54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
...
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
...
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
....
1222
1223
1224
1225
1226
1227
1228
























1229
1230
1231
1232
1233
1234
1235
....
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
....
1653
1654
1655
1656
1657
1658
1659









1660
1661
1662
1663
1664
1665
1666




















1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678









1679
1680
1681
1682
1683
1684
1685
....
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
 
  proc getSoftwareRegistryKey { wow64 } {
    if {$wow64 && [info exists ::tcl_platform(machine)] && \
        $::tcl_platform(machine) eq "amd64"} then {
      #
      # NOTE: Return the WoW64 registry key name because we are running on a
      #       64-bit operating system and the caller specifically requested
      #       the Win32 registry key name.
      #
      return Software\\Wow6432Node
    } else {
      #
      # NOTE: Return the native registry key name because we are either not
      #       running on a 64-bit operating system or the caller wants the
      #       native registry key name (i.e. not the WoW64 registry key name).
................................................................................
      set value [getEnvironmentVariable $name]

      if {[string length $value] > 0} then {
        return [file normalize $value]
      }
    }

    if {[isEagle]} then {
      #
      # NOTE: Eagle fallback, use whatever is reported by the
      #       underlying framework and/or operating system.
      #
      return [file normalize [object invoke System.IO.Path GetTempPath]]
    } else {
      #
................................................................................
      }
    }

    return $result
  }
 
  proc formatDecimal { value {places 4} } {
    if {[isEagle]} then {
      #
      # HACK: This works; however, in order to do this kind of thing cleanly,
      #       we really need the Tcl [format] command.
      #
      set result [object invoke String Format [appendArgs "{0:0." \
          [string repeat # $places] "}"] [set object [object invoke \
          -create Double Parse $value]]]
................................................................................
          lappend command [appendArgs ::tcltest:: $import]
        }

        namespace eval :: $command
      }
    }
  }
























 
  if {[isEagle]} then {
    ###########################################################################
    ############################ BEGIN Eagle ONLY #############################
    ###########################################################################

    proc initializeTests {} {
................................................................................
 
    proc getTkVersion {} {
      return [testExecTclScript {
        puts -nonewline stdout [package require Tk]; exit
      }]
    }
 
    proc machineToPlatform { machine } {
      switch -exact -nocase -- $machine {
        amd64 {
          return x64
        }
        intel {
          if {$::tcl_platform(platform) eq "windows"} then {
            return Win32
          } else {
            return x86
          }
        }
        default {
          return unknown
        }
      }
    }
 
    proc getGarudaDll {} {
      #
      # NOTE: Get the Garuda DLL of the same platform (i.e. machine type)
      #       as the native Tcl shell.
      #
      if {[info exists ::base_path]} then {
        #
................................................................................
      # NOTE: Try the source release directory structure.
      #
      set ::test_path [file join [file normalize [file dirname \
          [file dirname [info library]]]] Library Tests]

      if {![file exists $::test_path] || \
          ![file isdirectory $::test_path]} then {









        #
        # NOTE: Try for the test package directory.
        #
        set ::test_path [file join [file normalize [file dirname \
            [file dirname [info script]]]] [appendArgs Test \
            [info engine Version]]]
      }





















      if {![file exists $::test_path] || \
          ![file isdirectory $::test_path]} then {
        #
        # NOTE: This must be a binary release, no "Library" directory then.
        #       Also, binary releases have an upper-case "Tests" directory
        #       name that originates from the "update.bat" tool.  This must
        #       match the casing used in "update.bat".
        #
        set ::test_path [file join [file normalize [file dirname \
            [file dirname [info library]]]] Tests]
      }









    }

    #
    # NOTE: Fake having the tcltest package unless we are prevented.
    #
    if {![info exists ::no(configureTcltest)]} then {
      configureTcltest [list] false
................................................................................
    exportAndImportPackageCommands [namespace current] [list addConstraint \
        calculateRelativePerformance haveConstraint haveOrAddConstraint \
        processTestArguments getTemporaryPath getTestLog getTestLogId getFiles \
        getConstraints getTestFiles getTestRunId execTestShell runTestPrologue \
        runTestEpilogue runTest runAllTests fixConstraints sourceIfValid \
        isExitOnComplete getPassPercentage getSkipPercentage testExec tlog \
        returnInfoScript tputs formatDecimal formatList configureTcltest \
        tsource testShim] false false

    ###########################################################################
    ############################## END Tcl ONLY ###############################
    ###########################################################################
  }

  #
  # NOTE: Provide the Eagle test package to the interpreter.
  #
  package provide EagleTest \
    [expr {[isEagle] ? [info engine PatchLevel] : "1.0"}]
}
 







|







 







|







 







|







 







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







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







>
>
>
>
>
>
>
>
>







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












>
>
>
>
>
>
>
>
>







 







|













54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
...
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
...
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
....
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
....
1562
1563
1564
1565
1566
1567
1568


















1569
1570
1571
1572
1573
1574
1575
....
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
....
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
 
  proc getSoftwareRegistryKey { wow64 } {
    if {$wow64 && [info exists ::tcl_platform(machine)] && \
        $::tcl_platform(machine) eq "amd64"} then {
      #
      # NOTE: Return the WoW64 registry key name because we are running on a
      #       64-bit operating system and the caller specifically requested
      #       the WoW64 registry key name.
      #
      return Software\\Wow6432Node
    } else {
      #
      # NOTE: Return the native registry key name because we are either not
      #       running on a 64-bit operating system or the caller wants the
      #       native registry key name (i.e. not the WoW64 registry key name).
................................................................................
      set value [getEnvironmentVariable $name]

      if {[string length $value] > 0} then {
        return [file normalize $value]
      }
    }

    if {[isEagle] && [llength [info commands object]] > 0} then {
      #
      # NOTE: Eagle fallback, use whatever is reported by the
      #       underlying framework and/or operating system.
      #
      return [file normalize [object invoke System.IO.Path GetTempPath]]
    } else {
      #
................................................................................
      }
    }

    return $result
  }
 
  proc formatDecimal { value {places 4} } {
    if {[isEagle] && [llength [info commands object]] > 0} then {
      #
      # HACK: This works; however, in order to do this kind of thing cleanly,
      #       we really need the Tcl [format] command.
      #
      set result [object invoke String Format [appendArgs "{0:0." \
          [string repeat # $places] "}"] [set object [object invoke \
          -create Double Parse $value]]]
................................................................................
          lappend command [appendArgs ::tcltest:: $import]
        }

        namespace eval :: $command
      }
    }
  }
 
  proc machineToPlatform { machine {architecture false} } {
    #
    # NOTE: Cannot use "-nocase" option here because Tcl 8.4 does not
    #       support it (i.e. because it is pre-TIP #241).
    #
    switch -exact -- [string tolower $machine] {
      amd64 {
        return x64
      }
      intel {
        if {!$architecture && \
            [info exists ::tcl_platform(platform)] && \
            $::tcl_platform(platform) eq "windows"} then {
          return Win32
        } else {
          return x86
        }
      }
      default {
        return unknown
      }
    }
  }
 
  if {[isEagle]} then {
    ###########################################################################
    ############################ BEGIN Eagle ONLY #############################
    ###########################################################################

    proc initializeTests {} {
................................................................................
 
    proc getTkVersion {} {
      return [testExecTclScript {
        puts -nonewline stdout [package require Tk]; exit
      }]
    }
 


















    proc getGarudaDll {} {
      #
      # NOTE: Get the Garuda DLL of the same platform (i.e. machine type)
      #       as the native Tcl shell.
      #
      if {[info exists ::base_path]} then {
        #
................................................................................
      # NOTE: Try the source release directory structure.
      #
      set ::test_path [file join [file normalize [file dirname \
          [file dirname [info library]]]] Library Tests]

      if {![file exists $::test_path] || \
          ![file isdirectory $::test_path]} then {
        #
        # NOTE: Try the source release directory structure again; this time,
        #       assume only the embedded script library was used.
        #
        set ::test_path [file join [info base] Library Tests]
      }

      if {![file exists $::test_path] || \
          ![file isdirectory $::test_path]} then {
        #
        # NOTE: Try for the test package directory.
        #
        set ::test_path [file join [file normalize [file dirname \
            [file dirname [info script]]]] [appendArgs Test \
            [info engine Version]]]
      }

      if {![file exists $::test_path] || \
          ![file isdirectory $::test_path]} then {
        #
        # NOTE: Try for the test package directory again; this time, use the
        #       base path and assume the source release directory structure.
        #
        set ::test_path [file join [info base] lib [appendArgs Test \
            [info engine Version]]]
      }

      if {![file exists $::test_path] || \
          ![file isdirectory $::test_path]} then {
        #
        # NOTE: Try for the test package directory again; this time, use the
        #       base path.
        #
        set ::test_path [file join [info base] [appendArgs Test \
            [info engine Version]]]
      }

      if {![file exists $::test_path] || \
          ![file isdirectory $::test_path]} then {
        #
        # NOTE: This must be a binary release, no "Library" directory then.
        #       Also, binary releases have an upper-case "Tests" directory
        #       name that originates from the "update.bat" tool.  This must
        #       match the casing used in "update.bat".
        #
        set ::test_path [file join [file normalize [file dirname \
            [file dirname [info library]]]] Tests]
      }

      if {![file exists $::test_path] || \
          ![file isdirectory $::test_path]} then {
        #
        # NOTE: Fallback to using the base directory and checking for a
        #       "Tests" directory beneath it.
        #
        set ::test_path [file join [info base] Tests]
      }
    }

    #
    # NOTE: Fake having the tcltest package unless we are prevented.
    #
    if {![info exists ::no(configureTcltest)]} then {
      configureTcltest [list] false
................................................................................
    exportAndImportPackageCommands [namespace current] [list addConstraint \
        calculateRelativePerformance haveConstraint haveOrAddConstraint \
        processTestArguments getTemporaryPath getTestLog getTestLogId getFiles \
        getConstraints getTestFiles getTestRunId execTestShell runTestPrologue \
        runTestEpilogue runTest runAllTests fixConstraints sourceIfValid \
        isExitOnComplete getPassPercentage getSkipPercentage testExec tlog \
        returnInfoScript tputs formatDecimal formatList configureTcltest \
        machineToPlatform tsource testShim] false false

    ###########################################################################
    ############################## END Tcl ONLY ###############################
    ###########################################################################
  }

  #
  # NOTE: Provide the Eagle test package to the interpreter.
  #
  package provide EagleTest \
    [expr {[isEagle] ? [info engine PatchLevel] : "1.0"}]
}
 

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

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
...
381
382
383
384
385
386
387

388
389
390
391
392
393
394
395
...
408
409
410
411
412
413
414

415
416
417
418
419
420
421
422
...
770
771
772
773
774
775
776
777
778

779
780
781
782
783
784
785
786
...
788
789
790
791
792
793
794
795
796

797
798
799
800
801
802
803
804
...
833
834
835
836
837
838
839
840
841

842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
....
1004
1005
1006
1007
1008
1009
1010







1011
1012
1013
1014
1015
1016
1017
....
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
....
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
....
1145
1146
1147
1148
1149
1150
1151
1152

1153
1154
1155
1156
1157
1158
1159
....
1202
1203
1204
1205
1206
1207
1208

1209
1210
1211
1212
1213
1214
1215
1216
....
1229
1230
1231
1232
1233
1234
1235

1236
1237
1238
1239
1240
1241
1242
1243
....
1343
1344
1345
1346
1347
1348
1349

1350
1351
1352
1353
1354
1355
1356
1357
....
1497
1498
1499
1500
1501
1502
1503

1504
1505
1506
1507
1508
1509
1510
1511
....
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
....
1676
1677
1678
1679
1680
1681
1682

1683
1684
1685
1686
1687
1688
1689
1690
....
1697
1698
1699
1700
1701
1702
1703

1704
1705
1706
1707
1708
1709
1710
1711
1712
1713

1714
1715
1716
1717
1718
1719
1720
1721
....
1744
1745
1746
1747
1748
1749
1750
1751

1752
1753
1754
1755
1756
1757
1758
....
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
#       support namespaces ourselves, we do not want to pollute the global
#       namespace if this script actually ends up being evaluated in Tcl.
#
namespace eval ::Eagle {
  proc checkForPlatform { channel } {
    tputs $channel "---- checking for platform... "


    addConstraint $::tcl_platform(platform)








    if {![isEagle]} then {
      #
      # BUGFIX: We do not want to skip any Mono bugs in Tcl.
      #         Also, fake the culture.
      #
      set constraints [list monoToDo monoBug monoCrash culture.en_US]

      #
      # NOTE: Add the necessary constraints for each version
      #       of Mono we know about.
      #
      foreach version [list 20 22 24 26 28 210 30] {
        addConstraint [appendArgs monoToDo $version]
        addConstraint [appendArgs monoBug $version]
        addConstraint [appendArgs monoCrash $version]
      }

      foreach constraint $constraints {
        addConstraint $constraint; # running in Tcl.
      }
    }






    tputs $channel [appendArgs $::tcl_platform(platform) \n]


























  }
 
  proc checkForEagle { channel } {
    tputs $channel "---- checking for Eagle... "

    if {[isEagle]} then {
      #
................................................................................
      # NOTE: We are done here, return now.
      #
      return
    } else {
      #
      # NOTE: Use the appropriate environment variable for the platform.
      #

      if {$::tcl_platform(platform) eq "windows"} then {
        set pathName PATH
      } else {
        #
        # HACK: For shared libraries, use the LD_LIBRARY_PATH.
        #
        if {[file extension $name] eq [info sharedlibextension]} then {
          set pathName LD_LIBRARY_PATH
................................................................................
        set path $::env($pathName)

        #
        # NOTE: Use the appropriate path separator for the platform.
        #
        if {[info exists ::tcl_platform(pathSeparator)]} then {
          set separator $::tcl_platform(pathSeparator)

        } elseif {$::tcl_platform(platform) eq "windows"} then {
          set separator \;
        } else {
          set separator :
        }

        #
        # NOTE: Grab just the file name from the possibly fully qualified file
................................................................................
        tputs $channel untrusted\n
      }
    }
 
    proc checkForStrongName { channel } {
      tputs $channel "---- checking for strong name... "

      set strongName [object invoke Interpreter.GetActive GetStrongName]


      if {[string length $strongName] > 0} then {
        #
        # NOTE: Yes, it appears that the core library was signed with a
        #       strong name key.
        #
        addConstraint strongName

        tputs $channel yes\n
................................................................................
        tputs $channel no\n
      }
    }
 
    proc checkForCertificate { channel } {
      tputs $channel "---- checking for certificate... "

      set certificate [object invoke Interpreter.GetActive GetCertificate]


      if {[string length $certificate] > 0} then {
        #
        # NOTE: Yes, it appears that the core library was signed with a
        #       code-signing certificate.
        #
        addConstraint certificate

        tputs $channel [appendArgs "yes (" \
................................................................................
        tlog $result; tputs $channel error\n]
      }
    }
 
    proc checkForPrimaryThread { channel } {
      tputs $channel "---- checking for primary thread... "

      set threadId [object invoke Interpreter.GetActive ThreadId]


      if {[info tid] == $threadId} then {
        addConstraint primaryThread

        tputs $channel [appendArgs "yes (" $threadId ")\n"]
      } else {
        tputs $channel [appendArgs "no (" $threadId ")\n"]
      }
    }
 
    proc checkForDefaultAppDomain { channel } {
      tputs $channel "---- checking for default application domain... "

      set appDomain [object invoke AppDomain CurrentDomain]

      if {[string length $appDomain] > 0} then {
        if {[object invoke $appDomain IsDefaultAppDomain]} then {
          addConstraint defaultAppDomain

          tputs $channel [appendArgs "yes (" [object invoke $appDomain Id] \
              ")\n"]
        } else {
          tputs $channel [appendArgs "no (" [object invoke $appDomain Id] \
................................................................................

              #
              # NOTE: Check for any Mono version higher than 2.10.
              #
              if {$majorVersion > 2 || $minorVersion > 10} then {
                lappend monoVersions 210
              }







            }

            #
            # NOTE: Check for any Mono version 3.x or higher.
            #
            if {$majorVersion >= 3} then {
              #
................................................................................
          }

          #
          # NOTE: We do not want to skip any Mono bugs on .NET.  Add the
          #       necessary constraints for each version of Mono we know
          #       about.
          #
          foreach monoVersion [list 20 22 24 26 28 210 30] {
            addConstraint [appendArgs monoToDo $monoVersion]
            addConstraint [appendArgs monoBug $monoVersion]
            addConstraint [appendArgs monoCrash $monoVersion]
          }
        }

        tputs $channel [appendArgs $::eagle_platform(runtimeVersion) \
................................................................................
 
    proc checkForThreadCulture { channel } {
      tputs $channel "---- checking for thread culture... "

      #
      # NOTE: Grab the current thread culture.
      #
      set culture [object invoke System.Threading.Thread.CurrentThread \
          CurrentCulture]

      set culture [object invoke Eagle._Components.Private.FormatOps \
          CultureName $culture false]

      if {[string length $culture] > 0} then {
        #
        # NOTE: The culture information is present, use it and show it.
        #
        addConstraint [appendArgs threadCulture. [string map [list - _] \
            $culture]]

        tputs $channel [appendArgs $culture \n]
................................................................................
        tputs $channel [appendArgs unknown \n]
      }
    }
 
    proc checkForQuiet { channel } {
      tputs $channel "---- checking for quiet... "

      if {[object invoke Interpreter.GetActive Quiet]} then {

        #
        # NOTE: Yes, quiet mode is enabled.
        #
        addConstraint quiet

        tputs $channel yes\n
      } else {
................................................................................
      tputs $channel "---- checking for dynamic loading... "

      #
      # NOTE: As far as we know, dynamic loading always works on Windows.
      #       On some Unix systems, dlopen does not work (e.g. because
      #       Mono is statically linked, etc).
      #

      if {$::tcl_platform(platform) eq "windows" || \
          ([llength [info commands library]] > 0 && \
           [catch {library test}] == 0)} then {
        #
        # NOTE: Yes, it appears that it is available.
        #
        addConstraint dynamic

................................................................................
      #       we should check for the DISPLAY environment variable as
      #       some basic indication that the X server is available.
      #       This appears to be very necessary on Mono because it
      #       crashes after repeated failed attempts to create a
      #       Windows Form when the X server is unavailable (e.g. on
      #       OpenBSD).
      #

      if {$::tcl_platform(platform) eq "windows" || \
          [info exists ::env(DISPLAY)]} then {
        #
        # NOTE: Is the Windows Forms assembly available?
        #
        if {[catch {object resolve System.Windows.Forms} assembly] == 0} then {
          #
          # NOTE: Yes, it appears that it is available.
................................................................................
    }
 
    proc checkForObjectMember { channel object member {constraint ""} } {
      tputs $channel [appendArgs "---- checking for object member \"" \
          $object . $member "\"... "]

      if {[catch {object members -flags +NonPublic -pattern $member $object} \

          members] == 0 && [llength $members] > 0} then {
        #
        # NOTE: Yes, it appears that it is available.
        #
        if {[string length $constraint] > 0} then {
          addConstraint [appendArgs member_ $constraint]
        } else {
          addConstraint [appendArgs $object. [string trim $member *?]]
................................................................................
    proc checkForWix { channel } {
      tputs $channel "---- checking for WiX... "

      #
      # NOTE: Platform must be Windows for this constraint to
      #       even be checked (i.e. we require the registry).
      #

      if {$::tcl_platform(platform) eq "windows"} then {
        #
        # NOTE: Indicate that we have not found it yet.
        #
        set directory ""

        #
        # NOTE: Have we not found the directory yet?
................................................................................
          #
          set key [appendArgs HKEY_LOCAL_MACHINE\\ \
              [getSoftwareRegistryKey true] {\Microsoft\Windows Installer XML}]

          #
          # NOTE: The versions of WiX that we support.
          #
          set versions [list 3.5 3.0]

          #
          # NOTE: Check each version, stopping when one is found.
          #
          foreach version $versions {
            #
            # NOTE: Attempt to fetch the WiX install directory
            #       value from the registry, removing the
            #       trailing backslash, if any.
            #
            set directory [file normalize [string trimright [object invoke \
                Microsoft.Win32.Registry GetValue \
                [appendArgs $key \\ $version] InstallRoot \
                null] \\]]

            #
            # NOTE: Does the directory name look valid and
            #       does it actually exist?
            #
            if {[string length $directory] > 0 && \
                [file isdirectory $directory]} then {
              #
              # NOTE: The file name of the primary WiX assembly.
              #
              set fileName [file join $directory wix.dll]

              #
................................................................................

      #
      # NOTE: Platform must be Windows for this constraint to even be
      #       checked (i.e. we require the registry).
      #
      set visualStudioVersions [list]


      if {$::tcl_platform(platform) eq "windows"} then {
        #
        # NOTE: Registry hive where Visual Studio install information is
        #       stored.  Make sure to look in the WoW64 registry because
        #       Visual Studio is currently always a 32-bit application.
        #
        set key [appendArgs HKEY_LOCAL_MACHINE\\ \
            [getSoftwareRegistryKey true] {\Microsoft\VisualStudio}]
................................................................................
        #
        # NOTE: Check each version and keep track of the ones we find.
        #
        foreach version $versions {
          #
          # NOTE: Attempt to fetch the Visual Studio install directory
          #       value from the registry, removing the trailing backslash,

          #       if any.
          #
          set fileName [file normalize [file join [string trimright [object \
              invoke Microsoft.Win32.Registry GetValue [appendArgs $key \\ \
              [lindex $version 0]] InstallDir null] \\] msenv.dll]]

          #
          # NOTE: Does the directory name look valid and does it actually
          #       exist?
          #

          if {[string length $fileName] > 0 && [file isfile $fileName]} then {
            #
            # NOTE: Yes, it appears that it is available.
            #
            addConstraint [appendArgs visualStudio [lindex $version 1]]

            #
            # NOTE: Keep track of all the versions that we find.
................................................................................
 
    proc checkForManagedDebugger { channel } {
      tputs $channel "---- checking for managed debugger... "

      #
      # NOTE: Is the managed debugger attached?
      #
      if {[object invoke System.Diagnostics.Debugger IsAttached]} then {

        #
        # NOTE: Yes, it appears that it is attached.
        #
        addConstraint managedDebugger

        tputs $channel yes\n
      } else {
................................................................................
    #
    exportAndImportPackageCommands [namespace current] [list checkForPlatform \
        checkForEagle checkForGaruda checkForShell checkForDebug checkForTk \
        checkForVersion checkForCommand checkForFile checkForNativeCode \
        checkForTip127 checkForTip194 checkForTip241 checkForTip285 \
        checkForPerformance checkForTiming checkForInteractive checkForSymbols \
        checkForLogFile checkForNetwork checkForCompileOption \
        checkForUserInteraction] false false

    ###########################################################################
    ############################## END Tcl ONLY ###############################
    ###########################################################################
  }
 
  #
  # NOTE: Provide the Eagle test constraints package to the interpreter.
  #
  package provide EagleTestConstraints \
    [expr {[isEagle] ? [info engine PatchLevel] : "1.0"}]
}
 







>
|
>
>
>
>
>
>
>












|









|
>
>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







>
|







 







>
|







 







|
<
>
|







 







|
<
>
|







 







|
<
>
|











|
<
|







 







>
>
>
>
>
>
>







 







|







 







|
|
<
|
|
<
|







 







|
>







 







>
|







 







>
|







 







>
|







 







>
|







 







|






|
|
|

|
|
|
<
<
<
<
<
<
|







 







>
|







 







>
|

|
|
|
<
<
<
<
<
>
|







 







|
>







 







|













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
...
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
...
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
...
811
812
813
814
815
816
817
818

819
820
821
822
823
824
825
826
827
...
829
830
831
832
833
834
835
836

837
838
839
840
841
842
843
844
845
...
874
875
876
877
878
879
880
881

882
883
884
885
886
887
888
889
890
891
892
893
894
895

896
897
898
899
900
901
902
903
....
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
....
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
....
1170
1171
1172
1173
1174
1175
1176
1177
1178

1179
1180

1181
1182
1183
1184
1185
1186
1187
1188
....
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
....
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
....
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
....
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
....
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
....
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648






1649
1650
1651
1652
1653
1654
1655
1656
....
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
....
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754





1755
1756
1757
1758
1759
1760
1761
1762
1763
....
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
....
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
#       support namespaces ourselves, we do not want to pollute the global
#       namespace if this script actually ends up being evaluated in Tcl.
#
namespace eval ::Eagle {
  proc checkForPlatform { channel } {
    tputs $channel "---- checking for platform... "

    if {[info exists ::tcl_platform(platform)]} then {
      addConstraint $::tcl_platform(platform)

      tputs $channel [appendArgs $::tcl_platform(platform) \n]
    } else {
      tputs $channel [appendArgs unknown \n]
    }

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

    if {![isEagle]} then {
      #
      # BUGFIX: We do not want to skip any Mono bugs in Tcl.
      #         Also, fake the culture.
      #
      set constraints [list monoToDo monoBug monoCrash culture.en_US]

      #
      # NOTE: Add the necessary constraints for each version
      #       of Mono we know about.
      #
      foreach version [list 20 22 24 26 28 210 212 30] {
        addConstraint [appendArgs monoToDo $version]
        addConstraint [appendArgs monoBug $version]
        addConstraint [appendArgs monoCrash $version]
      }

      foreach constraint $constraints {
        addConstraint $constraint; # running in Tcl.
      }
    }
  }
 
  proc checkForWindowsCommandProcessor { channel pattern {constraint ""} } {
    tputs $channel "---- checking for Windows Command Processor... "

    if {[info exists ::tcl_platform(platform)] && \
        $::tcl_platform(platform) eq "windows"} then {
      #
      # NOTE: Grab the "ComSpec" from the Windows environment and make sure it
      #       matches the file pattern supplied by the caller (e.g. "cmd.exe").
      #
      if {[info exists ::env(ComSpec)] && \
          [string match -nocase $pattern [file tail $::env(ComSpec)]]} then {
        #
        # NOTE: We are running with a matching command processor.
        #
        if {[string length $constraint] > 0} then {
          addConstraint [appendArgs comSpec_ $constraint]
        } else {
          addConstraint [appendArgs comSpec_ \
              [string map [list * _ - _ ? _ \[ _ \\ _ \] _] $pattern]]
        }

        tputs $channel [appendArgs "yes (\"" $::env(ComSpec) "\")\n"]

        #
        # NOTE: We are done here, return now.
        #
        return
      }
    }

    tputs $channel no\n
  }
 
  proc checkForEagle { channel } {
    tputs $channel "---- checking for Eagle... "

    if {[isEagle]} then {
      #
................................................................................
      # NOTE: We are done here, return now.
      #
      return
    } else {
      #
      # NOTE: Use the appropriate environment variable for the platform.
      #
      if {[info exists ::tcl_platform(platform)] && \
          $::tcl_platform(platform) eq "windows"} then {
        set pathName PATH
      } else {
        #
        # HACK: For shared libraries, use the LD_LIBRARY_PATH.
        #
        if {[file extension $name] eq [info sharedlibextension]} then {
          set pathName LD_LIBRARY_PATH
................................................................................
        set path $::env($pathName)

        #
        # NOTE: Use the appropriate path separator for the platform.
        #
        if {[info exists ::tcl_platform(pathSeparator)]} then {
          set separator $::tcl_platform(pathSeparator)
        } elseif {[info exists ::tcl_platform(platform)] && \
            $::tcl_platform(platform) eq "windows"} then {
          set separator \;
        } else {
          set separator :
        }

        #
        # NOTE: Grab just the file name from the possibly fully qualified file
................................................................................
        tputs $channel untrusted\n
      }
    }
 
    proc checkForStrongName { channel } {
      tputs $channel "---- checking for strong name... "

      if {[catch {object invoke Interpreter.GetActive GetStrongName} \

              strongName] == 0 && \
          [string length $strongName] > 0} then {
        #
        # NOTE: Yes, it appears that the core library was signed with a
        #       strong name key.
        #
        addConstraint strongName

        tputs $channel yes\n
................................................................................
        tputs $channel no\n
      }
    }
 
    proc checkForCertificate { channel } {
      tputs $channel "---- checking for certificate... "

      if {[catch {object invoke Interpreter.GetActive GetCertificate} \

              certificate] == 0 && \
          [string length $certificate] > 0} then {
        #
        # NOTE: Yes, it appears that the core library was signed with a
        #       code-signing certificate.
        #
        addConstraint certificate

        tputs $channel [appendArgs "yes (" \
................................................................................
        tlog $result; tputs $channel error\n]
      }
    }
 
    proc checkForPrimaryThread { channel } {
      tputs $channel "---- checking for primary thread... "

      if {[catch {object invoke Interpreter.GetActive ThreadId} \

              threadId] == 0 && \
          [info tid] == $threadId} then {
        addConstraint primaryThread

        tputs $channel [appendArgs "yes (" $threadId ")\n"]
      } else {
        tputs $channel [appendArgs "no (" $threadId ")\n"]
      }
    }
 
    proc checkForDefaultAppDomain { channel } {
      tputs $channel "---- checking for default application domain... "

      if {[catch {object invoke AppDomain CurrentDomain} appDomain] == 0 && \

          [string length $appDomain] > 0} then {
        if {[object invoke $appDomain IsDefaultAppDomain]} then {
          addConstraint defaultAppDomain

          tputs $channel [appendArgs "yes (" [object invoke $appDomain Id] \
              ")\n"]
        } else {
          tputs $channel [appendArgs "no (" [object invoke $appDomain Id] \
................................................................................

              #
              # NOTE: Check for any Mono version higher than 2.10.
              #
              if {$majorVersion > 2 || $minorVersion > 10} then {
                lappend monoVersions 210
              }

              #
              # NOTE: Check for any Mono version higher than 2.12.
              #
              if {$majorVersion > 2 || $minorVersion > 12} then {
                lappend monoVersions 212
              }
            }

            #
            # NOTE: Check for any Mono version 3.x or higher.
            #
            if {$majorVersion >= 3} then {
              #
................................................................................
          }

          #
          # NOTE: We do not want to skip any Mono bugs on .NET.  Add the
          #       necessary constraints for each version of Mono we know
          #       about.
          #
          foreach monoVersion [list 20 22 24 26 28 210 212 30] {
            addConstraint [appendArgs monoToDo $monoVersion]
            addConstraint [appendArgs monoBug $monoVersion]
            addConstraint [appendArgs monoCrash $monoVersion]
          }
        }

        tputs $channel [appendArgs $::eagle_platform(runtimeVersion) \
................................................................................
 
    proc checkForThreadCulture { channel } {
      tputs $channel "---- checking for thread culture... "

      #
      # NOTE: Grab the current thread culture.
      #
      if {[catch {object invoke System.Threading.Thread.CurrentThread \
              CurrentCulture} culture] == 0 && \

          [catch {object invoke Eagle._Components.Private.FormatOps \
              CultureName $culture false} culture] == 0 && \

          [string length $culture] > 0} then {
        #
        # NOTE: The culture information is present, use it and show it.
        #
        addConstraint [appendArgs threadCulture. [string map [list - _] \
            $culture]]

        tputs $channel [appendArgs $culture \n]
................................................................................
        tputs $channel [appendArgs unknown \n]
      }
    }
 
    proc checkForQuiet { channel } {
      tputs $channel "---- checking for quiet... "

      if {[catch {object invoke Interpreter.GetActive Quiet} quiet] == 0 && \
          $quiet} then {
        #
        # NOTE: Yes, quiet mode is enabled.
        #
        addConstraint quiet

        tputs $channel yes\n
      } else {
................................................................................
      tputs $channel "---- checking for dynamic loading... "

      #
      # NOTE: As far as we know, dynamic loading always works on Windows.
      #       On some Unix systems, dlopen does not work (e.g. because
      #       Mono is statically linked, etc).
      #
      if {([info exists ::tcl_platform(platform)] && \
           $::tcl_platform(platform) eq "windows") || \
          ([llength [info commands library]] > 0 && \
           [catch {library test}] == 0)} then {
        #
        # NOTE: Yes, it appears that it is available.
        #
        addConstraint dynamic

................................................................................
      #       we should check for the DISPLAY environment variable as
      #       some basic indication that the X server is available.
      #       This appears to be very necessary on Mono because it
      #       crashes after repeated failed attempts to create a
      #       Windows Form when the X server is unavailable (e.g. on
      #       OpenBSD).
      #
      if {([info exists ::tcl_platform(platform)] && \
           $::tcl_platform(platform) eq "windows") || \
          [info exists ::env(DISPLAY)]} then {
        #
        # NOTE: Is the Windows Forms assembly available?
        #
        if {[catch {object resolve System.Windows.Forms} assembly] == 0} then {
          #
          # NOTE: Yes, it appears that it is available.
................................................................................
    }
 
    proc checkForObjectMember { channel object member {constraint ""} } {
      tputs $channel [appendArgs "---- checking for object member \"" \
          $object . $member "\"... "]

      if {[catch {object members -flags +NonPublic -pattern $member $object} \
              members] == 0 && \
          [llength $members] > 0} then {
        #
        # NOTE: Yes, it appears that it is available.
        #
        if {[string length $constraint] > 0} then {
          addConstraint [appendArgs member_ $constraint]
        } else {
          addConstraint [appendArgs $object. [string trim $member *?]]
................................................................................
    proc checkForWix { channel } {
      tputs $channel "---- checking for WiX... "

      #
      # NOTE: Platform must be Windows for this constraint to
      #       even be checked (i.e. we require the registry).
      #
      if {[info exists ::tcl_platform(platform)] && \
          $::tcl_platform(platform) eq "windows"} then {
        #
        # NOTE: Indicate that we have not found it yet.
        #
        set directory ""

        #
        # NOTE: Have we not found the directory yet?
................................................................................
          #
          set key [appendArgs HKEY_LOCAL_MACHINE\\ \
              [getSoftwareRegistryKey true] {\Microsoft\Windows Installer XML}]

          #
          # NOTE: The versions of WiX that we support.
          #
          set versions [list 3.6 3.5 3.0]

          #
          # NOTE: Check each version, stopping when one is found.
          #
          foreach version $versions {
            #
            # NOTE: Attempt to fetch the WiX install directory value from the
            #       registry, removing the trailing backslash, if any.  Does
            #       the directory name look valid and does it actually exist?
            #
            if {[catch {file normalize [string trimright [object invoke \
                    Microsoft.Win32.Registry GetValue [appendArgs $key \\ \
                    $version] InstallRoot null] \\]} directory] == 0 && \






                    [string length $directory] > 0 && \
                [file isdirectory $directory]} then {
              #
              # NOTE: The file name of the primary WiX assembly.
              #
              set fileName [file join $directory wix.dll]

              #
................................................................................

      #
      # NOTE: Platform must be Windows for this constraint to even be
      #       checked (i.e. we require the registry).
      #
      set visualStudioVersions [list]

      if {[info exists ::tcl_platform(platform)] && \
          $::tcl_platform(platform) eq "windows"} then {
        #
        # NOTE: Registry hive where Visual Studio install information is
        #       stored.  Make sure to look in the WoW64 registry because
        #       Visual Studio is currently always a 32-bit application.
        #
        set key [appendArgs HKEY_LOCAL_MACHINE\\ \
            [getSoftwareRegistryKey true] {\Microsoft\VisualStudio}]
................................................................................
        #
        # NOTE: Check each version and keep track of the ones we find.
        #
        foreach version $versions {
          #
          # NOTE: Attempt to fetch the Visual Studio install directory
          #       value from the registry, removing the trailing backslash,
          #       if any.  Does the directory name look valid and does it
          #       actually exist?
          #
          if {[catch {file normalize [file join [string trimright [object \
                  invoke Microsoft.Win32.Registry GetValue [appendArgs $key \\ \
                  [lindex $version 0]] InstallDir null] \\] msenv.dll]} \





                  fileName] == 0 && \
              [string length $fileName] > 0 && [file isfile $fileName]} then {
            #
            # NOTE: Yes, it appears that it is available.
            #
            addConstraint [appendArgs visualStudio [lindex $version 1]]

            #
            # NOTE: Keep track of all the versions that we find.
................................................................................
 
    proc checkForManagedDebugger { channel } {
      tputs $channel "---- checking for managed debugger... "

      #
      # NOTE: Is the managed debugger attached?
      #
      if {[catch {object invoke System.Diagnostics.Debugger IsAttached} \
              attached] == 0 && $attached} then {
        #
        # NOTE: Yes, it appears that it is attached.
        #
        addConstraint managedDebugger

        tputs $channel yes\n
      } else {
................................................................................
    #
    exportAndImportPackageCommands [namespace current] [list checkForPlatform \
        checkForEagle checkForGaruda checkForShell checkForDebug checkForTk \
        checkForVersion checkForCommand checkForFile checkForNativeCode \
        checkForTip127 checkForTip194 checkForTip241 checkForTip285 \
        checkForPerformance checkForTiming checkForInteractive checkForSymbols \
        checkForLogFile checkForNetwork checkForCompileOption \
        checkForWindowsCommandProcessor checkForUserInteraction] false false

    ###########################################################################
    ############################## END Tcl ONLY ###############################
    ###########################################################################
  }
 
  #
  # NOTE: Provide the Eagle test constraints package to the interpreter.
  #
  package provide EagleTestConstraints \
    [expr {[isEagle] ? [info engine PatchLevel] : "1.0"}]
}
 

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

262
263
264
265
266
267
268
269
270
271
272
273
274
275
276















277
278
279
280
281
282
283
...
289
290
291
292
293
294
295
296
297
298
299
300
301
302
  #
  # NOTE: Are we being prevented from evaluating the "post-test" script?
  #
  if {![info exists no(postTest)]} then {
    #
    # NOTE: Evaluate the specified post-test script now, if any.
    #
    if {[info exists test_flags(-postTest)] && \
        [string length $test_flags(-postTest)] > 0} then {
      #
      # TODO: Perhaps use [uplevel] here instead of [eval].  For now, it does
      #       not matter since we enforce this file being evaluated at the
      #       top-level.
      #
      eval $test_flags(-postTest)















    }
  }

  #
  # NOTE: Do we need to exit now?
  #
  if {[isExitOnComplete]} then {
................................................................................
    #
    exit $exitCode
  } else {
    #
    # NOTE: For Eagle, even when not exiting, we still set the ExitCode
    #       property of the interpreter.
    #
    if {[isEagle]} then {
      object invoke -alias Interpreter.GetActive ExitCode $exitCode
    }

    unset exitCode
  }
}







|
|





|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







|






262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
...
304
305
306
307
308
309
310
311
312
313
314
315
316
317
  #
  # NOTE: Are we being prevented from evaluating the "post-test" script?
  #
  if {![info exists no(postTest)]} then {
    #
    # NOTE: Evaluate the specified post-test script now, if any.
    #
    if {[info exists test_script(post)] && \
        [string length $test_script(post)] > 0} then {
      #
      # TODO: Perhaps use [uplevel] here instead of [eval].  For now, it does
      #       not matter since we enforce this file being evaluated at the
      #       top-level.
      #
      if {[catch $test_script(post) test_script(post,result)]} then {
        #
        # NOTE: Make 100% sure, even in "quiet" mode, that this script error
        #       gets into the test log file.
        #
        tputs $test_channel [appendArgs "---- post-test script error: " \
            $test_script(post,result) \n]

        #
        # NOTE: The post-test script failed in some way.  This is considered
        #       to be an overall failure of the test suite; therefore, raise
        #       the error now that we are sure it has been recorded in the
        #       test log file.
        #
        error $test_script(post,result)
      }
    }
  }

  #
  # NOTE: Do we need to exit now?
  #
  if {[isExitOnComplete]} then {
................................................................................
    #
    exit $exitCode
  } else {
    #
    # NOTE: For Eagle, even when not exiting, we still set the ExitCode
    #       property of the interpreter.
    #
    if {[isEagle] && [llength [info commands object]] > 0} then {
      object invoke -alias Interpreter.GetActive ExitCode $exitCode
    }

    unset exitCode
  }
}

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

273
274
275
276
277
278
279
















280
281
282
283
284
285
286
...
308
309
310
311
312
313
314














315
316
317
318
319
320
321
322
323
324
325
326
327
328
329















330
331
332
333
334
335
336
...
931
932
933
934
935
936
937












938
939
940
941
942
943
944
....
1639
1640
1641
1642
1643
1644
1645
1646

1647
1648
1649


























1650
1651
1652
1653
1654
1655
1656
....
1661
1662
1663
1664
1665
1666
1667




1668
1669
1670
1671
1672
1673
1674
        [string is boolean -strict $test_flags(-exitOnComplete)]} then {
      #
      # NOTE: Set the test exit-on-complete flag to the one provided by the
      #       command line.
      #
      set test_exit_on_complete $test_flags(-exitOnComplete)
    }
















  }

  #
  # NOTE: Set the default test configuration (i.e. Debug or Release), if
  #       necessary.
  #
  if {![info exists test_configuration]} then {
................................................................................
    #
    if {![info exists test_log]} then {
      set test_log [file join [getTemporaryPath] [appendArgs [file tail [info \
          nameofexecutable]] [getTestLogId] .test. [pid] .log]]
    }
  }















  #
  # NOTE: Are we being prevented from evaluating the "pre-test" script?
  #
  if {![info exists no(preTest)]} then {
    #
    # NOTE: Evaluate the specified pre-test script now, if any.
    #
    if {[info exists test_flags(-preTest)] && \
        [string length $test_flags(-preTest)] > 0} then {
      #
      # TODO: Perhaps use [uplevel] here instead of [eval].  For now, it does
      #       not matter since we enforce this file being evaluated at the
      #       top-level.
      #
      eval $test_flags(-preTest)















    }
  }

  #
  # NOTE: Check for and process any custom test prologue script that may be set
  #       in the environment.  This must be done after the Eagle test package
  #       has been made available and after the log file has been setup.
................................................................................
      #
      if {![info exists no(compileTclThreads)]} then {
        #
        # NOTE: For tests "tclLoad-1.5" and "tclLoad-1.6".
        #
        checkForCompileOption $test_channel TCL_THREADS
      }












    }

    #
    # NOTE: Has dynamic loading testing support been disabled?
    #
    if {![info exists no(dynamic)]} then {
      #
................................................................................
    # NOTE: For test "object-4.10".
    #
    if {![info exists no(test.wxs)]} then {
      checkForFile $test_channel [file join $base_path Installer Tests test.wxs]
    }

    #
    # NOTE: For test "sql-1.2".

    #
    if {![info exists no(sqlite3.dll)]} then {
      checkForFile $test_channel [file join $bin_path sqlite3.dll]


























    }

    if {![info exists no(System.Data.SQLite.dll)]} then {
      checkForFile $test_channel [file join $bin_path System.Data.SQLite.dll]
    }

    if {![info exists no(test.sqlite3)]} then {
................................................................................
  #
  # NOTE: Check the core test constraints unless they have been
  #       explicitly disabled.
  #
  if {![info exists no(platform)]} then {
    checkForPlatform $test_channel
  }





  if {![info exists no(version)]} then {
    checkForVersion $test_channel
  }

  if {![info exists no(eagle)]} then {
    checkForEagle $test_channel







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







 







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







|
|





|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







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







 







|
>



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







 







>
>
>
>







273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
...
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
...
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
....
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
....
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
        [string is boolean -strict $test_flags(-exitOnComplete)]} then {
      #
      # NOTE: Set the test exit-on-complete flag to the one provided by the
      #       command line.
      #
      set test_exit_on_complete $test_flags(-exitOnComplete)
    }

    if {[info exists test_flags(-preTest)] && \
        [string length $test_flags(-preTest)] > 0} then {
      #
      # NOTE: Set the pre-test script to the one provided by the command line.
      #
      set test_script(pre) $test_flags(-preTest)
    }

    if {[info exists test_flags(-postTest)] && \
        [string length $test_flags(-postTest)] > 0} then {
      #
      # NOTE: Set the pre-test script to the one provided by the command line.
      #
      set test_script(post) $test_flags(-postTest)
    }
  }

  #
  # NOTE: Set the default test configuration (i.e. Debug or Release), if
  #       necessary.
  #
  if {![info exists test_configuration]} then {
................................................................................
    #
    if {![info exists test_log]} then {
      set test_log [file join [getTemporaryPath] [appendArgs [file tail [info \
          nameofexecutable]] [getTestLogId] .test. [pid] .log]]
    }
  }

  #
  # NOTE: Show both the pre-test and post-test scripts now, prior to actually
  #       evaluating either of them (even if their use has been disabled).
  #
  tputs $test_channel [appendArgs "---- pre-test script: " \
      [expr {[info exists test_script(pre)] && \
      [string length $test_script(pre)] > 0 ? \
      [appendArgs \" $test_script(pre) \"] : "<none>"}] \n]

  tputs $test_channel [appendArgs "---- post-test script: " \
      [expr {[info exists test_script(post)] && \
      [string length $test_script(post)] > 0 ? \
      [appendArgs \" $test_script(post) \"] : "<none>"}] \n]

  #
  # NOTE: Are we being prevented from evaluating the "pre-test" script?
  #
  if {![info exists no(preTest)]} then {
    #
    # NOTE: Evaluate the specified pre-test script now, if any.
    #
    if {[info exists test_script(pre)] && \
        [string length $test_script(pre)] > 0} then {
      #
      # TODO: Perhaps use [uplevel] here instead of [eval].  For now, it does
      #       not matter since we enforce this file being evaluated at the
      #       top-level.
      #
      if {[catch $test_script(pre) test_script(pre,result)]} then {
        #
        # NOTE: Make 100% sure, even in "quiet" mode, that this script error
        #       gets into the test log file.
        #
        tputs $test_channel [appendArgs "---- pre-test script error: " \
            $test_script(pre,result) \n]

        #
        # NOTE: The pre-test script failed in some way.  This is considered
        #       to be an overall failure of the test suite; therefore, raise
        #       the error now that we are sure it has been recorded in the
        #       test log file.
        #
        error $test_script(pre,result)
      }
    }
  }

  #
  # NOTE: Check for and process any custom test prologue script that may be set
  #       in the environment.  This must be done after the Eagle test package
  #       has been made available and after the log file has been setup.
................................................................................
      #
      if {![info exists no(compileTclThreads)]} then {
        #
        # NOTE: For tests "tclLoad-1.5" and "tclLoad-1.6".
        #
        checkForCompileOption $test_channel TCL_THREADS
      }

      #
      # NOTE: Has runtime license checking support been disabled (at
      #       compile-time).  This only applies to third-party plugins
      #       and applications.
      #
      if {![info exists no(compileLicensing)]} then {
        #
        # NOTE: This is not currently used by any tests.
        #
        checkForCompileOption $test_channel LICENSING
      }
    }

    #
    # NOTE: Has dynamic loading testing support been disabled?
    #
    if {![info exists no(dynamic)]} then {
      #
................................................................................
    # NOTE: For test "object-4.10".
    #
    if {![info exists no(test.wxs)]} then {
      checkForFile $test_channel [file join $base_path Installer Tests test.wxs]
    }

    #
    # NOTE: For tests "sql-1.2", "sql-1.4", "sql-1.5", "sql-1.6", "sql-1.7",
    #       "sql-1.8", and "sql-1.9".
    #
    if {![info exists no(sqlite3.dll)]} then {
      checkForFile $test_channel [file join $bin_path sqlite3.dll]

      #
      # NOTE: Did we manage to find the native SQLite library?  If not, do we
      #       at least know the machine type?
      #
      if {![haveConstraint file_sqlite3.dll] && \
          [info exists tcl_platform(machine)]} then {
        #
        # NOTE: Ok, now try to check for the machine specific native SQLite
        #       library.
        #
        checkForFile $test_channel [file join $bin_path [machineToPlatform \
            $tcl_platform(machine) true] sqlite3.dll]

        #
        # NOTE: Did we manage to find the native SQLite library yet?
        #
        if {![haveConstraint file_sqlite3.dll]} then {
          #
          # NOTE: Ok, now try to check for the platform specific native SQLite
          #       library.
          #
          checkForFile $test_channel [file join $bin_path [machineToPlatform \
              $tcl_platform(machine) false] sqlite3.dll]
        }
      }
    }

    if {![info exists no(System.Data.SQLite.dll)]} then {
      checkForFile $test_channel [file join $bin_path System.Data.SQLite.dll]
    }

    if {![info exists no(test.sqlite3)]} then {
................................................................................
  #
  # NOTE: Check the core test constraints unless they have been
  #       explicitly disabled.
  #
  if {![info exists no(platform)]} then {
    checkForPlatform $test_channel
  }

  if {![info exists no(windowsCommandProcessor)]} then {
    checkForWindowsCommandProcessor $test_channel cmd.exe
  }

  if {![info exists no(version)]} then {
    checkForVersion $test_channel
  }

  if {![info exists no(eagle)]} then {
    checkForEagle $test_channel

Changes to Tests/tkt-ac47dd230a.eagle.

23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
..
63
64
65
66
67
68
69

70

71
72
73
74
75
76
77
78
79
80
runTest {test tkt-ac47dd230a-1.1 {multiple AppDomains} -setup {
  for {set i 1} {$i < 3} {incr i} {
    set appDomain($i) [object invoke AppDomain CreateDomain \
        tkt-ac47dd230a-1.1.$i]

    set result null
    set interpreterHelper($i) [object invoke -alias InterpreterHelper \
        Create $appDomain($i) null Default null null null result]

    if {[string length $interpreterHelper($i)] == 0} then {
      error [object invoke $result ToString]
    }

    set interpreter($i) [$interpreterHelper($i) -alias Interpreter]

................................................................................
  }

  set results
} -cleanup {
  unset -nocomplain results code result interpreter interpreterHelper

  for {set i 1} {$i < 3} {incr i} {

    object invoke AppDomain Unload $appDomain($i)

  }

  unset -nocomplain appDomain i
} -constraints {eagle monoBug28 command.sql compile.DATA\
compile.ISOLATED_INTERPRETERS SQLite System.Data.SQLite} -result {Ok 0 Ok 0}}

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

runSQLiteTestEpilogue
runTestEpilogue







|







 







>
|
>










23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
..
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
runTest {test tkt-ac47dd230a-1.1 {multiple AppDomains} -setup {
  for {set i 1} {$i < 3} {incr i} {
    set appDomain($i) [object invoke AppDomain CreateDomain \
        tkt-ac47dd230a-1.1.$i]

    set result null
    set interpreterHelper($i) [object invoke -alias InterpreterHelper \
        Create $appDomain($i) null Default Default null null null result]

    if {[string length $interpreterHelper($i)] == 0} then {
      error [object invoke $result ToString]
    }

    set interpreter($i) [$interpreterHelper($i) -alias Interpreter]

................................................................................
  }

  set results
} -cleanup {
  unset -nocomplain results code result interpreter interpreterHelper

  for {set i 1} {$i < 3} {incr i} {
    if {[info exists appDomain($i)]} then {
      object invoke AppDomain Unload $appDomain($i)
    }
  }

  unset -nocomplain appDomain i
} -constraints {eagle monoBug28 command.sql compile.DATA\
compile.ISOLATED_INTERPRETERS SQLite System.Data.SQLite} -result {Ok 0 Ok 0}}

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

runSQLiteTestEpilogue
runTestEpilogue