Index: Externals/Eagle/lib/Eagle1.0/vendor.eagle ================================================================== --- Externals/Eagle/lib/Eagle1.0/vendor.eagle +++ Externals/Eagle/lib/Eagle1.0/vendor.eagle @@ -160,11 +160,12 @@ # NOTE: Check for any overridden settings that may have been specified via # the command line, etc. # checkForTestOverrides stdout [list binary_directory build_base_directory \ build_directory common_directory connection_flags database_directory \ - datetime_format test_configuration test_year vendor_directory] false + datetime_format test_configuration test_year test_year_netFx20 \ + test_year_netFx40 vendor_directory] false # # NOTE: This variable will contain the name of the directory containing the # vendor-specific testing infrastructure. If the variable does not # already exist, create it; otherwise, it has been overridden and the Index: Tests/common.eagle ================================================================== --- Tests/common.eagle +++ Tests/common.eagle @@ -21,22 +21,25 @@ proc getBuildYear {} { # # NOTE: See if the "year" setting has been overridden by the user (e.g. on # the command line). This helps control exactly which set of # binaries we are testing, those produced using the Visual Studio - # 2005, 2008, or 2010 build systems. To override this value via the - # command line, enter a command similar to one of the following (all - # on one line): + # 2005, 2008, 2010, or 2012 build systems. To override this value + # via the command line, enter a command similar to one of the + # following (all on one line): # # EagleShell.exe -preInitialize "set test_year 2005" # -file .\path\to\all.eagle # # EagleShell.exe -preInitialize "set test_year 2008" # -file .\path\to\all.eagle # # EagleShell.exe -preInitialize "set test_year 2010" # -file .\path\to\all.eagle + # + # EagleShell.exe -preInitialize "set test_year 2012" + # -file .\path\to\all.eagle # # EagleShell.exe -preInitialize "unset -nocomplain test_year" # -file .\path\to\all.eagle # if {[info exists ::test_year] && [string length $::test_year] > 0} then { @@ -47,16 +50,45 @@ # return $::test_year } else { # # NOTE: If Eagle has been compiled against the .NET Framework 4.0, use - # "2010" as the test year; otherwise, use "2008" (we could use + # "2010" by default (we could use "2012" in that case as well) as + # the test year; otherwise, use "2008" by default (we could use # "2005" in that case as well). If another major [incompatible] # version of the .NET Framework is released, this check will have - # to be changed. + # to be changed. The default test year to use for a particular + # .NET Framework version may be overridden using another global + # variable (i.e. test_year_netFxYZ). # - return [expr {[haveConstraint imageRuntime40] ? "2010" : "2008"}] + if {[haveConstraint imageRuntime40]} then { + if {[info exists ::test_year_netFx40] && \ + [string length $::test_year_netFx40] > 0} then { + # + # NOTE: Use the specified test year for the .NET Framework 4.0. + # + return $::test_year_netFx40 + } else { + # + # NOTE: Use the default test year for the .NET Framework 4.0. + # + return 2010 + } + } else { + if {[info exists ::test_year_netFx20] && \ + [string length $::test_year_netFx20] > 0} then { + # + # NOTE: Use the specified test year for the .NET Framework 2.0. + # + return $::test_year_netFx20 + } else { + # + # NOTE: Use the default test year for the .NET Framework 2.0. + # + return 2008 + } + } } } proc getBuildConfiguration {} { # Index: Tests/installer.eagle ================================================================== --- Tests/installer.eagle +++ Tests/installer.eagle @@ -38,19 +38,25 @@ set testInstallVs2008LogFile [file nativename [file join $path \ Installer_Test_Vs2008.log]] set testInstallVs2010LogFile [file nativename [file join $path \ Installer_Test_Vs2010.log]] + +set testInstallVs2012LogFile [file nativename [file join $path \ + Installer_Test_Vs2012.log]] set testUninstallVs2005LogFile [file nativename [file join $path \ Uninstaller_Test_Vs2005.log]] set testUninstallVs2008LogFile [file nativename [file join $path \ Uninstaller_Test_Vs2008.log]] set testUninstallVs2010LogFile [file nativename [file join $path \ Uninstaller_Test_Vs2010.log]] + +set testUninstallVs2012LogFile [file nativename [file join $path \ + Uninstaller_Test_Vs2012.log]] # # NOTE: Setup the test constraints specific to the tests in this file. # if {![haveConstraint [appendArgs file_ \ @@ -80,10 +86,15 @@ if {![haveConstraint [appendArgs file_ \ [file tail $testInstallVs2010LogFile]]]} then { checkForFile $test_channel $testInstallVs2010LogFile } + +if {![haveConstraint [appendArgs file_ \ + [file tail $testInstallVs2012LogFile]]]} then { + checkForFile $test_channel $testInstallVs2012LogFile +} if {![haveConstraint [appendArgs file_ \ [file tail $testUninstallVs2005LogFile]]]} then { checkForFile $test_channel $testUninstallVs2005LogFile } @@ -95,10 +106,15 @@ if {![haveConstraint [appendArgs file_ \ [file tail $testUninstallVs2010LogFile]]]} then { checkForFile $test_channel $testUninstallVs2010LogFile } + +if {![haveConstraint [appendArgs file_ \ + [file tail $testUninstallVs2012LogFile]]]} then { + checkForFile $test_channel $testUninstallVs2012LogFile +} ############################################################################### runTest {test installer-1.1 {installer tool / Visual Studio 2005} -setup { set fileName [file join [getTemporaryPath] [file tail [string map [list \ @@ -110,13 +126,13 @@ set code [catch { testClrExec $installerExeFile [list -eventflags Wait -stdout output \ -success 0] -debugPriority Lowest -tracePriority MediumHigh \ -noRuntimeVersion true -noCompact true -noNetFx40 true -noVs2008 true \ - -noVs2010 true -whatIf true -verbose true -confirm true -install true \ - -logFileName [appendArgs \" [file nativename $fileName] \"] \ - -traceFormat [appendArgs \" "#{0}: {2}" \"] -debug true -wow64 true + -noVs2010 true -noVs2012 true -whatIf true -verbose true -confirm true \ + -install true -logFileName [appendArgs \" [file nativename $fileName] \ + \"] -traceFormat [appendArgs \" "#{0}: {2}" \"] -debug true -wow64 true } error] tlog "---- BEGIN STDOUT OUTPUT\n" tlog $output tlog "\n---- END STDOUT OUTPUT\n" @@ -146,13 +162,13 @@ set code [catch { testClrExec $installerExeFile [list -eventflags Wait -stdout output \ -success 0] -debugPriority Lowest -tracePriority MediumHigh \ -noRuntimeVersion true -noCompact true -noNetFx40 true -noVs2008 true \ - -noVs2010 true -whatIf true -verbose true -confirm true -install false \ - -logFileName [appendArgs \" [file nativename $fileName] \"] \ - -traceFormat [appendArgs \" "#{0}: {2}" \"] -debug true -wow64 true + -noVs2010 true -noVs2012 true -whatIf true -verbose true -confirm true \ + -install false -logFileName [appendArgs \" [file nativename $fileName] \ + \"] -traceFormat [appendArgs \" "#{0}: {2}" \"] -debug true -wow64 true } error] tlog "---- BEGIN STDOUT OUTPUT\n" tlog $output tlog "\n---- END STDOUT OUTPUT\n" @@ -182,13 +198,13 @@ set code [catch { testClrExec $installerExeFile [list -eventflags Wait -stdout output \ -success 0] -debugPriority Lowest -tracePriority MediumHigh \ -noRuntimeVersion true -noCompact true -noNetFx40 true -noVs2005 true \ - -noVs2010 true -whatIf true -verbose true -confirm true -install true \ - -logFileName [appendArgs \" [file nativename $fileName] \"] \ - -traceFormat [appendArgs \" "#{0}: {2}" \"] -debug true -wow64 true + -noVs2010 true -noVs2012 true -whatIf true -verbose true -confirm true \ + -install true -logFileName [appendArgs \" [file nativename $fileName] \ + \"] -traceFormat [appendArgs \" "#{0}: {2}" \"] -debug true -wow64 true } error] tlog "---- BEGIN STDOUT OUTPUT\n" tlog $output tlog "\n---- END STDOUT OUTPUT\n" @@ -218,13 +234,13 @@ set code [catch { testClrExec $installerExeFile [list -eventflags Wait -stdout output \ -success 0] -debugPriority Lowest -tracePriority MediumHigh \ -noRuntimeVersion true -noCompact true -noNetFx40 true -noVs2005 true \ - -noVs2010 true -whatIf true -verbose true -confirm true -install false \ - -logFileName [appendArgs \" [file nativename $fileName] \"] \ - -traceFormat [appendArgs \" "#{0}: {2}" \"] -debug true -wow64 true + -noVs2010 true -noVs2012 true -whatIf true -verbose true -confirm true \ + -install false -logFileName [appendArgs \" [file nativename $fileName] \ + \"] -traceFormat [appendArgs \" "#{0}: {2}" \"] -debug true -wow64 true } error] tlog "---- BEGIN STDOUT OUTPUT\n" tlog $output tlog "\n---- END STDOUT OUTPUT\n" @@ -254,13 +270,13 @@ set code [catch { testClrExec $installerExeFile [list -eventflags Wait -stdout output \ -success 0] -debugPriority Lowest -tracePriority MediumHigh \ -noRuntimeVersion true -noCompact true -noNetFx20 true -noVs2005 true \ - -noVs2008 true -whatIf true -verbose true -confirm true -install true \ - -logFileName [appendArgs \" [file nativename $fileName] \"] \ - -traceFormat [appendArgs \" "#{0}: {2}" \"] -debug true -wow64 true + -noVs2008 true -noVs2012 true -whatIf true -verbose true -confirm true \ + -install true -logFileName [appendArgs \" [file nativename $fileName] \ + \"] -traceFormat [appendArgs \" "#{0}: {2}" \"] -debug true -wow64 true } error] tlog "---- BEGIN STDOUT OUTPUT\n" tlog $output tlog "\n---- END STDOUT OUTPUT\n" @@ -290,13 +306,13 @@ set code [catch { testClrExec $installerExeFile [list -eventflags Wait -stdout output \ -success 0] -debugPriority Lowest -tracePriority MediumHigh \ -noRuntimeVersion true -noCompact true -noNetFx20 true -noVs2005 true \ - -noVs2008 true -whatIf true -verbose true -confirm true -install false \ - -logFileName [appendArgs \" [file nativename $fileName] \"] \ - -traceFormat [appendArgs \" "#{0}: {2}" \"] -debug true -wow64 true + -noVs2008 true -noVs2012 true -whatIf true -verbose true -confirm true \ + -install false -logFileName [appendArgs \" [file nativename $fileName] \ + \"] -traceFormat [appendArgs \" "#{0}: {2}" \"] -debug true -wow64 true } error] tlog "---- BEGIN STDOUT OUTPUT\n" tlog $output tlog "\n---- END STDOUT OUTPUT\n" @@ -314,14 +330,87 @@ file_System.Data.SQLite.dll file_System.Data.SQLite.Linq.dll\ file_Uninstaller_Test_Vs2010.log} -result {0 True}} ############################################################################### -unset -nocomplain testUninstallVs2010LogFile testUninstallVs2008LogFile \ - testUninstallVs2005LogFile testInstallVs2010LogFile \ +runTest {test installer-1.7 {installer tool / Visual Studio 2012} -setup { + set fileName [file join [getTemporaryPath] [file tail [string map [list \ + .log [appendArgs _ [pid] .log]] $testInstallVs2012LogFile]]] + + cleanupFile $fileName +} -body { + set output "" + + set code [catch { + testClrExec $installerExeFile [list -eventflags Wait -stdout output \ + -success 0] -debugPriority Lowest -tracePriority MediumHigh \ + -noRuntimeVersion true -noCompact true -noNetFx20 true -noVs2005 true \ + -noVs2008 true -noVs2010 true -whatIf true -verbose true -confirm true \ + -install true -logFileName [appendArgs \" [file nativename $fileName] \ + \"] -traceFormat [appendArgs \" "#{0}: {2}" \"] -debug true -wow64 true + } error] + + tlog "---- BEGIN STDOUT OUTPUT\n" + tlog $output + tlog "\n---- END STDOUT OUTPUT\n" + + set wow64 [expr {[haveConstraint amd64.64bit] ? "\\Wow6432Node" : ""}] + + list $code [expr {$code == 0 ? [string equal [readFile $fileName] \ + [subst -nobackslashes [readFile $testInstallVs2012LogFile]]] : $error}] +} -cleanup { + cleanupFile $fileName + + unset -nocomplain wow64 code output error fileName +} -constraints {eagle administrator visualStudio2012\ +System.Data.SQLite.dll_v4.0.30319 file_Installer.exe\ +file_System.Data.SQLite.dll file_System.Data.SQLite.Linq.dll\ +file_Installer_Test_Vs2012.log} -result {0 True}} + +############################################################################### + +runTest {test installer-1.8 {uninstaller tool / Visual Studio 2012} -setup { + set fileName [file join [getTemporaryPath] [file tail [string map [list \ + .log [appendArgs _ [pid] .log]] $testUninstallVs2012LogFile]]] + + cleanupFile $fileName +} -body { + set output "" + + set code [catch { + testClrExec $installerExeFile [list -eventflags Wait -stdout output \ + -success 0] -debugPriority Lowest -tracePriority MediumHigh \ + -noRuntimeVersion true -noCompact true -noNetFx20 true -noVs2005 true \ + -noVs2008 true -noVs2010 true -whatIf true -verbose true -confirm true \ + -install false -logFileName [appendArgs \" [file nativename $fileName] \ + \"] -traceFormat [appendArgs \" "#{0}: {2}" \"] -debug true -wow64 true + } error] + + tlog "---- BEGIN STDOUT OUTPUT\n" + tlog $output + tlog "\n---- END STDOUT OUTPUT\n" + + set wow64 [expr {[haveConstraint amd64.64bit] ? "\\Wow6432Node" : ""}] + + list $code [expr {$code == 0 ? [string equal [readFile $fileName] \ + [subst -nobackslashes [readFile $testUninstallVs2012LogFile]]] : $error}] +} -cleanup { + cleanupFile $fileName + + unset -nocomplain wow64 code output error fileName +} -constraints {eagle administrator visualStudio2012\ +System.Data.SQLite.dll_v4.0.30319 file_Installer.exe\ +file_System.Data.SQLite.dll file_System.Data.SQLite.Linq.dll\ +file_Uninstaller_Test_Vs2012.log} -result {0 True}} + +############################################################################### + +unset -nocomplain testUninstallVs2012LogFile testUninstallVs2010LogFile \ + testUninstallVs2008LogFile testUninstallVs2005LogFile \ + testInstallVs2012LogFile testInstallVs2010LogFile \ testInstallVs2008LogFile testInstallVs2005LogFile installerExeFile \ systemDataSQLiteLinqDllFile systemDataSQLiteDllFile ############################################################################### runSQLiteTestEpilogue runTestEpilogue Index: Tests/tkt-2ce0870fad.eagle ================================================================== --- Tests/tkt-2ce0870fad.eagle +++ Tests/tkt-2ce0870fad.eagle @@ -42,10 +42,12 @@ # NOTE: Keep track of whether or not the global test year and configuration # variables already exist in the primary application domain before the # test. If not, we will need to unset them after the test. # set hadTestYear {[info exists ::test_year]} + set hadTestYearNetFx20 {[info exists ::test_year_netFx20]} + set hadTestYearNetFx40 {[info exists ::test_year_netFx40]} set hadTestConfiguration {[info exists ::test_configuration]} }] -body { set appDomainId(3) [object invoke AppDomain.CurrentDomain Id] package require Eagle.Library @@ -64,10 +66,18 @@ cleanupDb $fileName if {!$hadTestConfiguration} then { unset -nocomplain ::test_configuration } + + if {!$hadTestYearNetFx40} then { + unset -nocomplain ::test_year_netFx40 + } + + if {!$hadTestYearNetFx20} then { + unset -nocomplain ::test_year_netFx20 + } if {!$hadTestYear} then { unset -nocomplain ::test_year } Index: tools/install/Installer.cs ================================================================== --- tools/install/Installer.cs +++ tools/install/Installer.cs @@ -1778,10 +1778,11 @@ bool noNetFx20, bool noNetFx40, bool noVs2005, bool noVs2008, bool noVs2010, + bool noVs2012, bool noTrace, bool noConsole, bool noLog, bool throwOnMissing, bool whatIf, @@ -1809,10 +1810,11 @@ this.noNetFx20 = noNetFx20; this.noNetFx40 = noNetFx40; this.noVs2005 = noVs2005; this.noVs2008 = noVs2008; this.noVs2010 = noVs2010; + this.noVs2012 = noVs2012; this.noTrace = noTrace; this.noConsole = noConsole; this.noLog = noLog; this.throwOnMissing = throwOnMissing; this.whatIf = whatIf; @@ -2465,10 +2467,31 @@ continue; } configuration.noVs2010 = (bool)value; } + else if (MatchOption(newArg, "noVs2012")) + { + bool? value = ParseBoolean(text); + + if (value == null) + { + error = TraceOps.DebugAndTrace( + TracePriority.Lowest, debugCallback, + traceCallback, String.Format( + "Invalid {0} boolean value: {1}", + ForDisplay(arg), ForDisplay(text)), + traceCategory); + + if (strict) + return false; + + continue; + } + + configuration.noVs2012 = (bool)value; + } else if (MatchOption(newArg, "strict")) { bool? value = ParseBoolean(text); if (value == null) @@ -2862,10 +2885,11 @@ // since this project offers both configurations, // we currently disallow this mismatch. // configuration.noNetFx40 = true; configuration.noVs2010 = true; + configuration.noVs2012 = true; TraceOps.DebugAndTrace(TracePriority.Medium, debugCallback, traceCallback, String.Format( "Assembly is compiled for the .NET Framework {0}, " + "support for .NET Framework {1} is now disabled.", @@ -3022,10 +3046,14 @@ traceCategory); traceCallback(String.Format(NameAndValueFormat, "NoVs2010", ForDisplay(noVs2010)), traceCategory); + + traceCallback(String.Format(NameAndValueFormat, + "NoVs2012", ForDisplay(noVs2012)), + traceCategory); traceCallback(String.Format(NameAndValueFormat, "NoTrace", ForDisplay(noTrace)), traceCategory); @@ -3262,10 +3290,19 @@ public bool NoVs2010 { get { return noVs2010; } set { noVs2010 = value; } } + + /////////////////////////////////////////////////////////////////// + + private bool noVs2012; + public bool NoVs2012 + { + get { return noVs2012; } + set { noVs2012 = value; } + } /////////////////////////////////////////////////////////////////// private bool noTrace; public bool NoTrace @@ -4214,17 +4251,20 @@ if (vsList.Versions == null) { vsList.Versions = new VersionList(); if ((configuration == null) || !configuration.NoVs2005) - vsList.Versions.Add(new Version(8, 0)); // Visual Studio 2005 + vsList.Versions.Add(new Version(8, 0)); // 2005 if ((configuration == null) || !configuration.NoVs2008) - vsList.Versions.Add(new Version(9, 0)); // Visual Studio 2008 + vsList.Versions.Add(new Version(9, 0)); // 2008 if ((configuration == null) || !configuration.NoVs2010) - vsList.Versions.Add(new Version(10, 0));// Visual Studio 2010 + vsList.Versions.Add(new Version(10, 0));// 2010 + + if ((configuration == null) || !configuration.NoVs2012) + vsList.Versions.Add(new Version(11, 0));// 2012 } } ///////////////////////////////////////////////////////////////////////