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

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

    54     54   
    55     55     proc getSoftwareRegistryKey { wow64 } {
    56     56       if {$wow64 && [info exists ::tcl_platform(machine)] && \
    57     57           $::tcl_platform(machine) eq "amd64"} then {
    58     58         #
    59     59         # NOTE: Return the WoW64 registry key name because we are running on a
    60     60         #       64-bit operating system and the caller specifically requested
    61         -      #       the Win32 registry key name.
           61  +      #       the WoW64 registry key name.
    62     62         #
    63     63         return Software\\Wow6432Node
    64     64       } else {
    65     65         #
    66     66         # NOTE: Return the native registry key name because we are either not
    67     67         #       running on a 64-bit operating system or the caller wants the
    68     68         #       native registry key name (i.e. not the WoW64 registry key name).
................................................................................
   261    261         set value [getEnvironmentVariable $name]
   262    262   
   263    263         if {[string length $value] > 0} then {
   264    264           return [file normalize $value]
   265    265         }
   266    266       }
   267    267   
   268         -    if {[isEagle]} then {
          268  +    if {[isEagle] && [llength [info commands object]] > 0} then {
   269    269         #
   270    270         # NOTE: Eagle fallback, use whatever is reported by the
   271    271         #       underlying framework and/or operating system.
   272    272         #
   273    273         return [file normalize [object invoke System.IO.Path GetTempPath]]
   274    274       } else {
   275    275         #
................................................................................
   846    846         }
   847    847       }
   848    848   
   849    849       return $result
   850    850     }
   851    851   
   852    852     proc formatDecimal { value {places 4} } {
   853         -    if {[isEagle]} then {
          853  +    if {[isEagle] && [llength [info commands object]] > 0} then {
   854    854         #
   855    855         # HACK: This works; however, in order to do this kind of thing cleanly,
   856    856         #       we really need the Tcl [format] command.
   857    857         #
   858    858         set result [object invoke String Format [appendArgs "{0:0." \
   859    859             [string repeat # $places] "}"] [set object [object invoke \
   860    860             -create Double Parse $value]]]
................................................................................
  1222   1222             lappend command [appendArgs ::tcltest:: $import]
  1223   1223           }
  1224   1224   
  1225   1225           namespace eval :: $command
  1226   1226         }
  1227   1227       }
  1228   1228     }
         1229  +
         1230  +  proc machineToPlatform { machine {architecture false} } {
         1231  +    #
         1232  +    # NOTE: Cannot use "-nocase" option here because Tcl 8.4 does not
         1233  +    #       support it (i.e. because it is pre-TIP #241).
         1234  +    #
         1235  +    switch -exact -- [string tolower $machine] {
         1236  +      amd64 {
         1237  +        return x64
         1238  +      }
         1239  +      intel {
         1240  +        if {!$architecture && \
         1241  +            [info exists ::tcl_platform(platform)] && \
         1242  +            $::tcl_platform(platform) eq "windows"} then {
         1243  +          return Win32
         1244  +        } else {
         1245  +          return x86
         1246  +        }
         1247  +      }
         1248  +      default {
         1249  +        return unknown
         1250  +      }
         1251  +    }
         1252  +  }
  1229   1253   
  1230   1254     if {[isEagle]} then {
  1231   1255       ###########################################################################
  1232   1256       ############################ BEGIN Eagle ONLY #############################
  1233   1257       ###########################################################################
  1234   1258   
  1235   1259       proc initializeTests {} {
................................................................................
  1538   1562   
  1539   1563       proc getTkVersion {} {
  1540   1564         return [testExecTclScript {
  1541   1565           puts -nonewline stdout [package require Tk]; exit
  1542   1566         }]
  1543   1567       }
  1544   1568   
  1545         -    proc machineToPlatform { machine } {
  1546         -      switch -exact -nocase -- $machine {
  1547         -        amd64 {
  1548         -          return x64
  1549         -        }
  1550         -        intel {
  1551         -          if {$::tcl_platform(platform) eq "windows"} then {
  1552         -            return Win32
  1553         -          } else {
  1554         -            return x86
  1555         -          }
  1556         -        }
  1557         -        default {
  1558         -          return unknown
  1559         -        }
  1560         -      }
  1561         -    }
  1562         -
  1563   1569       proc getGarudaDll {} {
  1564   1570         #
  1565   1571         # NOTE: Get the Garuda DLL of the same platform (i.e. machine type)
  1566   1572         #       as the native Tcl shell.
  1567   1573         #
  1568   1574         if {[info exists ::base_path]} then {
  1569   1575           #
................................................................................
  1653   1659         # NOTE: Try the source release directory structure.
  1654   1660         #
  1655   1661         set ::test_path [file join [file normalize [file dirname \
  1656   1662             [file dirname [info library]]]] Library Tests]
  1657   1663   
  1658   1664         if {![file exists $::test_path] || \
  1659   1665             ![file isdirectory $::test_path]} then {
         1666  +        #
         1667  +        # NOTE: Try the source release directory structure again; this time,
         1668  +        #       assume only the embedded script library was used.
         1669  +        #
         1670  +        set ::test_path [file join [info base] Library Tests]
         1671  +      }
         1672  +
         1673  +      if {![file exists $::test_path] || \
         1674  +          ![file isdirectory $::test_path]} then {
  1660   1675           #
  1661   1676           # NOTE: Try for the test package directory.
  1662   1677           #
  1663   1678           set ::test_path [file join [file normalize [file dirname \
  1664   1679               [file dirname [info script]]]] [appendArgs Test \
  1665   1680               [info engine Version]]]
  1666   1681         }
         1682  +
         1683  +      if {![file exists $::test_path] || \
         1684  +          ![file isdirectory $::test_path]} then {
         1685  +        #
         1686  +        # NOTE: Try for the test package directory again; this time, use the
         1687  +        #       base path and assume the source release directory structure.
         1688  +        #
         1689  +        set ::test_path [file join [info base] lib [appendArgs Test \
         1690  +            [info engine Version]]]
         1691  +      }
         1692  +
         1693  +      if {![file exists $::test_path] || \
         1694  +          ![file isdirectory $::test_path]} then {
         1695  +        #
         1696  +        # NOTE: Try for the test package directory again; this time, use the
         1697  +        #       base path.
         1698  +        #
         1699  +        set ::test_path [file join [info base] [appendArgs Test \
         1700  +            [info engine Version]]]
         1701  +      }
  1667   1702   
  1668   1703         if {![file exists $::test_path] || \
  1669   1704             ![file isdirectory $::test_path]} then {
  1670   1705           #
  1671   1706           # NOTE: This must be a binary release, no "Library" directory then.
  1672   1707           #       Also, binary releases have an upper-case "Tests" directory
  1673   1708           #       name that originates from the "update.bat" tool.  This must
  1674   1709           #       match the casing used in "update.bat".
  1675   1710           #
  1676   1711           set ::test_path [file join [file normalize [file dirname \
  1677   1712               [file dirname [info library]]]] Tests]
  1678   1713         }
         1714  +
         1715  +      if {![file exists $::test_path] || \
         1716  +          ![file isdirectory $::test_path]} then {
         1717  +        #
         1718  +        # NOTE: Fallback to using the base directory and checking for a
         1719  +        #       "Tests" directory beneath it.
         1720  +        #
         1721  +        set ::test_path [file join [info base] Tests]
         1722  +      }
  1679   1723       }
  1680   1724   
  1681   1725       #
  1682   1726       # NOTE: Fake having the tcltest package unless we are prevented.
  1683   1727       #
  1684   1728       if {![info exists ::no(configureTcltest)]} then {
  1685   1729         configureTcltest [list] false
................................................................................
  1760   1804       exportAndImportPackageCommands [namespace current] [list addConstraint \
  1761   1805           calculateRelativePerformance haveConstraint haveOrAddConstraint \
  1762   1806           processTestArguments getTemporaryPath getTestLog getTestLogId getFiles \
  1763   1807           getConstraints getTestFiles getTestRunId execTestShell runTestPrologue \
  1764   1808           runTestEpilogue runTest runAllTests fixConstraints sourceIfValid \
  1765   1809           isExitOnComplete getPassPercentage getSkipPercentage testExec tlog \
  1766   1810           returnInfoScript tputs formatDecimal formatList configureTcltest \
  1767         -        tsource testShim] false false
         1811  +        machineToPlatform tsource testShim] false false
  1768   1812   
  1769   1813       ###########################################################################
  1770   1814       ############################## END Tcl ONLY ###############################
  1771   1815       ###########################################################################
  1772   1816     }
  1773   1817   
  1774   1818     #
  1775   1819     # NOTE: Provide the Eagle test package to the interpreter.
  1776   1820     #
  1777   1821     package provide EagleTest \
  1778   1822       [expr {[isEagle] ? [info engine PatchLevel] : "1.0"}]
  1779   1823   }
  1780   1824   

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

    19     19   #       support namespaces ourselves, we do not want to pollute the global
    20     20   #       namespace if this script actually ends up being evaluated in Tcl.
    21     21   #
    22     22   namespace eval ::Eagle {
    23     23     proc checkForPlatform { channel } {
    24     24       tputs $channel "---- checking for platform... "
    25     25   
    26         -    addConstraint $::tcl_platform(platform)
           26  +    if {[info exists ::tcl_platform(platform)]} then {
           27  +      addConstraint $::tcl_platform(platform)
           28  +
           29  +      tputs $channel [appendArgs $::tcl_platform(platform) \n]
           30  +    } else {
           31  +      tputs $channel [appendArgs unknown \n]
           32  +    }
           33  +
           34  +    ###########################################################################
    27     35   
    28     36       if {![isEagle]} then {
    29     37         #
    30     38         # BUGFIX: We do not want to skip any Mono bugs in Tcl.
    31     39         #         Also, fake the culture.
    32     40         #
    33     41         set constraints [list monoToDo monoBug monoCrash culture.en_US]
    34     42   
    35     43         #
    36     44         # NOTE: Add the necessary constraints for each version
    37     45         #       of Mono we know about.
    38     46         #
    39         -      foreach version [list 20 22 24 26 28 210 30] {
           47  +      foreach version [list 20 22 24 26 28 210 212 30] {
    40     48           addConstraint [appendArgs monoToDo $version]
    41     49           addConstraint [appendArgs monoBug $version]
    42     50           addConstraint [appendArgs monoCrash $version]
    43     51         }
    44     52   
    45     53         foreach constraint $constraints {
    46     54           addConstraint $constraint; # running in Tcl.
    47     55         }
    48     56       }
           57  +  }
           58  +
           59  +  proc checkForWindowsCommandProcessor { channel pattern {constraint ""} } {
           60  +    tputs $channel "---- checking for Windows Command Processor... "
    49     61   
    50         -    tputs $channel [appendArgs $::tcl_platform(platform) \n]
           62  +    if {[info exists ::tcl_platform(platform)] && \
           63  +        $::tcl_platform(platform) eq "windows"} then {
           64  +      #
           65  +      # NOTE: Grab the "ComSpec" from the Windows environment and make sure it
           66  +      #       matches the file pattern supplied by the caller (e.g. "cmd.exe").
           67  +      #
           68  +      if {[info exists ::env(ComSpec)] && \
           69  +          [string match -nocase $pattern [file tail $::env(ComSpec)]]} then {
           70  +        #
           71  +        # NOTE: We are running with a matching command processor.
           72  +        #
           73  +        if {[string length $constraint] > 0} then {
           74  +          addConstraint [appendArgs comSpec_ $constraint]
           75  +        } else {
           76  +          addConstraint [appendArgs comSpec_ \
           77  +              [string map [list * _ - _ ? _ \[ _ \\ _ \] _] $pattern]]
           78  +        }
           79  +
           80  +        tputs $channel [appendArgs "yes (\"" $::env(ComSpec) "\")\n"]
           81  +
           82  +        #
           83  +        # NOTE: We are done here, return now.
           84  +        #
           85  +        return
           86  +      }
           87  +    }
           88  +
           89  +    tputs $channel no\n
    51     90     }
    52     91   
    53     92     proc checkForEagle { channel } {
    54     93       tputs $channel "---- checking for Eagle... "
    55     94   
    56     95       if {[isEagle]} then {
    57     96         #
................................................................................
   381    420         # NOTE: We are done here, return now.
   382    421         #
   383    422         return
   384    423       } else {
   385    424         #
   386    425         # NOTE: Use the appropriate environment variable for the platform.
   387    426         #
   388         -      if {$::tcl_platform(platform) eq "windows"} then {
          427  +      if {[info exists ::tcl_platform(platform)] && \
          428  +          $::tcl_platform(platform) eq "windows"} then {
   389    429           set pathName PATH
   390    430         } else {
   391    431           #
   392    432           # HACK: For shared libraries, use the LD_LIBRARY_PATH.
   393    433           #
   394    434           if {[file extension $name] eq [info sharedlibextension]} then {
   395    435             set pathName LD_LIBRARY_PATH
................................................................................
   408    448           set path $::env($pathName)
   409    449   
   410    450           #
   411    451           # NOTE: Use the appropriate path separator for the platform.
   412    452           #
   413    453           if {[info exists ::tcl_platform(pathSeparator)]} then {
   414    454             set separator $::tcl_platform(pathSeparator)
   415         -        } elseif {$::tcl_platform(platform) eq "windows"} then {
          455  +        } elseif {[info exists ::tcl_platform(platform)] && \
          456  +            $::tcl_platform(platform) eq "windows"} then {
   416    457             set separator \;
   417    458           } else {
   418    459             set separator :
   419    460           }
   420    461   
   421    462           #
   422    463           # NOTE: Grab just the file name from the possibly fully qualified file
................................................................................
   770    811           tputs $channel untrusted\n
   771    812         }
   772    813       }
   773    814   
   774    815       proc checkForStrongName { channel } {
   775    816         tputs $channel "---- checking for strong name... "
   776    817   
   777         -      set strongName [object invoke Interpreter.GetActive GetStrongName]
   778         -
   779         -      if {[string length $strongName] > 0} then {
          818  +      if {[catch {object invoke Interpreter.GetActive GetStrongName} \
          819  +              strongName] == 0 && \
          820  +          [string length $strongName] > 0} then {
   780    821           #
   781    822           # NOTE: Yes, it appears that the core library was signed with a
   782    823           #       strong name key.
   783    824           #
   784    825           addConstraint strongName
   785    826   
   786    827           tputs $channel yes\n
................................................................................
   788    829           tputs $channel no\n
   789    830         }
   790    831       }
   791    832   
   792    833       proc checkForCertificate { channel } {
   793    834         tputs $channel "---- checking for certificate... "
   794    835   
   795         -      set certificate [object invoke Interpreter.GetActive GetCertificate]
   796         -
   797         -      if {[string length $certificate] > 0} then {
          836  +      if {[catch {object invoke Interpreter.GetActive GetCertificate} \
          837  +              certificate] == 0 && \
          838  +          [string length $certificate] > 0} then {
   798    839           #
   799    840           # NOTE: Yes, it appears that the core library was signed with a
   800    841           #       code-signing certificate.
   801    842           #
   802    843           addConstraint certificate
   803    844   
   804    845           tputs $channel [appendArgs "yes (" \
................................................................................
   833    874           tlog $result; tputs $channel error\n]
   834    875         }
   835    876       }
   836    877   
   837    878       proc checkForPrimaryThread { channel } {
   838    879         tputs $channel "---- checking for primary thread... "
   839    880   
   840         -      set threadId [object invoke Interpreter.GetActive ThreadId]
   841         -
   842         -      if {[info tid] == $threadId} then {
          881  +      if {[catch {object invoke Interpreter.GetActive ThreadId} \
          882  +              threadId] == 0 && \
          883  +          [info tid] == $threadId} then {
   843    884           addConstraint primaryThread
   844    885   
   845    886           tputs $channel [appendArgs "yes (" $threadId ")\n"]
   846    887         } else {
   847    888           tputs $channel [appendArgs "no (" $threadId ")\n"]
   848    889         }
   849    890       }
   850    891   
   851    892       proc checkForDefaultAppDomain { channel } {
   852    893         tputs $channel "---- checking for default application domain... "
   853    894   
   854         -      set appDomain [object invoke AppDomain CurrentDomain]
   855         -
   856         -      if {[string length $appDomain] > 0} then {
          895  +      if {[catch {object invoke AppDomain CurrentDomain} appDomain] == 0 && \
          896  +          [string length $appDomain] > 0} then {
   857    897           if {[object invoke $appDomain IsDefaultAppDomain]} then {
   858    898             addConstraint defaultAppDomain
   859    899   
   860    900             tputs $channel [appendArgs "yes (" [object invoke $appDomain Id] \
   861    901                 ")\n"]
   862    902           } else {
   863    903             tputs $channel [appendArgs "no (" [object invoke $appDomain Id] \
................................................................................
  1004   1044   
  1005   1045                 #
  1006   1046                 # NOTE: Check for any Mono version higher than 2.10.
  1007   1047                 #
  1008   1048                 if {$majorVersion > 2 || $minorVersion > 10} then {
  1009   1049                   lappend monoVersions 210
  1010   1050                 }
         1051  +
         1052  +              #
         1053  +              # NOTE: Check for any Mono version higher than 2.12.
         1054  +              #
         1055  +              if {$majorVersion > 2 || $minorVersion > 12} then {
         1056  +                lappend monoVersions 212
         1057  +              }
  1011   1058               }
  1012   1059   
  1013   1060               #
  1014   1061               # NOTE: Check for any Mono version 3.x or higher.
  1015   1062               #
  1016   1063               if {$majorVersion >= 3} then {
  1017   1064                 #
................................................................................
  1042   1089             }
  1043   1090   
  1044   1091             #
  1045   1092             # NOTE: We do not want to skip any Mono bugs on .NET.  Add the
  1046   1093             #       necessary constraints for each version of Mono we know
  1047   1094             #       about.
  1048   1095             #
  1049         -          foreach monoVersion [list 20 22 24 26 28 210 30] {
         1096  +          foreach monoVersion [list 20 22 24 26 28 210 212 30] {
  1050   1097               addConstraint [appendArgs monoToDo $monoVersion]
  1051   1098               addConstraint [appendArgs monoBug $monoVersion]
  1052   1099               addConstraint [appendArgs monoCrash $monoVersion]
  1053   1100             }
  1054   1101           }
  1055   1102   
  1056   1103           tputs $channel [appendArgs $::eagle_platform(runtimeVersion) \
................................................................................
  1123   1170   
  1124   1171       proc checkForThreadCulture { channel } {
  1125   1172         tputs $channel "---- checking for thread culture... "
  1126   1173   
  1127   1174         #
  1128   1175         # NOTE: Grab the current thread culture.
  1129   1176         #
  1130         -      set culture [object invoke System.Threading.Thread.CurrentThread \
  1131         -          CurrentCulture]
  1132         -
  1133         -      set culture [object invoke Eagle._Components.Private.FormatOps \
  1134         -          CultureName $culture false]
  1135         -
  1136         -      if {[string length $culture] > 0} then {
         1177  +      if {[catch {object invoke System.Threading.Thread.CurrentThread \
         1178  +              CurrentCulture} culture] == 0 && \
         1179  +          [catch {object invoke Eagle._Components.Private.FormatOps \
         1180  +              CultureName $culture false} culture] == 0 && \
         1181  +          [string length $culture] > 0} then {
  1137   1182           #
  1138   1183           # NOTE: The culture information is present, use it and show it.
  1139   1184           #
  1140   1185           addConstraint [appendArgs threadCulture. [string map [list - _] \
  1141   1186               $culture]]
  1142   1187   
  1143   1188           tputs $channel [appendArgs $culture \n]
................................................................................
  1145   1190           tputs $channel [appendArgs unknown \n]
  1146   1191         }
  1147   1192       }
  1148   1193   
  1149   1194       proc checkForQuiet { channel } {
  1150   1195         tputs $channel "---- checking for quiet... "
  1151   1196   
  1152         -      if {[object invoke Interpreter.GetActive Quiet]} then {
         1197  +      if {[catch {object invoke Interpreter.GetActive Quiet} quiet] == 0 && \
         1198  +          $quiet} then {
  1153   1199           #
  1154   1200           # NOTE: Yes, quiet mode is enabled.
  1155   1201           #
  1156   1202           addConstraint quiet
  1157   1203   
  1158   1204           tputs $channel yes\n
  1159   1205         } else {
................................................................................
  1202   1248         tputs $channel "---- checking for dynamic loading... "
  1203   1249   
  1204   1250         #
  1205   1251         # NOTE: As far as we know, dynamic loading always works on Windows.
  1206   1252         #       On some Unix systems, dlopen does not work (e.g. because
  1207   1253         #       Mono is statically linked, etc).
  1208   1254         #
  1209         -      if {$::tcl_platform(platform) eq "windows" || \
         1255  +      if {([info exists ::tcl_platform(platform)] && \
         1256  +           $::tcl_platform(platform) eq "windows") || \
  1210   1257             ([llength [info commands library]] > 0 && \
  1211   1258              [catch {library test}] == 0)} then {
  1212   1259           #
  1213   1260           # NOTE: Yes, it appears that it is available.
  1214   1261           #
  1215   1262           addConstraint dynamic
  1216   1263   
................................................................................
  1229   1276         #       we should check for the DISPLAY environment variable as
  1230   1277         #       some basic indication that the X server is available.
  1231   1278         #       This appears to be very necessary on Mono because it
  1232   1279         #       crashes after repeated failed attempts to create a
  1233   1280         #       Windows Form when the X server is unavailable (e.g. on
  1234   1281         #       OpenBSD).
  1235   1282         #
  1236         -      if {$::tcl_platform(platform) eq "windows" || \
         1283  +      if {([info exists ::tcl_platform(platform)] && \
         1284  +           $::tcl_platform(platform) eq "windows") || \
  1237   1285             [info exists ::env(DISPLAY)]} then {
  1238   1286           #
  1239   1287           # NOTE: Is the Windows Forms assembly available?
  1240   1288           #
  1241   1289           if {[catch {object resolve System.Windows.Forms} assembly] == 0} then {
  1242   1290             #
  1243   1291             # NOTE: Yes, it appears that it is available.
................................................................................
  1343   1391       }
  1344   1392   
  1345   1393       proc checkForObjectMember { channel object member {constraint ""} } {
  1346   1394         tputs $channel [appendArgs "---- checking for object member \"" \
  1347   1395             $object . $member "\"... "]
  1348   1396   
  1349   1397         if {[catch {object members -flags +NonPublic -pattern $member $object} \
  1350         -          members] == 0 && [llength $members] > 0} then {
         1398  +              members] == 0 && \
         1399  +          [llength $members] > 0} then {
  1351   1400           #
  1352   1401           # NOTE: Yes, it appears that it is available.
  1353   1402           #
  1354   1403           if {[string length $constraint] > 0} then {
  1355   1404             addConstraint [appendArgs member_ $constraint]
  1356   1405           } else {
  1357   1406             addConstraint [appendArgs $object. [string trim $member *?]]
................................................................................
  1497   1546       proc checkForWix { channel } {
  1498   1547         tputs $channel "---- checking for WiX... "
  1499   1548   
  1500   1549         #
  1501   1550         # NOTE: Platform must be Windows for this constraint to
  1502   1551         #       even be checked (i.e. we require the registry).
  1503   1552         #
  1504         -      if {$::tcl_platform(platform) eq "windows"} then {
         1553  +      if {[info exists ::tcl_platform(platform)] && \
         1554  +          $::tcl_platform(platform) eq "windows"} then {
  1505   1555           #
  1506   1556           # NOTE: Indicate that we have not found it yet.
  1507   1557           #
  1508   1558           set directory ""
  1509   1559   
  1510   1560           #
  1511   1561           # NOTE: Have we not found the directory yet?
................................................................................
  1578   1628             #
  1579   1629             set key [appendArgs HKEY_LOCAL_MACHINE\\ \
  1580   1630                 [getSoftwareRegistryKey true] {\Microsoft\Windows Installer XML}]
  1581   1631   
  1582   1632             #
  1583   1633             # NOTE: The versions of WiX that we support.
  1584   1634             #
  1585         -          set versions [list 3.5 3.0]
         1635  +          set versions [list 3.6 3.5 3.0]
  1586   1636   
  1587   1637             #
  1588   1638             # NOTE: Check each version, stopping when one is found.
  1589   1639             #
  1590   1640             foreach version $versions {
  1591   1641               #
  1592         -            # NOTE: Attempt to fetch the WiX install directory
  1593         -            #       value from the registry, removing the
  1594         -            #       trailing backslash, if any.
         1642  +            # NOTE: Attempt to fetch the WiX install directory value from the
         1643  +            #       registry, removing the trailing backslash, if any.  Does
         1644  +            #       the directory name look valid and does it actually exist?
  1595   1645               #
  1596         -            set directory [file normalize [string trimright [object invoke \
  1597         -                Microsoft.Win32.Registry GetValue \
  1598         -                [appendArgs $key \\ $version] InstallRoot \
  1599         -                null] \\]]
  1600         -
  1601         -            #
  1602         -            # NOTE: Does the directory name look valid and
  1603         -            #       does it actually exist?
  1604         -            #
  1605         -            if {[string length $directory] > 0 && \
         1646  +            if {[catch {file normalize [string trimright [object invoke \
         1647  +                    Microsoft.Win32.Registry GetValue [appendArgs $key \\ \
         1648  +                    $version] InstallRoot null] \\]} directory] == 0 && \
         1649  +                    [string length $directory] > 0 && \
  1606   1650                   [file isdirectory $directory]} then {
  1607   1651                 #
  1608   1652                 # NOTE: The file name of the primary WiX assembly.
  1609   1653                 #
  1610   1654                 set fileName [file join $directory wix.dll]
  1611   1655   
  1612   1656                 #
................................................................................
  1676   1720   
  1677   1721         #
  1678   1722         # NOTE: Platform must be Windows for this constraint to even be
  1679   1723         #       checked (i.e. we require the registry).
  1680   1724         #
  1681   1725         set visualStudioVersions [list]
  1682   1726   
  1683         -      if {$::tcl_platform(platform) eq "windows"} then {
         1727  +      if {[info exists ::tcl_platform(platform)] && \
         1728  +          $::tcl_platform(platform) eq "windows"} then {
  1684   1729           #
  1685   1730           # NOTE: Registry hive where Visual Studio install information is
  1686   1731           #       stored.  Make sure to look in the WoW64 registry because
  1687   1732           #       Visual Studio is currently always a 32-bit application.
  1688   1733           #
  1689   1734           set key [appendArgs HKEY_LOCAL_MACHINE\\ \
  1690   1735               [getSoftwareRegistryKey true] {\Microsoft\VisualStudio}]
................................................................................
  1697   1742           #
  1698   1743           # NOTE: Check each version and keep track of the ones we find.
  1699   1744           #
  1700   1745           foreach version $versions {
  1701   1746             #
  1702   1747             # NOTE: Attempt to fetch the Visual Studio install directory
  1703   1748             #       value from the registry, removing the trailing backslash,
  1704         -          #       if any.
         1749  +          #       if any.  Does the directory name look valid and does it
         1750  +          #       actually exist?
  1705   1751             #
  1706         -          set fileName [file normalize [file join [string trimright [object \
  1707         -              invoke Microsoft.Win32.Registry GetValue [appendArgs $key \\ \
  1708         -              [lindex $version 0]] InstallDir null] \\] msenv.dll]]
  1709         -
  1710         -          #
  1711         -          # NOTE: Does the directory name look valid and does it actually
  1712         -          #       exist?
  1713         -          #
  1714         -          if {[string length $fileName] > 0 && [file isfile $fileName]} then {
         1752  +          if {[catch {file normalize [file join [string trimright [object \
         1753  +                  invoke Microsoft.Win32.Registry GetValue [appendArgs $key \\ \
         1754  +                  [lindex $version 0]] InstallDir null] \\] msenv.dll]} \
         1755  +                  fileName] == 0 && \
         1756  +              [string length $fileName] > 0 && [file isfile $fileName]} then {
  1715   1757               #
  1716   1758               # NOTE: Yes, it appears that it is available.
  1717   1759               #
  1718   1760               addConstraint [appendArgs visualStudio [lindex $version 1]]
  1719   1761   
  1720   1762               #
  1721   1763               # NOTE: Keep track of all the versions that we find.
................................................................................
  1744   1786   
  1745   1787       proc checkForManagedDebugger { channel } {
  1746   1788         tputs $channel "---- checking for managed debugger... "
  1747   1789   
  1748   1790         #
  1749   1791         # NOTE: Is the managed debugger attached?
  1750   1792         #
  1751         -      if {[object invoke System.Diagnostics.Debugger IsAttached]} then {
         1793  +      if {[catch {object invoke System.Diagnostics.Debugger IsAttached} \
         1794  +              attached] == 0 && $attached} then {
  1752   1795           #
  1753   1796           # NOTE: Yes, it appears that it is attached.
  1754   1797           #
  1755   1798           addConstraint managedDebugger
  1756   1799   
  1757   1800           tputs $channel yes\n
  1758   1801         } else {
................................................................................
  1850   1893       #
  1851   1894       exportAndImportPackageCommands [namespace current] [list checkForPlatform \
  1852   1895           checkForEagle checkForGaruda checkForShell checkForDebug checkForTk \
  1853   1896           checkForVersion checkForCommand checkForFile checkForNativeCode \
  1854   1897           checkForTip127 checkForTip194 checkForTip241 checkForTip285 \
  1855   1898           checkForPerformance checkForTiming checkForInteractive checkForSymbols \
  1856   1899           checkForLogFile checkForNetwork checkForCompileOption \
  1857         -        checkForUserInteraction] false false
         1900  +        checkForWindowsCommandProcessor checkForUserInteraction] false false
  1858   1901   
  1859   1902       ###########################################################################
  1860   1903       ############################## END Tcl ONLY ###############################
  1861   1904       ###########################################################################
  1862   1905     }
  1863   1906   
  1864   1907     #
  1865   1908     # NOTE: Provide the Eagle test constraints package to the interpreter.
  1866   1909     #
  1867   1910     package provide EagleTestConstraints \
  1868   1911       [expr {[isEagle] ? [info engine PatchLevel] : "1.0"}]
  1869   1912   }
  1870   1913   

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

   262    262     #
   263    263     # NOTE: Are we being prevented from evaluating the "post-test" script?
   264    264     #
   265    265     if {![info exists no(postTest)]} then {
   266    266       #
   267    267       # NOTE: Evaluate the specified post-test script now, if any.
   268    268       #
   269         -    if {[info exists test_flags(-postTest)] && \
   270         -        [string length $test_flags(-postTest)] > 0} then {
          269  +    if {[info exists test_script(post)] && \
          270  +        [string length $test_script(post)] > 0} then {
   271    271         #
   272    272         # TODO: Perhaps use [uplevel] here instead of [eval].  For now, it does
   273    273         #       not matter since we enforce this file being evaluated at the
   274    274         #       top-level.
   275    275         #
   276         -      eval $test_flags(-postTest)
          276  +      if {[catch $test_script(post) test_script(post,result)]} then {
          277  +        #
          278  +        # NOTE: Make 100% sure, even in "quiet" mode, that this script error
          279  +        #       gets into the test log file.
          280  +        #
          281  +        tputs $test_channel [appendArgs "---- post-test script error: " \
          282  +            $test_script(post,result) \n]
          283  +
          284  +        #
          285  +        # NOTE: The post-test script failed in some way.  This is considered
          286  +        #       to be an overall failure of the test suite; therefore, raise
          287  +        #       the error now that we are sure it has been recorded in the
          288  +        #       test log file.
          289  +        #
          290  +        error $test_script(post,result)
          291  +      }
   277    292       }
   278    293     }
   279    294   
   280    295     #
   281    296     # NOTE: Do we need to exit now?
   282    297     #
   283    298     if {[isExitOnComplete]} then {
................................................................................
   289    304       #
   290    305       exit $exitCode
   291    306     } else {
   292    307       #
   293    308       # NOTE: For Eagle, even when not exiting, we still set the ExitCode
   294    309       #       property of the interpreter.
   295    310       #
   296         -    if {[isEagle]} then {
          311  +    if {[isEagle] && [llength [info commands object]] > 0} then {
   297    312         object invoke -alias Interpreter.GetActive ExitCode $exitCode
   298    313       }
   299    314   
   300    315       unset exitCode
   301    316     }
   302    317   }

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

   273    273           [string is boolean -strict $test_flags(-exitOnComplete)]} then {
   274    274         #
   275    275         # NOTE: Set the test exit-on-complete flag to the one provided by the
   276    276         #       command line.
   277    277         #
   278    278         set test_exit_on_complete $test_flags(-exitOnComplete)
   279    279       }
          280  +
          281  +    if {[info exists test_flags(-preTest)] && \
          282  +        [string length $test_flags(-preTest)] > 0} then {
          283  +      #
          284  +      # NOTE: Set the pre-test script to the one provided by the command line.
          285  +      #
          286  +      set test_script(pre) $test_flags(-preTest)
          287  +    }
          288  +
          289  +    if {[info exists test_flags(-postTest)] && \
          290  +        [string length $test_flags(-postTest)] > 0} then {
          291  +      #
          292  +      # NOTE: Set the pre-test script to the one provided by the command line.
          293  +      #
          294  +      set test_script(post) $test_flags(-postTest)
          295  +    }
   280    296     }
   281    297   
   282    298     #
   283    299     # NOTE: Set the default test configuration (i.e. Debug or Release), if
   284    300     #       necessary.
   285    301     #
   286    302     if {![info exists test_configuration]} then {
................................................................................
   308    324       #
   309    325       if {![info exists test_log]} then {
   310    326         set test_log [file join [getTemporaryPath] [appendArgs [file tail [info \
   311    327             nameofexecutable]] [getTestLogId] .test. [pid] .log]]
   312    328       }
   313    329     }
   314    330   
          331  +  #
          332  +  # NOTE: Show both the pre-test and post-test scripts now, prior to actually
          333  +  #       evaluating either of them (even if their use has been disabled).
          334  +  #
          335  +  tputs $test_channel [appendArgs "---- pre-test script: " \
          336  +      [expr {[info exists test_script(pre)] && \
          337  +      [string length $test_script(pre)] > 0 ? \
          338  +      [appendArgs \" $test_script(pre) \"] : "<none>"}] \n]
          339  +
          340  +  tputs $test_channel [appendArgs "---- post-test script: " \
          341  +      [expr {[info exists test_script(post)] && \
          342  +      [string length $test_script(post)] > 0 ? \
          343  +      [appendArgs \" $test_script(post) \"] : "<none>"}] \n]
          344  +
   315    345     #
   316    346     # NOTE: Are we being prevented from evaluating the "pre-test" script?
   317    347     #
   318    348     if {![info exists no(preTest)]} then {
   319    349       #
   320    350       # NOTE: Evaluate the specified pre-test script now, if any.
   321    351       #
   322         -    if {[info exists test_flags(-preTest)] && \
   323         -        [string length $test_flags(-preTest)] > 0} then {
          352  +    if {[info exists test_script(pre)] && \
          353  +        [string length $test_script(pre)] > 0} then {
   324    354         #
   325    355         # TODO: Perhaps use [uplevel] here instead of [eval].  For now, it does
   326    356         #       not matter since we enforce this file being evaluated at the
   327    357         #       top-level.
   328    358         #
   329         -      eval $test_flags(-preTest)
          359  +      if {[catch $test_script(pre) test_script(pre,result)]} then {
          360  +        #
          361  +        # NOTE: Make 100% sure, even in "quiet" mode, that this script error
          362  +        #       gets into the test log file.
          363  +        #
          364  +        tputs $test_channel [appendArgs "---- pre-test script error: " \
          365  +            $test_script(pre,result) \n]
          366  +
          367  +        #
          368  +        # NOTE: The pre-test script failed in some way.  This is considered
          369  +        #       to be an overall failure of the test suite; therefore, raise
          370  +        #       the error now that we are sure it has been recorded in the
          371  +        #       test log file.
          372  +        #
          373  +        error $test_script(pre,result)
          374  +      }
   330    375       }
   331    376     }
   332    377   
   333    378     #
   334    379     # NOTE: Check for and process any custom test prologue script that may be set
   335    380     #       in the environment.  This must be done after the Eagle test package
   336    381     #       has been made available and after the log file has been setup.
................................................................................
   931    976         #
   932    977         if {![info exists no(compileTclThreads)]} then {
   933    978           #
   934    979           # NOTE: For tests "tclLoad-1.5" and "tclLoad-1.6".
   935    980           #
   936    981           checkForCompileOption $test_channel TCL_THREADS
   937    982         }
          983  +
          984  +      #
          985  +      # NOTE: Has runtime license checking support been disabled (at
          986  +      #       compile-time).  This only applies to third-party plugins
          987  +      #       and applications.
          988  +      #
          989  +      if {![info exists no(compileLicensing)]} then {
          990  +        #
          991  +        # NOTE: This is not currently used by any tests.
          992  +        #
          993  +        checkForCompileOption $test_channel LICENSING
          994  +      }
   938    995       }
   939    996   
   940    997       #
   941    998       # NOTE: Has dynamic loading testing support been disabled?
   942    999       #
   943   1000       if {![info exists no(dynamic)]} then {
   944   1001         #
................................................................................
  1639   1696       # NOTE: For test "object-4.10".
  1640   1697       #
  1641   1698       if {![info exists no(test.wxs)]} then {
  1642   1699         checkForFile $test_channel [file join $base_path Installer Tests test.wxs]
  1643   1700       }
  1644   1701   
  1645   1702       #
  1646         -    # NOTE: For test "sql-1.2".
         1703  +    # NOTE: For tests "sql-1.2", "sql-1.4", "sql-1.5", "sql-1.6", "sql-1.7",
         1704  +    #       "sql-1.8", and "sql-1.9".
  1647   1705       #
  1648   1706       if {![info exists no(sqlite3.dll)]} then {
  1649   1707         checkForFile $test_channel [file join $bin_path sqlite3.dll]
         1708  +
         1709  +      #
         1710  +      # NOTE: Did we manage to find the native SQLite library?  If not, do we
         1711  +      #       at least know the machine type?
         1712  +      #
         1713  +      if {![haveConstraint file_sqlite3.dll] && \
         1714  +          [info exists tcl_platform(machine)]} then {
         1715  +        #
         1716  +        # NOTE: Ok, now try to check for the machine specific native SQLite
         1717  +        #       library.
         1718  +        #
         1719  +        checkForFile $test_channel [file join $bin_path [machineToPlatform \
         1720  +            $tcl_platform(machine) true] sqlite3.dll]
         1721  +
         1722  +        #
         1723  +        # NOTE: Did we manage to find the native SQLite library yet?
         1724  +        #
         1725  +        if {![haveConstraint file_sqlite3.dll]} then {
         1726  +          #
         1727  +          # NOTE: Ok, now try to check for the platform specific native SQLite
         1728  +          #       library.
         1729  +          #
         1730  +          checkForFile $test_channel [file join $bin_path [machineToPlatform \
         1731  +              $tcl_platform(machine) false] sqlite3.dll]
         1732  +        }
         1733  +      }
  1650   1734       }
  1651   1735   
  1652   1736       if {![info exists no(System.Data.SQLite.dll)]} then {
  1653   1737         checkForFile $test_channel [file join $bin_path System.Data.SQLite.dll]
  1654   1738       }
  1655   1739   
  1656   1740       if {![info exists no(test.sqlite3)]} then {
................................................................................
  1661   1745     #
  1662   1746     # NOTE: Check the core test constraints unless they have been
  1663   1747     #       explicitly disabled.
  1664   1748     #
  1665   1749     if {![info exists no(platform)]} then {
  1666   1750       checkForPlatform $test_channel
  1667   1751     }
         1752  +
         1753  +  if {![info exists no(windowsCommandProcessor)]} then {
         1754  +    checkForWindowsCommandProcessor $test_channel cmd.exe
         1755  +  }
  1668   1756   
  1669   1757     if {![info exists no(version)]} then {
  1670   1758       checkForVersion $test_channel
  1671   1759     }
  1672   1760   
  1673   1761     if {![info exists no(eagle)]} then {
  1674   1762       checkForEagle $test_channel

Changes to Tests/tkt-ac47dd230a.eagle.

    23     23   runTest {test tkt-ac47dd230a-1.1 {multiple AppDomains} -setup {
    24     24     for {set i 1} {$i < 3} {incr i} {
    25     25       set appDomain($i) [object invoke AppDomain CreateDomain \
    26     26           tkt-ac47dd230a-1.1.$i]
    27     27   
    28     28       set result null
    29     29       set interpreterHelper($i) [object invoke -alias InterpreterHelper \
    30         -        Create $appDomain($i) null Default null null null result]
           30  +        Create $appDomain($i) null Default Default null null null result]
    31     31   
    32     32       if {[string length $interpreterHelper($i)] == 0} then {
    33     33         error [object invoke $result ToString]
    34     34       }
    35     35   
    36     36       set interpreter($i) [$interpreterHelper($i) -alias Interpreter]
    37     37   
................................................................................
    63     63     }
    64     64   
    65     65     set results
    66     66   } -cleanup {
    67     67     unset -nocomplain results code result interpreter interpreterHelper
    68     68   
    69     69     for {set i 1} {$i < 3} {incr i} {
    70         -    object invoke AppDomain Unload $appDomain($i)
           70  +    if {[info exists appDomain($i)]} then {
           71  +      object invoke AppDomain Unload $appDomain($i)
           72  +    }
    71     73     }
    72     74   
    73     75     unset -nocomplain appDomain i
    74     76   } -constraints {eagle monoBug28 command.sql compile.DATA\
    75     77   compile.ISOLATED_INTERPRETERS SQLite System.Data.SQLite} -result {Ok 0 Ok 0}}
    76     78   
    77     79   ###############################################################################
    78     80   
    79     81   runSQLiteTestEpilogue
    80     82   runTestEpilogue