System.Data.SQLite
Check-in [7197d1e4c5]
Not logged in

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

Overview
Comment:Enhance detection and handling of multiple sets of build output by the test suite. Update Eagle script library in externals to latest trunk.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 7197d1e4c55a91be1391d8ea4559e9703a0b8a4b
User & Date: mistachkin 2013-02-27 07:02:57
Context
2013-02-27
07:08
Simplify the getBuildBaseDirectory test suite infrastructure helper procedure. check-in: e34afc8100 user: mistachkin tags: trunk
07:02
Enhance detection and handling of multiple sets of build output by the test suite. Update Eagle script library in externals to latest trunk. check-in: 7197d1e4c5 user: mistachkin tags: trunk
07:02
Restore the default connection pool implementation in the test cleanup for ticket [393d954be0]. check-in: 7539c9f0a6 user: mistachkin tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

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

   384    384       #
   385    385       upvar 1 $varName array
   386    386   
   387    387       #
   388    388       # TODO: Add more support for standard tcltest options here.
   389    389       #
   390    390       set options [list -configuration -constraints -exitOnComplete -file \
   391         -        -logFile -match -no -notFile -postTest -preTest -skip -stopOnFailure \
   392         -        -suffix -tclsh -threshold]
          391  +        -logFile -machine -match -no -notFile -platform -postTest -preTest \
          392  +        -skip -stopOnFailure -suffix -tclsh -threshold]
   393    393   
   394    394       foreach {name value} $args {
   395    395         #
   396    396         # NOTE: Use the [tqputs] command here just in case the test log file
   397    397         #       has not been setup yet (i.e. by default, this procedure is
   398    398         #       almost always called by the test prologue file prior to the
   399    399         #       test log file having been setup and we do not want to just
................................................................................
   486    486         #
   487    487         return [file normalize [file dirname [info nameofexecutable]]]
   488    488       }
   489    489     }
   490    490   
   491    491     proc getFiles { directory pattern } {
   492    492       if {[isEagle]} then {
   493         -      return [lsort -dictionary [file list $directory $pattern]]
          493  +      set result [list]
          494  +
          495  +      foreach fileName [lsort -dictionary [file list $directory $pattern]] {
          496  +        if {[file isfile $fileName] && [file readable $fileName]} then {
          497  +          lappend result $fileName
          498  +        }
          499  +      }
          500  +
          501  +      return $result
   494    502       } else {
   495    503         return [lsort -dictionary [glob -directory $directory -types \
   496         -          {b c f p s} -nocomplain -- $pattern]]
          504  +          {f r} -nocomplain -- $pattern]]
   497    505       }
   498    506     }
   499    507   
   500    508     proc getTestFiles { directories matchFilePatterns skipFilePatterns } {
   501    509       set result [list]
   502    510   
   503    511       foreach directory $directories {
................................................................................
  1265   1273             }
  1266   1274   
  1267   1275             #
  1268   1276             # NOTE: We evaluated another test file.
  1269   1277             #
  1270   1278             incr count
  1271   1279   
  1272         -          #
  1273         -          # NOTE: In terms of files, not tests, what percent done are we now?
  1274         -          #
  1275         -          set percent [formatDecimal \
  1276         -              [expr {$total != 0 ? 100.0 * ($count / double($total)) : 100}]]
  1277         -
  1278         -          if {$percent != $lastPercent} then {
  1279         -            reportTestPercent $channel $percent \
  1280         -                [llength $failed] [llength $leaked]
  1281         -
  1282         -            set lastPercent $percent
  1283         -          }
  1284         -
  1285   1280             #
  1286   1281             # NOTE: Record failed test count after this file.
  1287   1282             #
  1288   1283             if {[isEagle]} then {
  1289   1284               set after $::eagle_tests(failed)
  1290   1285             } else {
  1291   1286               set after $::tcltest::numTests(Failed)
................................................................................
  1293   1288   
  1294   1289             #
  1295   1290             # NOTE: Did this file have any failing tests?
  1296   1291             #
  1297   1292             if {$after > $before} then {
  1298   1293               lappend failed [file tail $fileName]
  1299   1294             }
         1295  +
         1296  +          #
         1297  +          # NOTE: In terms of files, not tests, what percent done are we now?
         1298  +          #
         1299  +          set percent [formatDecimal \
         1300  +              [expr {$total != 0 ? 100.0 * ($count / double($total)) : 100}]]
         1301  +
         1302  +          if {$percent != $lastPercent} then {
         1303  +            reportTestPercent $channel $percent \
         1304  +                [llength $failed] [llength $leaked]
         1305  +
         1306  +            set lastPercent $percent
         1307  +          }
  1300   1308   
  1301   1309             #
  1302   1310             # NOTE: Unset the current test file name, it is no longer
  1303   1311             #       needed.
  1304   1312             #
  1305   1313             unset -nocomplain ::test_file
  1306   1314   
................................................................................
  1771   1779       }
  1772   1780   
  1773   1781       proc getTkVersion {} {
  1774   1782         return [testExecTclScript {
  1775   1783           puts -nonewline stdout [package require Tk]; exit
  1776   1784         }]
  1777   1785       }
         1786  +
         1787  +    proc getTestMachine {} {
         1788  +      #
         1789  +      # NOTE: Determine the effective test machine and return it.  If the
         1790  +      #       test machine cannot be determined, return an empty string.
         1791  +      #
         1792  +      if {[info exists ::test_flags(-machine)] && \
         1793  +          [string length $::test_flags(-machine)] > 0} then {
         1794  +        #
         1795  +        # NOTE: The test machine has been manually overridden via the test
         1796  +        #       flags; therefore, use it.
         1797  +        #
         1798  +        return $::test_flags(-machine)
         1799  +      } elseif {[info exists ::test_machine]} then {
         1800  +        #
         1801  +        # NOTE: Use the test machine.  The default value is set by the test
         1802  +        #       suite prologue; however, this may have been overridden.
         1803  +        #
         1804  +        return $::test_machine
         1805  +      } elseif {[info exists ::tcl_platform(machine)]} then {
         1806  +        #
         1807  +        # NOTE: Use the build machine of Eagle itself.
         1808  +        #
         1809  +        return $::tcl_platform(machine)
         1810  +      } else {
         1811  +        #
         1812  +        # NOTE: We are missing the machine, return nothing.
         1813  +        #
         1814  +        return ""
         1815  +      }
         1816  +    }
         1817  +
         1818  +    proc getTestPlatform {} {
         1819  +      #
         1820  +      # NOTE: Determine the effective test platform and return it.  If the
         1821  +      #       test platform cannot be determined, return an empty string.
         1822  +      #
         1823  +      if {[info exists ::test_flags(-platform)] && \
         1824  +          [string length $::test_flags(-platform)] > 0} then {
         1825  +        #
         1826  +        # NOTE: The test platform has been manually overridden via the test
         1827  +        #       flags; therefore, use it.
         1828  +        #
         1829  +        return $::test_flags(-platform)
         1830  +      } elseif {[info exists ::test_platform]} then {
         1831  +        #
         1832  +        # NOTE: Use the test platform.  The default value is set by the test
         1833  +        #       suite prologue; however, this may have been overridden.
         1834  +        #
         1835  +        return $::test_platform
         1836  +      } else {
         1837  +        set machine [getTestMachine]
         1838  +
         1839  +        if {[string length $machine] > 0} then {
         1840  +          #
         1841  +          # NOTE: Use the machine architecture to figure out the platform
         1842  +          #       and then return it.
         1843  +          #
         1844  +          return [machineToPlatform $machine]
         1845  +        } else {
         1846  +          #
         1847  +          # NOTE: We are missing the machine and we cannot figure out the
         1848  +          #       platform without it; therefore, return nothing.
         1849  +          #
         1850  +          return ""
         1851  +        }
         1852  +      }
         1853  +    }
  1778   1854   
  1779   1855       proc getTestConfiguration {} {
  1780   1856         #
  1781   1857         # NOTE: Determine the effective test configuration and return it.  If
  1782   1858         #       the test configuration cannot be determined, return an empty
  1783   1859         #       string.
  1784   1860         #
................................................................................
  1787   1863           #
  1788   1864           # NOTE: The test configuration has been manually overridden via the
  1789   1865           #       test flags; therefore, use it.
  1790   1866           #
  1791   1867           return $::test_flags(-configuration)
  1792   1868         } elseif {[info exists ::test_configuration]} then {
  1793   1869           #
  1794         -        # NOTE: Use the test configuration.  The default value is "Release",
  1795         -        #       as set by the test suite prologue; however, this may have
  1796         -        #       been overridden.
         1870  +        # NOTE: Use the test configuration.  The default value is set by the
         1871  +        #       test suite prologue; however, this may have been overridden.
  1797   1872           #
  1798   1873           return $::test_configuration
  1799   1874         } elseif {[info exists ::eagle_platform(configuration)]} then {
  1800   1875           #
  1801   1876           # NOTE: Use the build configuration of Eagle itself.  This value will
  1802         -        #       always be "Debug" or "Release".
         1877  +        #       most likely be either "Debug" or "Release".
  1803   1878           #
  1804   1879           return $::eagle_platform(configuration)
  1805   1880         } else {
  1806   1881           #
  1807   1882           # NOTE: We are missing the configuration, return nothing.
  1808   1883           #
  1809   1884           return ""
................................................................................
  2063   2138         configureTcltest [list] [list test testConstraint] false
  2064   2139       }
  2065   2140   
  2066   2141       #
  2067   2142       # NOTE: We need several of our test related commands in the global
  2068   2143       #       namespace as well.
  2069   2144       #
  2070         -    exportAndImportPackageCommands [namespace current] [list addConstraint \
  2071         -        calculateRelativePerformance haveConstraint haveOrAddConstraint \
  2072         -        processTestArguments getTemporaryPath getTestLog getTestLogId getFiles \
  2073         -        getConstraints getTestFiles getTestRunId execTestShell runTestPrologue \
  2074         -        runTestEpilogue runTest runAllTests fixConstraints sourceIfValid \
  2075         -        isExitOnComplete getPassPercentage getSkipPercentage testExec tlog \
  2076         -        returnInfoScript tputs formatDecimal formatList configureTcltest \
  2077         -        calculateBogoCops removeConstraint machineToPlatform tsource testShim \
  2078         -        getTestConfiguration getTestSuffix getTclShellFileName] false false
         2145  +    exportAndImportPackageCommands [namespace current] [list \
         2146  +        tputs tlog getSoftwareRegistryKey haveConstraint addConstraint \
         2147  +        haveOrAddConstraint getConstraints removeConstraint fixConstraints \
         2148  +        calculateBogoCops calculateRelativePerformance sourceIfValid \
         2149  +        processTestArguments getTclShellFileName getTemporaryPath getFiles \
         2150  +        getTestFiles getTestRunId getTestLogId getTestLog testExec \
         2151  +        testClrExec execTestShell isStopOnFailure isExitOnComplete \
         2152  +        returnInfoScript runTestPrologue runTestEpilogue hookPuts unhookPuts \
         2153  +        runTest testShim tsource recordTestStatistics reportTestStatistics \
         2154  +        formatList formatListAsDict pathToRegexp inverseLsearchGlob \
         2155  +        removePathFromFileNames formatDecimal clearTestPercent \
         2156  +        reportTestPercent runAllTests configureTcltest machineToPlatform \
         2157  +        getPassPercentage getSkipPercentage] false false
  2079   2158   
  2080   2159       ###########################################################################
  2081   2160       ############################## END Tcl ONLY ###############################
  2082   2161       ###########################################################################
  2083   2162     }
  2084   2163   
  2085   2164     #
  2086   2165     # NOTE: Provide the Eagle test package to the interpreter.
  2087   2166     #
  2088   2167     package provide Eagle.Test \
  2089   2168       [expr {[isEagle] ? [info engine PatchLevel] : "1.0"}]
  2090   2169   }
  2091   2170   

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

   181    181       # NOTE: Check for any overridden settings that may have been specified via
   182    182       #       the command line, etc.
   183    183       #
   184    184       checkForTestOverrides stdout [expr {[info exists test_overrides] ? \
   185    185           $test_overrides : [list binary_directory build_base_directory \
   186    186           build_directory common_directory connection_flags database_directory \
   187    187           datetime_format scratch_directory temporary_directory \
   188         -        test_configuration test_constraints test_overrides test_year \
          188  +        test_configuration test_configurations test_constraints \
          189  +        test_machine test_overrides test_platform test_year test_years \
   189    190           test_year_clr_v2 test_year_clr_v4 vendor_directory]}] false
   190    191   
   191    192       #
   192    193       # NOTE: This variable will contain the name of the directory containing the
   193    194       #       vendor-specific testing infrastructure.  If the variable does not
   194    195       #       already exist, create it; otherwise, it has been overridden and the
   195    196       #       existing value should be left intact.

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

    16     16   
    17     17   #
    18     18   # NOTE: Use our own namespace here because even though we do not directly
    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  +  proc getKnownMonoVersions {} {
           24  +    #
           25  +    # NOTE: This job of this procedure is to return the list of "known"
           26  +    #       versions of Mono supported by the test suite infrastructure.
           27  +    #
           28  +    return [list \
           29  +        [list 2 0] [list 2 2] [list 2 4] [list 2 6] [list 2 8] [list 2 10] \
           30  +        [list 2 11] [list 2 12] [list 3 0] [list 3 1] [list 3 2] [list 3 3] \
           31  +        [list 3 4] [list 3 5] [list 3 6]]
           32  +  }
           33  +
    23     34     proc checkForPlatform { channel } {
    24     35       tputs $channel "---- checking for platform... "
    25     36   
    26     37       if {[info exists ::tcl_platform(platform)]} then {
    27     38         addConstraint $::tcl_platform(platform)
    28     39   
    29     40         tputs $channel [appendArgs $::tcl_platform(platform) \n]
................................................................................
    40     51         if {![info exists ::no(runtimeVersion)]} then {
    41     52           set constraints [list monoToDo monoBug monoCrash]
    42     53   
    43     54           #
    44     55           # NOTE: Add the necessary constraints for each version of Mono that
    45     56           #       we know about.
    46     57           #
    47         -        foreach version [list 20 22 24 26 28 210 211 212 30] {
    48         -          addConstraint [appendArgs monoToDo $version]
    49         -          addConstraint [appendArgs monoBug $version]
    50         -          addConstraint [appendArgs monoCrash $version]
           58  +        foreach monoVersion [getKnownMonoVersions] {
           59  +          set constraintVersion [join $monoVersion ""]
           60  +
           61  +          addConstraint [appendArgs monoToDo $constraintVersion]
           62  +          addConstraint [appendArgs monoBug $constraintVersion]
           63  +          addConstraint [appendArgs monoCrash $constraintVersion]
    51     64           }
    52     65   
    53     66           #
    54     67           # NOTE: Also add just the generic Mono constraints that do not have
    55     68           #       a trailing version.
    56     69           #
    57     70           foreach constraint $constraints {
................................................................................
   592    605         addConstraint [appendArgs command. $name]
   593    606   
   594    607         tputs $channel yes\n
   595    608       } else {
   596    609         tputs $channel no\n
   597    610       }
   598    611     }
          612  +
          613  +  proc checkForTestMachine { channel } {
          614  +    tputs $channel "---- checking for test machine... "
          615  +
          616  +    if {[info exists ::test_machine] && \
          617  +        [string length $::test_machine] > 0} then {
          618  +      addConstraint [appendArgs machine. $::test_machine]
          619  +
          620  +      tputs $channel [appendArgs $::test_machine \n]
          621  +    } else {
          622  +      tputs $channel unknown\n
          623  +    }
          624  +  }
          625  +
          626  +  proc checkForTestPlatform { channel } {
          627  +    tputs $channel "---- checking for test platform... "
          628  +
          629  +    if {[info exists ::test_platform] && \
          630  +        [string length $::test_platform] > 0} then {
          631  +      addConstraint [appendArgs platform. $::test_platform]
          632  +
          633  +      tputs $channel [appendArgs $::test_platform \n]
          634  +    } else {
          635  +      tputs $channel unknown\n
          636  +    }
          637  +  }
   599    638   
   600    639     proc checkForTestConfiguration { channel } {
   601    640       tputs $channel "---- checking for test configuration... "
   602    641   
   603    642       if {[info exists ::test_configuration] && \
   604    643           [string length $::test_configuration] > 0} then {
   605    644         addConstraint [appendArgs configuration. $::test_configuration]
................................................................................
  1199   1238                 addConstraint [appendArgs mda. $name]
  1200   1239               }
  1201   1240   
  1202   1241               #
  1203   1242               # NOTE: Save the list of managed debugging assistants for
  1204   1243               #       later use by the test suite.
  1205   1244               #
  1206         -            set ::test_mdas $names
         1245  +            if {![info exists ::no(setMdas)]} then {
         1246  +              set ::test_mdas $names
         1247  +            }
  1207   1248   
  1208   1249               #
  1209   1250               # NOTE: Yes, it appears that at least one managed debugging
  1210   1251               #       assistant is enabled.
  1211   1252               #
  1212   1253               tputs $channel [appendArgs "yes (" $names ")\n"]
  1213   1254   
................................................................................
  1394   1435   
  1395   1436           tputs $channel [appendArgs $::eagle_platform(imageRuntimeVersion) \
  1396   1437               " " ( $dotVersion ) \n]
  1397   1438         } else {
  1398   1439           tputs $channel no\n
  1399   1440         }
  1400   1441       }
         1442  +
         1443  +    proc checkForFrameworkVersion { channel } {
         1444  +      tputs $channel "---- checking for framework version... "
         1445  +
         1446  +      if {[info exists ::eagle_platform(frameworkVersion)] && \
         1447  +          [string length $::eagle_platform(frameworkVersion)] > 0} then {
         1448  +        #
         1449  +        # NOTE: Get the major and minor portions of the version only.
         1450  +        #
         1451  +        set dotVersion [join [lrange [split \
         1452  +            $::eagle_platform(frameworkVersion) .] 0 1] .]
         1453  +
         1454  +        #
         1455  +        # NOTE: Now create a version string for use in the constraint name
         1456  +        #       (remove the periods).
         1457  +        #
         1458  +        set version [string map [list . ""] $dotVersion]
         1459  +
         1460  +        #
         1461  +        # NOTE: If the framework version was found, add a test constraint
         1462  +        #       for it now.
         1463  +        #
         1464  +        if {[string length $version] > 0} then {
         1465  +          addConstraint [appendArgs framework $version]
         1466  +        }
         1467  +
         1468  +        tputs $channel [appendArgs $::eagle_platform(frameworkVersion) \
         1469  +            " " ( $dotVersion ) \n]
         1470  +      } else {
         1471  +        tputs $channel no\n
         1472  +      }
         1473  +    }
  1401   1474   
  1402   1475       proc checkForRuntimeVersion { channel } {
  1403   1476         tputs $channel "---- checking for runtime version... "
  1404   1477   
  1405   1478         if {[info exists ::eagle_platform(runtimeVersion)] && \
  1406   1479             [string length $::eagle_platform(runtimeVersion)] > 0} then {
  1407   1480           #
................................................................................
  1413   1486           #
  1414   1487           # NOTE: Now create a version string for use in the constraint name
  1415   1488           #       (remove the periods).
  1416   1489           #
  1417   1490           set version [string map [list . ""] $dotVersion]
  1418   1491   
  1419   1492           if {[isMono]} then {
         1493  +          #
         1494  +          # NOTE: If the runtime version was found, add a test constraint
         1495  +          #       for it now.
         1496  +          #
  1420   1497             if {[string length $version] > 0} then {
  1421   1498                 #
  1422   1499                 # NOTE: We are running on Mono.  Keep track of the specific
  1423   1500                 #       version for usage in test constraints.
  1424   1501                 #
  1425   1502                 addConstraint [appendArgs mono $version]
         1503  +              addConstraint [appendArgs mono $version OrHigher]
  1426   1504             }
  1427   1505   
  1428         -          if {[string length $dotVersion] > 0 && \
  1429         -              [regexp -- {^(\d+)\.(\d+)$} $dotVersion dummy \
  1430         -                  majorVersion minorVersion]} then {
         1506  +          #
         1507  +          # NOTE: Attempt to parse the version into its major and minor
         1508  +          #       components.
         1509  +          #
         1510  +          if {[string length $dotVersion] > 0 && [regexp -- {^(\d+)\.(\d+)$} \
         1511  +              $dotVersion dummy majorVersion minorVersion]} then {
         1512  +            #
         1513  +            # NOTE: This is the list of Mono versions to add test
         1514  +            #       constraints for.
         1515  +            #
  1431   1516               set monoVersions [list]
  1432   1517   
  1433   1518               #
  1434         -            # NOTE: Check for any Mono version 2.x or higher.
         1519  +            # NOTE: Check each Mono version "known" to the test suite.
  1435   1520               #
  1436         -            if {$majorVersion >= 2} then {
         1521  +            foreach monoVersion [getKnownMonoVersions] {
  1437   1522                 #
  1438         -              # NOTE: Check for any Mono version higher than 2.0.
         1523  +              # NOTE: Check for any Mono major version X or higher.
  1439   1524                 #
  1440         -              if {$majorVersion > 2 || $minorVersion > 0} then {
  1441         -                lappend monoVersions 20
  1442         -              }
  1443         -
  1444         -              #
  1445         -              # NOTE: Check for any Mono version higher than 2.2.
  1446         -              #
  1447         -              if {$majorVersion > 2 || $minorVersion > 2} then {
  1448         -                lappend monoVersions 22
  1449         -              }
  1450         -
  1451         -              #
  1452         -              # NOTE: Check for any Mono version higher than 2.4.
  1453         -              #
  1454         -              if {$majorVersion > 2 || $minorVersion > 4} then {
  1455         -                lappend monoVersions 24
  1456         -              }
  1457         -
  1458         -              #
  1459         -              # NOTE: Check for any Mono version higher than 2.6.
  1460         -              #
  1461         -              if {$majorVersion > 2 || $minorVersion > 6} then {
  1462         -                lappend monoVersions 26
  1463         -              }
  1464         -
  1465         -              #
  1466         -              # NOTE: Check for any Mono version higher than 2.8.
  1467         -              #
  1468         -              if {$majorVersion > 2 || $minorVersion > 8} then {
  1469         -                lappend monoVersions 28
  1470         -              }
  1471         -
  1472         -              #
  1473         -              # NOTE: Check for any Mono version higher than 2.10.
  1474         -              #
  1475         -              if {$majorVersion > 2 || $minorVersion > 10} then {
  1476         -                lappend monoVersions 210
  1477         -              }
  1478         -
  1479         -              #
  1480         -              # NOTE: Check for any Mono version higher than 2.11.
  1481         -              #
  1482         -              if {$majorVersion > 2 || $minorVersion > 11} then {
  1483         -                lappend monoVersions 211
  1484         -              }
  1485         -
  1486         -              #
  1487         -              # NOTE: Check for any Mono version higher than 2.12.
  1488         -              #
  1489         -              if {$majorVersion > 2 || $minorVersion > 12} then {
  1490         -                lappend monoVersions 212
         1525  +              if {$majorVersion >= [lindex $monoVersion 0]} then {
         1526  +                #
         1527  +                # NOTE: Check for any Mono major/minor version higher
         1528  +                #       than X.Y.
         1529  +                #
         1530  +                if {$majorVersion > [lindex $monoVersion 0] || \
         1531  +                    $minorVersion > [lindex $monoVersion 1]} then {
         1532  +                  #
         1533  +                  # NOTE: Add this "known" version of Mono.
         1534  +                  #
         1535  +                  lappend monoVersions $monoVersion
         1536  +                }
  1491   1537                 }
  1492   1538               }
  1493   1539   
  1494   1540               #
  1495         -            # NOTE: Check for any Mono version 3.x or higher.
  1496         -            #
  1497         -            if {$majorVersion >= 3} then {
  1498         -              #
  1499         -              # NOTE: Check for any Mono version higher than 3.0.
  1500         -              #
  1501         -              if {$majorVersion > 3 || $minorVersion > 0} then {
  1502         -                lappend monoVersions 30
  1503         -              }
  1504         -            }
  1505         -
  1506         -            #
  1507         -            # NOTE: Add the necessary constraints for each version of Mono we
  1508         -            #       should NOT skip bugs for.
         1541  +            # NOTE: Add the necessary constraints for each version of Mono
         1542  +            #       we should NOT skip bugs for.
  1509   1543               #
  1510   1544               foreach monoVersion $monoVersions {
  1511         -              addConstraint [appendArgs monoToDo $monoVersion]
  1512         -              addConstraint [appendArgs monoBug $monoVersion]
  1513         -              addConstraint [appendArgs monoCrash $monoVersion]
         1545  +              set constraintVersion [join $monoVersion ""]
         1546  +
         1547  +              addConstraint [appendArgs mono $constraintVersion OrHigher]
         1548  +              addConstraint [appendArgs monoToDo $constraintVersion]
         1549  +              addConstraint [appendArgs monoBug $constraintVersion]
         1550  +              addConstraint [appendArgs monoCrash $constraintVersion]
  1514   1551               }
  1515   1552             }
  1516   1553           } else {
         1554  +          #
         1555  +          # NOTE: If the runtime version was found, add a test constraint
         1556  +          #       for it now.
         1557  +          #
  1517   1558             if {[string length $version] > 0} then {
  1518   1559               #
  1519   1560               # NOTE: We are running on the .NET Framework.  Keep track of the
  1520   1561               #       specific version for usage in test constraints.
  1521   1562               #
  1522   1563               addConstraint [appendArgs dotNet $version]
         1564  +            addConstraint [appendArgs dotNet $version OrHigher]
  1523   1565             }
  1524   1566   
  1525   1567             #
  1526   1568             # NOTE: We do not want to skip any Mono bugs on .NET.  Add the
  1527   1569             #       necessary constraints for each version of Mono we know
  1528   1570             #       about.
  1529   1571             #
  1530         -          foreach monoVersion [list 20 22 24 26 28 210 211 212 30] {
  1531         -            addConstraint [appendArgs monoToDo $monoVersion]
  1532         -            addConstraint [appendArgs monoBug $monoVersion]
  1533         -            addConstraint [appendArgs monoCrash $monoVersion]
         1572  +          foreach monoVersion [getKnownMonoVersions] {
         1573  +            set constraintVersion [join $monoVersion ""]
         1574  +
         1575  +            addConstraint [appendArgs monoToDo $constraintVersion]
         1576  +            addConstraint [appendArgs monoBug $constraintVersion]
         1577  +            addConstraint [appendArgs monoCrash $constraintVersion]
  1534   1578             }
  1535   1579           }
  1536   1580   
  1537   1581           tputs $channel [appendArgs $::eagle_platform(runtimeVersion) \
  1538   1582               " " ( $dotVersion ) \n]
  1539   1583         } else {
  1540   1584           tputs $channel no\n
................................................................................
  2127   2171             #
  2128   2172             addConstraint wix
  2129   2173   
  2130   2174             #
  2131   2175             # NOTE: Save the directory for later usage by
  2132   2176             #       the test itself.
  2133   2177             #
  2134         -          set ::test_wix $directory
         2178  +          if {![info exists ::no(setWix)]} then {
         2179  +            set ::test_wix $directory
         2180  +          }
  2135   2181   
  2136   2182             #
  2137   2183             # NOTE: Show where we found it.
  2138   2184             #
  2139   2185             tputs $channel [appendArgs "yes (" $version ", via " $where ", \"" \
  2140   2186                 $directory "\")\n"]
  2141   2187   
................................................................................
  2144   2190             #
  2145   2191             return
  2146   2192           }
  2147   2193         }
  2148   2194   
  2149   2195         tputs $channel no\n
  2150   2196       }
         2197  +
         2198  +    proc checkForTargetFramework { channel } {
         2199  +      tputs $channel "---- checking for target framework... "
         2200  +
         2201  +      if {[info exists ::eagle_platform(targetFramework)] && \
         2202  +          [string length $::eagle_platform(targetFramework)] > 0} then {
         2203  +        #
         2204  +        # NOTE: Now create a string for use in the constraint name (remove
         2205  +        #       the invalid characters).  For example:
         2206  +        #
         2207  +        #       ".NETFramework,Version=v2.0" --> "NETFramework.Version.v2.0"
         2208  +        #
         2209  +        set targetFramework [string trimleft [string map [list , . = .] \
         2210  +            $::eagle_platform(targetFramework)] .]
         2211  +
         2212  +        #
         2213  +        # NOTE: Keep track of the specific target framework for usage in test
         2214  +        #       constraints.
         2215  +        #
         2216  +        addConstraint [appendArgs targetFramework. $targetFramework]
         2217  +
         2218  +        tputs $channel [appendArgs $::eagle_platform(targetFramework) \
         2219  +            " " ( $targetFramework ) \n]
         2220  +      } else {
         2221  +        tputs $channel no\n
         2222  +      }
         2223  +    }
  2151   2224   
  2152   2225       proc checkForNetFx45 { channel } {
  2153   2226         tputs $channel "---- checking for .NET Framework 4.5... "
  2154   2227   
  2155   2228         #
  2156   2229         # NOTE: Platform must be Windows for this constraint to even be
  2157   2230         #       checked (i.e. we require the registry).
................................................................................
  2247   2320               #
  2248   2321               lappend visualStudioVersions [lindex $version 1]
  2249   2322   
  2250   2323               #
  2251   2324               # NOTE: Save the directory for later usage by
  2252   2325               #       the test itself.
  2253   2326               #
  2254         -            set ::test_visual_studio [file dirname $fileName]
         2327  +            if {![info exists ::no(setVisualStudio)]} then {
         2328  +              set ::test_visual_studio [file dirname $fileName]
         2329  +            }
  2255   2330             }
  2256   2331           }
  2257   2332         }
  2258   2333   
  2259   2334         if {[llength $visualStudioVersions] > 0} then {
  2260   2335           #
  2261   2336           # NOTE: Show where we found the latest version.
................................................................................
  2370   2445       ############################# BEGIN Tcl ONLY ##############################
  2371   2446       ###########################################################################
  2372   2447   
  2373   2448       #
  2374   2449       # NOTE: We need several of our test constraint related commands in the
  2375   2450       #       global namespace.
  2376   2451       #
  2377         -    exportAndImportPackageCommands [namespace current] [list checkForPlatform \
  2378         -        checkForEagle checkForGaruda checkForShell checkForDebug checkForTk \
  2379         -        checkForVersion checkForCommand checkForFile checkForNativeCode \
  2380         -        checkForTip127 checkForTip194 checkForTip241 checkForTip285 \
  2381         -        checkForTip405 checkForPerformance checkForTiming checkForInteractive \
  2382         -        checkForSymbols checkForLogFile checkForNetwork checkForCompileOption \
  2383         -        checkForInteractiveCommand checkForWindowsCommandProcessor \
  2384         -        checkForUserInteraction checkForTclOptions checkForTestConfiguration \
  2385         -        checkForTestSuffix checkForVariable checkForScriptLibrary \
  2386         -        checkForStackIntensive checkForFossil] false false
         2452  +    exportAndImportPackageCommands [namespace current] [list \
         2453  +        getKnownMonoVersions checkForPlatform checkForScriptLibrary \
         2454  +        checkForVariable checkForTclOptions checkForWindowsCommandProcessor \
         2455  +        checkForFossil checkForEagle checkForSymbols checkForLogFile \
         2456  +        checkForGaruda checkForShell checkForDebug checkForTk checkForVersion \
         2457  +        checkForCommand checkForTestMachine checkForTestPlatform \
         2458  +        checkForTestConfiguration checkForTestSuffix checkForFile \
         2459  +        checkForPathFile checkForNativeCode checkForTip127 checkForTip194 \
         2460  +        checkForTip241 checkForTip285 checkForTip405 checkForTiming \
         2461  +        checkForPerformance checkForStackIntensive checkForInteractive \
         2462  +        checkForInteractiveCommand checkForUserInteraction checkForNetwork \
         2463  +        checkForCompileOption] false false
  2387   2464   
  2388   2465       ###########################################################################
  2389   2466       ############################## END Tcl ONLY ###############################
  2390   2467       ###########################################################################
  2391   2468     }
  2392   2469   
  2393   2470     #
  2394   2471     # NOTE: Provide the Eagle test constraints package to the interpreter.
  2395   2472     #
  2396   2473     package provide Eagle.Test.Constraints \
  2397   2474       [expr {[isEagle] ? [info engine PatchLevel] : "1.0"}]
  2398   2475   }
  2399   2476   

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

   236    236     }
   237    237   
   238    238     #############################################################################
   239    239   
   240    240     #
   241    241     # NOTE: If command line arguments were supplied, process them now.
   242    242     #
          243  +  set test_flags(-machine) ""; # machine architecture, default to empty.
          244  +  set test_flags(-platform) ""; # build platform, default to empty.
   243    245     set test_flags(-configuration) ""; # build configuration, default to empty.
   244    246     set test_flags(-suffix) ""; # build suffix, default to empty.
   245    247     set test_flags(-file) [list *.eagle]; # default to running all test files.
   246    248     set test_flags(-notFile) [list l.*.eagle]; # COMPAT: Tcl.
   247    249     set test_flags(-match) [list *]; # default to running all tests.
   248    250     set test_flags(-skip) [list]; # default to skipping no tests.
   249    251     set test_flags(-constraints) [list]; # default to no manual constraints.
................................................................................
   322    324           [string length $test_flags(-postTest)] > 0} then {
   323    325         #
   324    326         # NOTE: Set the pre-test script to the one provided by the command line.
   325    327         #
   326    328         set test_script(post) $test_flags(-postTest)
   327    329       }
   328    330     }
          331  +
          332  +  #
          333  +  # NOTE: Set the default test machine (e.g. amd64, intel, etc), if necessary.
          334  +  #
          335  +  if {![info exists test_machine]} then {
          336  +    set test_machine [expr {[info exists tcl_platform(machine)] ? \
          337  +        $tcl_platform(machine) : ""}]
          338  +  }
          339  +
          340  +  #
          341  +  # NOTE: Set the default test platform (e.g. x86, x64, etc), if necessary.
          342  +  #
          343  +  if {![info exists test_platform]} then {
          344  +    set test_platform [machineToPlatform $test_machine true]
          345  +  }
   329    346   
   330    347     #
   331    348     # NOTE: Set the default test configuration (i.e. Debug or Release), if
   332    349     #       necessary.
   333    350     #
   334    351     if {![info exists test_configuration]} then {
   335    352       set test_configuration [getPlatformInfo configuration Release]
................................................................................
   440    457         [getTestRunId] \n]
   441    458   
   442    459     tputs $test_channel [appendArgs "---- processId: " \
   443    460         [pid] \n]
   444    461   
   445    462     tputs $test_channel [appendArgs "---- test channel: " \
   446    463         $test_channel \n]
          464  +
          465  +  tputs $test_channel [appendArgs "---- test machine: " \
          466  +      [expr {[info exists test_machine] ? \
          467  +          $test_machine : "<none>"}] \n]
          468  +
          469  +  tputs $test_channel [appendArgs "---- test platform: " \
          470  +      [expr {[info exists test_platform] ? \
          471  +          $test_platform : "<none>"}] \n]
   447    472   
   448    473     tputs $test_channel [appendArgs "---- test configuration: " \
   449    474         [expr {[info exists test_configuration] ? \
   450    475             $test_configuration : "<none>"}] \n]
   451    476   
   452    477     tputs $test_channel [appendArgs "---- test suffix: " \
   453    478         [expr {[info exists test_suffix] ? \
................................................................................
   681    706       #       checking [nearly] first as it may skip other constraints.
   682    707       #
   683    708       if {![info exists no(runtime)]} then {
   684    709         checkForRuntime $test_channel
   685    710       }
   686    711   
   687    712       #
   688         -    # NOTE: Check the runtime version (i.e. what version of the runtime
   689         -    #       are we currently running on?).
          713  +    # NOTE: Check the variant and/or version of the CLR that we are
          714  +    #       currently running on.
   690    715       #
   691    716       if {![info exists no(runtimeVersion)]} then {
   692    717         checkForRuntimeVersion $test_channel
   693    718       }
   694    719   
   695    720       #
   696         -    # NOTE: Check the image runtime version (i.e. what version of the
   697         -    #       runtime was this assembly compiled against?).
          721  +    # NOTE: Check the framework version (i.e. regardless of runtime) that
          722  +    #       we are currently running on.
          723  +    #
          724  +    if {![info exists no(frameworkVersion)]} then {
          725  +      checkForFrameworkVersion $test_channel
          726  +    }
          727  +
          728  +    #
          729  +    # NOTE: Check the image runtime version (i.e. the runtime version that
          730  +    #       this assembly compiled against).
   698    731       #
   699    732       if {![info exists no(imageRuntimeVersion)]} then {
   700    733         checkForImageRuntimeVersion $test_channel
   701    734       }
   702    735   
   703    736       #
   704    737       # NOTE: Has machine detection support been disabled?
................................................................................
  1367   1400   
  1368   1401           #
  1369   1402           # NOTE: For test "object-4.1".
  1370   1403           #
  1371   1404           checkForObjectMember $test_channel Eagle._Tests.Default \
  1372   1405               *TestExpr*
  1373   1406   
         1407  +        #
         1408  +        # NOTE: For test "array-4.1".
         1409  +        #
         1410  +        checkForObjectMember $test_channel Eagle._Tests.Default \
         1411  +            *TestTwoByteArrays*
         1412  +
         1413  +        checkForObjectMember $test_channel Eagle._Tests.Default \
         1414  +            *TestReturnByteArray*
         1415  +
  1374   1416           #
  1375   1417           # NOTE: For test "object-7.1".
  1376   1418           #
  1377   1419           checkForObjectMember $test_channel Eagle._Tests.Default \
  1378   1420               *TestByRefValueTypeMethod*
  1379   1421   
  1380   1422           checkForObjectMember $test_channel Eagle._Tests.Default \
................................................................................
  1521   1563       if {![info exists no(netFx45)]} then {
  1522   1564         #
  1523   1565         # NOTE: For test "object-12.1.*".
  1524   1566         #
  1525   1567         checkForNetFx45 $test_channel
  1526   1568       }
  1527   1569   
         1570  +    #
         1571  +    # NOTE: Has target framework testing support been disabled?
         1572  +    #
         1573  +    if {![info exists no(targetFramework)]} then {
         1574  +      checkForTargetFramework $test_channel
         1575  +    }
         1576  +
  1528   1577       #
  1529   1578       # NOTE: Has Visual Studio testing support been disabled?
  1530   1579       #
  1531   1580       if {![info exists no(visualStudio)]} then {
  1532   1581         checkForVisualStudio $test_channel
  1533   1582       }
  1534   1583   
................................................................................
  1661   1710   
  1662   1711     #############################################################################
  1663   1712     ####################### BEGIN Tcl & Eagle Constraints #######################
  1664   1713     #############################################################################
  1665   1714   
  1666   1715     tputs $test_channel [appendArgs \
  1667   1716         "---- start of common (Tcl & Eagle) test constraints...\n"]
         1717  +
         1718  +  #
         1719  +  # NOTE: Has checking for the test machine been disabled?
         1720  +  #
         1721  +  if {![info exists no(testMachine)]} then {
         1722  +    checkForTestMachine $test_channel
         1723  +  }
         1724  +
         1725  +  #
         1726  +  # NOTE: Has checking for the test platform been disabled?
         1727  +  #
         1728  +  if {![info exists no(testPlatform)]} then {
         1729  +    checkForTestPlatform $test_channel
         1730  +  }
  1668   1731   
  1669   1732     #
  1670   1733     # NOTE: Has checking for the test configuration been disabled?
  1671   1734     #
  1672   1735     if {![info exists no(testConfiguration)]} then {
  1673   1736       checkForTestConfiguration $test_channel
  1674   1737     }
................................................................................
  1854   1917       if {![info exists no(sqlite3.dll)]} then {
  1855   1918         checkForFile $test_channel [file join $bin_path sqlite3.dll]
  1856   1919   
  1857   1920         #
  1858   1921         # NOTE: Did we manage to find the native SQLite library?  If not, do we
  1859   1922         #       at least know the machine type?
  1860   1923         #
  1861         -      if {![haveConstraint file_sqlite3.dll] && \
  1862         -          [info exists tcl_platform(machine)]} then {
         1924  +      if {![haveConstraint file_sqlite3.dll]} then {
  1863   1925           #
  1864   1926           # NOTE: Ok, now try to check for the machine specific native SQLite
  1865   1927           #       library.
  1866   1928           #
  1867   1929           checkForFile $test_channel [file join $bin_path [machineToPlatform \
  1868         -            $tcl_platform(machine) true] sqlite3.dll]
         1930  +            $test_machine true] sqlite3.dll]
  1869   1931   
  1870   1932           #
  1871   1933           # NOTE: Did we manage to find the native SQLite library yet?
  1872   1934           #
  1873   1935           if {![haveConstraint file_sqlite3.dll]} then {
  1874   1936             #
  1875   1937             # NOTE: Ok, now try to check for the platform specific native SQLite
  1876   1938             #       library.
  1877   1939             #
  1878   1940             checkForFile $test_channel [file join $bin_path [machineToPlatform \
  1879         -              $tcl_platform(machine) false] sqlite3.dll]
         1941  +              $test_machine false] sqlite3.dll]
  1880   1942           }
  1881   1943         }
  1882   1944       }
  1883   1945   
  1884   1946       if {![info exists no(System.Data.SQLite.dll)]} then {
  1885   1947         checkForFile $test_channel [file join $bin_path System.Data.SQLite.dll]
  1886   1948       }
................................................................................
  2220   2282           [formatList [getPlatformInfo compileOptions <none>]] \n]
  2221   2283   
  2222   2284       tputs $test_channel [appendArgs "---- strongName: " \
  2223   2285           [getPlatformInfo strongName <none>] \n]
  2224   2286   
  2225   2287       tputs $test_channel [appendArgs "---- certificate: " \
  2226   2288           [getPlatformInfo certificate <none>] \n]
         2289  +
         2290  +    tputs $test_channel [appendArgs "---- targetFramework: " \
         2291  +        [getPlatformInfo targetFramework <none>] \n]
  2227   2292     }
  2228   2293   
  2229   2294     #
  2230   2295     # NOTE: Show the current test file name, if any.
  2231   2296     #
  2232   2297     tputs $test_channel [appendArgs "---- test file: " \
  2233   2298         [expr {[info exists test_file] && [string length $test_file] > 0 ? \

Changes to Tests/common.eagle.

    85     85               # NOTE: Use the default test year for the CLR v2.0.
    86     86               #
    87     87               return 2008; # TODO: Good "fallback" default?
    88     88             }
    89     89           }
    90     90         }
    91     91       }
           92  +
           93  +    proc getBuildYears {} {
           94  +      #
           95  +      # NOTE: See if the list of test years has been overridden by the user
           96  +      #       (e.g. on the command line).
           97  +      #
           98  +      if {[info exists ::test_years] && [llength $::test_years] > 0} then {
           99  +        #
          100  +        # NOTE: Use the specified list of test years.
          101  +        #
          102  +        return $::test_years
          103  +      } else {
          104  +        #
          105  +        # NOTE: Use the default list of test years.
          106  +        #
          107  +        return [list 2005 2008 2010 2012]
          108  +      }
          109  +    }
          110  +
          111  +    proc getBuildPlatform { native } {
          112  +      if {[info exists ::test_platform] && \
          113  +          [string length $::test_platform] > 0} then {
          114  +        #
          115  +        # NOTE: Use the specified test platform.  If this variable is not set,
          116  +        #       the default value will be based on the machine architecture.
          117  +        #
          118  +        return [expr {$native ? $::test_platform : ""}]
          119  +      } elseif {[info exists ::test_machine] && \
          120  +          [string length $::test_machine] > 0} then {
          121  +        #
          122  +        # NOTE: For native builds, return the platform name corresponding to
          123  +        #       the test machine architecture; otherwise, return an empty
          124  +        #       string.
          125  +        #
          126  +        return [expr {$native ? [machineToPlatform $::test_machine] : ""}]
          127  +      } elseif {[info exists ::tcl_platform(machine)]} then {
          128  +        #
          129  +        # NOTE: For native builds, return the platform name corresponding to
          130  +        #       the machine architecture; otherwise, return an empty string.
          131  +        #
          132  +        return [expr {$native ? \
          133  +            [machineToPlatform $::tcl_platform(machine)] : ""}]
          134  +      } else {
          135  +        #
          136  +        # NOTE: No machine architecture is available, return an empty string.
          137  +        #
          138  +        return ""
          139  +      }
          140  +    }
    92    141   
    93    142       proc getBuildConfiguration {} {
    94    143         #
    95    144         # NOTE: See if the "configuration" setting has been overridden by the user
    96    145         #       (e.g. on the command line).  This helps control exactly which set
    97    146         #       of binaries we are testing (i.e. those built in the "Debug" or
    98    147         #       "Release" build configurations).  To override this value via the
................................................................................
   121    170           #       test configuration variable is always set by the test suite
   122    171           #       itself; however, it can be overridden using the unset command
   123    172           #       from the -preTest option to the test suite.
   124    173           #
   125    174           return $::eagle_platform(configuration)
   126    175         }
   127    176       }
          177  +
          178  +    proc getBuildConfigurations {} {
          179  +      #
          180  +      # NOTE: See if the list of test configurations has been overridden by
          181  +      #       the user (e.g. on the command line).
          182  +      #
          183  +      if {[info exists ::test_configurations] && \
          184  +          [llength $::test_configurations] > 0} then {
          185  +        #
          186  +        # NOTE: Use the specified list of test configurations.
          187  +        #
          188  +        return $::test_configurations
          189  +      } else {
          190  +        #
          191  +        # NOTE: Use the default list of test configurations.
          192  +        #
          193  +        return [list Debug Release]
          194  +      }
          195  +    }
          196  +
          197  +    proc getBuildBaseDirectory {} {
          198  +      #
          199  +      # NOTE: Figure out the base directory where all the builds should be
          200  +      #       located.  This will be the directory that contains the actual
          201  +      #       build output directory (e.g. parent of "bin").
          202  +      #
          203  +      if {[info exists ::build_base_directory] && \
          204  +          [string length $::build_base_directory] > 0} then {
          205  +        #
          206  +        # NOTE: The location of the build base directory has been overridden;
          207  +        #       therefore, use it verbatim.
          208  +        #
          209  +        set path $::build_base_directory
          210  +      } elseif {[info exists ::common_directory] && \
          211  +          [string length $::common_directory] > 0} then {
          212  +        #
          213  +        # NOTE: Next, fallback to the parent directory of the one containing
          214  +        #       this file (i.e. "common.eagle"), if available.
          215  +        #
          216  +        set path [file dirname $::common_directory]
          217  +      } else {
          218  +        #
          219  +        # NOTE: Finally, fallback to the parent directory of the EagleTest
          220  +        #       path.  The EagleTest package guarantees that this variable
          221  +        #       will be set to the directory containing the first file to
          222  +        #       execute the [runTestPrologue] script library procedure.
          223  +        #
          224  +        set path [file dirname $::path]
          225  +      }
          226  +    }
          227  +
          228  +    proc joinBuildDirectory { path native year platform configuration } {
          229  +      #
          230  +      # NOTE: Figure out and then return the fully qualified path to the build
          231  +      #       directory based on all the arguments provided by our caller.
          232  +      #
          233  +      if {$native} then {
          234  +        return [file join $path bin $year $platform $configuration]
          235  +      } else {
          236  +        return [file join $path bin $year $configuration bin]
          237  +      }
          238  +    }
   128    239   
   129    240       proc getBuildDirectory {} {
   130    241         #
   131    242         # NOTE: See if the "native" runtime option has been set.  If so, use the
   132    243         #       directory for the mixed-mode assembly (a.k.a. the native interop
   133    244         #       assembly).  To enable this option via the command line, enter a
   134    245         #       command similar to one of the following (all on one line):
................................................................................
   148    259             [string length $::build_directory] > 0} then {
   149    260           #
   150    261           # NOTE: The location of the build directory has been overridden;
   151    262           #       therefore, use it verbatim.
   152    263           #
   153    264           return $::build_directory
   154    265         } else {
   155         -        #
   156         -        # NOTE: Figure out the build base directory.  This will be the directory
   157         -        #       that contains the actual build output directory (e.g. "bin").
   158         -        #
   159         -        if {[info exists ::build_base_directory] && \
   160         -            [string length $::build_base_directory] > 0} then {
   161         -          #
   162         -          # NOTE: The location of the build base directory has been overridden;
   163         -          #       therefore, use it verbatim.
   164         -          #
   165         -          set path $::build_base_directory
   166         -        } elseif {[info exists ::common_directory] && \
   167         -            [string length $::common_directory] > 0} then {
   168         -          #
   169         -          # NOTE: Next, fallback to the parent directory of the one containing
   170         -          #       this file (i.e. "common.eagle"), if available.
   171         -          #
   172         -          set path [file dirname $::common_directory]
   173         -        } else {
   174         -          #
   175         -          # NOTE: Finally, fallback to the parent directory of the EagleTest
   176         -          #       path.  The EagleTest package guarantees that this variable
   177         -          #       will be set to the directory containing the first file to
   178         -          #       execute the [runTestPrologue] script library procedure.
   179         -          #
   180         -          set path [file dirname $::path]
   181         -        }
   182         -
   183    266           #
   184    267           # NOTE: If the "native" runtime option is set, the mixed-mode assembly
   185    268           #       is being tested.  In that case, the path to the build directory
   186    269           #       will contain the platform name and all the binaries under test
   187    270           #       should be present in that directory.  If the "native" runtime
   188    271           #       option is not set, the build directory will be considered to be
   189    272           #       "platform-neutral", with the notable exception of any native
................................................................................
   216    299           #
   217    300           #       Note that all of the build commands above will default to using
   218    301           #       the latest version of MSBuild available and the "test_year" may
   219    302           #       need to be adjusted accordingly to actually run the test suite.
   220    303           #       Refer to the comments in [getBuildYear] for more information on
   221    304           #       how to set this variable.
   222    305           #
   223         -        if {[hasRuntimeOption native]} then {
   224         -          return [file join $path bin [getBuildYear] [machineToPlatform \
   225         -              $::tcl_platform(machine)] [getBuildConfiguration]]
   226         -        } else {
   227         -          return [file join $path bin [getBuildYear] [getBuildConfiguration] \
   228         -              bin]
   229         -        }
          306  +        set native [hasRuntimeOption native]
          307  +
          308  +        return [joinBuildDirectory [getBuildBaseDirectory] $native \
          309  +            [getBuildYear] [getBuildPlatform $native] [getBuildConfiguration]]
   230    310         }
   231    311       }
   232    312   
   233    313       proc getBuildFileName { fileName } {
   234    314         #
   235    315         # NOTE: Returns the specified file name as if it were located in the
   236    316         #       build directory, discarding any directory information present
................................................................................
   622    702         #       and the [checkForSQLite] procedure has been called to probe for
   623    703         #       the SQLite native library; otherwise, this procedure will simply
   624    704         #       always return zero.
   625    705         #
   626    706         return [expr {[haveConstraint System.Data.SQLite] && \
   627    707             [haveConstraint SQLite]}]
   628    708       }
          709  +
          710  +    proc checkForSQLiteBuilds { channel } {
          711  +      #
          712  +      # NOTE: Check for every possible valid combination of values used when
          713  +      #       locating out the build output directory, showing each available
          714  +      #       build variation along the way.
          715  +      #
          716  +      foreach native [list false true] {
          717  +        foreach year [getBuildYears] {
          718  +          foreach configuration [getBuildConfigurations] {
          719  +            tputs $channel [appendArgs \
          720  +                "---- checking for System.Data.SQLite build \"" [expr \
          721  +                {$native ? "native/" : ""}] $year / $configuration "\"... "]
          722  +
          723  +            set fileName [file nativename [file join [joinBuildDirectory \
          724  +                [getBuildBaseDirectory] $native $year [getBuildPlatform \
          725  +                $native] $configuration] System.Data.SQLite.dll]]
          726  +
          727  +            if {[file exists $fileName]} then {
          728  +              tputs $channel yes\n
          729  +            } else {
          730  +              tputs $channel no\n
          731  +            }
          732  +          }
          733  +        }
          734  +      }
          735  +    }
   629    736   
   630    737       proc checkForSQLite { channel } {
   631    738         tputs $channel "---- checking for core SQLite library... "
   632    739   
   633    740         if {[catch {
   634    741                 object invoke -flags +NonPublic System.Data.SQLite.SQLite3 \
   635    742                 SQLiteVersion} version] == 0} then {
................................................................................
  1729   1836               tputs $::test_channel [appendArgs [formatList [lsort \
  1730   1837                   $defineConstants]] \n]
  1731   1838             } else {
  1732   1839               tputs $::test_channel unknown\n
  1733   1840             }
  1734   1841           }
  1735   1842   
         1843  +        #
         1844  +        # NOTE: Check the available builds of SQLite and System.Data.SQLite.
         1845  +        #
         1846  +        checkForSQLiteBuilds $::test_channel
         1847  +
  1736   1848           #
  1737   1849           # NOTE: Now, we need to know if the SQLite core library is available
  1738   1850           #       (i.e. because the managed-only System.Data.SQLite assembly can
  1739   1851           #       load without it; however, it cannot do anything useful without
  1740   1852           #       it).  If we are using the mixed-mode assembly and we already
  1741   1853           #       found it (above), this should always succeed.
  1742   1854           #