[tarantino] r163 committed - - upgraded NAnt to compile C# 4.0 code...

8 views
Skip to first unread message

codesite...@google.com

unread,
Jan 8, 2011, 8:41:52 AM1/8/11
to tarantino...@googlegroups.com
Revision: 163
Author: kwhurwitz
Date: Sat Jan 8 05:41:03 2011
Log: - upgraded NAnt to compile C# 4.0 code
- Fixed unit tests
http://code.google.com/p/tarantino/source/detail?r=163

Modified:
/trunk/default.build
/trunk/lib/NAnt/NAnt.exe.config

/trunk/src/Tarantino.Deployer.UnitTests/Core/Services/DeploymentFactoryTester.cs

/trunk/src/Tarantino.Deployer.UnitTests/Core/Services/DeploymentRecorderTester.cs

=======================================
--- /trunk/default.build Tue Dec 29 12:09:43 2009
+++ /trunk/default.build Sat Jan 8 05:41:03 2011
@@ -3,7 +3,7 @@
<project name="Tarantino" default="local"
xmlns="http://nant.sf.net/release/0.85-rc4/nant.xsd">

<!-- NAnt settings -->
- <property name="nant.settings.currentframework" value="net-3.5" />
+ <property name="nant.settings.currentframework" value="net-4.0" />

<!-- Version settings -->
<property name="company" value="${project::get-name()}"/>
=======================================
--- /trunk/lib/NAnt/NAnt.exe.config Thu Mar 20 12:27:32 2008
+++ /trunk/lib/NAnt/NAnt.exe.config Sat Jan 8 05:41:03 2011
@@ -1451,6 +1451,135 @@
</task>
</tasks>
</framework>
+
+ <framework name="net-4.0" family="net" version="4.0"
vendor="MIcrosoft" description="Microsoft .NET Framework 4.0"
sdkdirectory="${path::combine(sdkInstallRoot, 'bin')}"
frameworkdirectory="${path::combine(installRoot, 'v4.0.30319')}"
frameworkassemblydirectory="${path::combine(installRoot, 'v4.0.30319')}"
clrversion="4.0.30319">
+ <runtime>
+ <probing-paths>
+ <directory name="lib/net/2.0" />
+ <directory name="lib/net/neutral" />
+ <directory name="lib/common/2.0" />
+ <directory name="lib/common/neutral" />
+ </probing-paths>
+ <modes>
+ <strict>
+ <environment>
+ <variable name="COMPLUS_VERSION" value="v4.0.30319" />
+ </environment>
+ </strict>
+ </modes>
+ </runtime>
+
+ <reference-assemblies
basedir="${path::combine(installRoot, 'v4.0.30319')}">
+ <include name="Accessibility.dll" />
+ <include name="mscorlib.dll" />
+ <include name="Microsoft.Build.Engine.dll" />
+ <include name="Microsoft.Build.Framework.dll" />
+ <include name="Microsoft.Build.Utilities.dll" />
+ <include name="Microsoft.Vsa.dll" />
+ <include name="Microsoft.VisualBasic.dll" />
+ <include name="Microsoft.VisualBasic.Compatibility.dll" />
+ <include name="Microsoft.VisualBasic.Compatibility.Data.dll" />
+ <include name="System.Configuration.dll" />
+ <include name="System.Configuration.Install.dll" />
+ <include name="System.Data.dll" />
+ <include name="System.Data.OracleClient.dll" />
+ <include name="System.Data.SqlXml.dll" />
+ <include name="System.Deployment.dll" />
+ <include name="System.Design.dll" />
+ <include name="System.DirectoryServices.dll" />
+ <include name="System.dll" />
+ <include name="System.Drawing.Design.dll" />
+ <include name="System.Drawing.dll" />
+ <include name="System.EnterpriseServices.dll" />
+ <include name="System.Management.dll" />
+ <include name="System.Messaging.dll" />
+ <include name="System.Runtime.Remoting.dll" />
+ <include name="System.Runtime.Serialization.Formatters.Soap.dll"
/>
+ <include name="System.Security.dll" />
+ <include name="System.ServiceProcess.dll" />
+ <include name="System.Transactions.dll" />
+ <include name="System.Web.dll" />
+ <include name="System.Web.Mobile.dll" />
+ <include name="System.Web.RegularExpressions.dll" />
+ <include name="System.Web.Services.dll" />
+ <include name="System.Windows.Forms.dll" />
+ <include name="System.Xml.dll" />
+ </reference-assemblies>
+
+ <task-assemblies>
+ <!-- include MS.NET version-neutral assemblies -->
+ <include name="extensions/net/neutral/**/*.dll" />
+ <!-- include MS.NET 2.0 specific assemblies -->
+ <include name="extensions/net/2.0/**/*.dll" />
+ <!-- include MS.NET specific task assembly -->
+ <include name="NAnt.MSNetTasks.dll" />
+ <!-- include MS.NET specific test assembly -->
+ <include name="NAnt.MSNet.Tests.dll" />
+ <!-- include .NET 2.0 specific assemblies -->
+ <include name="extensions/common/2.0/**/*.dll" />
+ </task-assemblies>
+
+ <tool-paths>
+ <directory name="${path::combine(sdkInstallRoot, 'bin')}"
if="${property::exists('sdkInstallRoot')}" />
+ <directory name="${path::combine(installRoot, 'v2.0.50727')}" />
+ <directory name="${path::combine(installRoot, 'v3.0')}" />
+ <directory name="${path::combine(installRoot, 'v3.5')}" />
+ </tool-paths>
+
+ <project>
+ <readregistry property="installRoot"
key="SOFTWARE\Microsoft\.NETFramework\InstallRoot" hive="LocalMachine" />
+ <readregistry property="sdkInstallRoot"
key="SOFTWARE\Microsoft\.NETFramework\sdkInstallRootv2.0"
hive="LocalMachine" failonerror="false" />
+ </project>
+
+ <tasks>
+ <task name="csc">
+ <attribute name="supportsnowarnlist">true</attribute>
+ <attribute name="supportswarnaserrorlist">true</attribute>
+ <attribute name="supportskeycontainer">true</attribute>
+ <attribute name="supportskeyfile">true</attribute>
+ <attribute name="supportsdelaysign">true</attribute>
+ <attribute name="supportsplatform">true</attribute>
+ <attribute name="supportslangversion">true</attribute>
+ </task>
+
+ <task name="vbc">
+ <attribute name="supportsdocgeneration">true</attribute>
+ <attribute name="supportsnostdlib">true</attribute>
+ <attribute name="supportsnowarnlist">true</attribute>
+ <attribute name="supportskeycontainer">true</attribute>
+ <attribute name="supportskeyfile">true</attribute>
+ <attribute name="supportsdelaysign">true</attribute>
+ <attribute name="supportsplatform">true</attribute>
+ <attribute name="supportswarnaserrorlist">true</attribute>
+ </task>
+
+ <task name="jsc">
+ <attribute name="supportsplatform">true</attribute>
+ </task>
+
+ <task name="vjc">
+ <attribute name="supportsnowarnlist">true</attribute>
+ <attribute name="supportskeycontainer">true</attribute>
+ <attribute name="supportskeyfile">true</attribute>
+ <attribute name="supportsdelaysign">true</attribute>
+ </task>
+
+ <task name="resgen">
+ <attribute name="supportsassemblyreferences">true</attribute>
+ <attribute
name="supportsexternalfilereferences">true</attribute>
+ </task>
+
+ <task name="delay-sign">
+ <attribute name="exename">sn</attribute>
+ </task>
+
+ <task name="license">
+ <attribute name="exename">lc</attribute>
+ <attribute name="supportsassemblyreferences">true</attribute>
+ </task>
+ </tasks>
+ </framework>
+
</platform>
<platform name="unix" default="auto">
<task-assemblies>
@@ -1845,6 +1974,134 @@
</task>
</tasks>
</framework>
+
+ <framework name="net-4.0" family="net" version="4.0"
vendor="MIcrosoft" description="Microsoft .NET Framework 4.0"
sdkdirectory="${path::combine(sdkInstallRoot, 'bin')}"
frameworkdirectory="${path::combine(installRoot, 'v4.0.30319')}"
frameworkassemblydirectory="${path::combine(installRoot, 'v4.0.30319')}"
clrversion="4.0.30319">
+ <runtime>
+ <probing-paths>
+ <directory name="lib/net/2.0" />
+ <directory name="lib/net/neutral" />
+ <directory name="lib/common/2.0" />
+ <directory name="lib/common/neutral" />
+ </probing-paths>
+ <modes>
+ <strict>
+ <environment>
+ <variable name="COMPLUS_VERSION" value="v4.0.30319" />
+ </environment>
+ </strict>
+ </modes>
+ </runtime>
+
+ <reference-assemblies
basedir="${path::combine(installRoot, 'v4.0.30319')}">
+ <include name="Accessibility.dll" />
+ <include name="mscorlib.dll" />
+ <include name="Microsoft.Build.Engine.dll" />
+ <include name="Microsoft.Build.Framework.dll" />
+ <include name="Microsoft.Build.Utilities.dll" />
+ <include name="Microsoft.Vsa.dll" />
+ <include name="Microsoft.VisualBasic.dll" />
+ <include name="Microsoft.VisualBasic.Compatibility.dll" />
+ <include name="Microsoft.VisualBasic.Compatibility.Data.dll" />
+ <include name="System.Configuration.dll" />
+ <include name="System.Configuration.Install.dll" />
+ <include name="System.Data.dll" />
+ <include name="System.Data.OracleClient.dll" />
+ <include name="System.Data.SqlXml.dll" />
+ <include name="System.Deployment.dll" />
+ <include name="System.Design.dll" />
+ <include name="System.DirectoryServices.dll" />
+ <include name="System.dll" />
+ <include name="System.Drawing.Design.dll" />
+ <include name="System.Drawing.dll" />
+ <include name="System.EnterpriseServices.dll" />
+ <include name="System.Management.dll" />
+ <include name="System.Messaging.dll" />
+ <include name="System.Runtime.Remoting.dll" />
+ <include name="System.Runtime.Serialization.Formatters.Soap.dll"
/>
+ <include name="System.Security.dll" />
+ <include name="System.ServiceProcess.dll" />
+ <include name="System.Transactions.dll" />
+ <include name="System.Web.dll" />
+ <include name="System.Web.Mobile.dll" />
+ <include name="System.Web.RegularExpressions.dll" />
+ <include name="System.Web.Services.dll" />
+ <include name="System.Windows.Forms.dll" />
+ <include name="System.Xml.dll" />
+ </reference-assemblies>
+
+ <task-assemblies>
+ <!-- include MS.NET version-neutral assemblies -->
+ <include name="extensions/net/neutral/**/*.dll" />
+ <!-- include MS.NET 2.0 specific assemblies -->
+ <include name="extensions/net/2.0/**/*.dll" />
+ <!-- include MS.NET specific task assembly -->
+ <include name="NAnt.MSNetTasks.dll" />
+ <!-- include MS.NET specific test assembly -->
+ <include name="NAnt.MSNet.Tests.dll" />
+ <!-- include .NET 2.0 specific assemblies -->
+ <include name="extensions/common/2.0/**/*.dll" />
+ </task-assemblies>
+
+ <tool-paths>
+ <directory name="${path::combine(sdkInstallRoot, 'bin')}"
if="${property::exists('sdkInstallRoot')}" />
+ <directory name="${path::combine(installRoot, 'v2.0.50727')}" />
+ <directory name="${path::combine(installRoot, 'v3.0')}" />
+ <directory name="${path::combine(installRoot, 'v3.5')}" />
+ </tool-paths>
+
+ <project>
+ <readregistry property="installRoot"
key="SOFTWARE\Microsoft\.NETFramework\InstallRoot" hive="LocalMachine" />
+ <readregistry property="sdkInstallRoot"
key="SOFTWARE\Microsoft\.NETFramework\sdkInstallRootv2.0"
hive="LocalMachine" failonerror="false" />
+ </project>
+
+ <tasks>
+ <task name="csc">
+ <attribute name="supportsnowarnlist">true</attribute>
+ <attribute name="supportswarnaserrorlist">true</attribute>
+ <attribute name="supportskeycontainer">true</attribute>
+ <attribute name="supportskeyfile">true</attribute>
+ <attribute name="supportsdelaysign">true</attribute>
+ <attribute name="supportsplatform">true</attribute>
+ <attribute name="supportslangversion">true</attribute>
+ </task>
+
+ <task name="vbc">
+ <attribute name="supportsdocgeneration">true</attribute>
+ <attribute name="supportsnostdlib">true</attribute>
+ <attribute name="supportsnowarnlist">true</attribute>
+ <attribute name="supportskeycontainer">true</attribute>
+ <attribute name="supportskeyfile">true</attribute>
+ <attribute name="supportsdelaysign">true</attribute>
+ <attribute name="supportsplatform">true</attribute>
+ <attribute name="supportswarnaserrorlist">true</attribute>
+ </task>
+
+ <task name="jsc">
+ <attribute name="supportsplatform">true</attribute>
+ </task>
+
+ <task name="vjc">
+ <attribute name="supportsnowarnlist">true</attribute>
+ <attribute name="supportskeycontainer">true</attribute>
+ <attribute name="supportskeyfile">true</attribute>
+ <attribute name="supportsdelaysign">true</attribute>
+ </task>
+
+ <task name="resgen">
+ <attribute name="supportsassemblyreferences">true</attribute>
+ <attribute
name="supportsexternalfilereferences">true</attribute>
+ </task>
+
+ <task name="delay-sign">
+ <attribute name="exename">sn</attribute>
+ </task>
+
+ <task name="license">
+ <attribute name="exename">lc</attribute>
+ <attribute name="supportsassemblyreferences">true</attribute>
+ </task>
+ </tasks>
+ </framework>
</platform>
</frameworks>
<properties>
=======================================
---
/trunk/src/Tarantino.Deployer.UnitTests/Core/Services/DeploymentFactoryTester.cs
Sat Jan 8 05:21:14 2011
+++
/trunk/src/Tarantino.Deployer.UnitTests/Core/Services/DeploymentFactoryTester.cs
Sat Jan 8 05:41:03 2011
@@ -17,26 +17,22 @@
{
var mocks = new MockRepository();
var clock = mocks.CreateMock<ISystemClock>();
- var parser = mocks.CreateMock<IRevisionNumberParser>();
- var calculator = mocks.CreateMock<IDeploymentResultCalculator>();

using (mocks.Record())
{
Expect.Call(clock.GetCurrentDateTime()).Return(new DateTime(2007, 4,
15));
- Expect.Call(parser.Parse("Output...")).Return(785);
-
Expect.Call(calculator.GetResult("Output...")).Return(DeploymentResult.Failure);
}

using (mocks.Playback())
{
IDeploymentFactory factory = new DeploymentFactory(clock);
- Deployment deployment =
factory.CreateDeployment("A1", "E1", "jsmith", "Output...", "1.0", false);
+ Deployment deployment =
factory.CreateDeployment("A1", "E1", "jsmith", "Output...", "1.0", true);

Assert.That(deployment.Application, Is.EqualTo("A1"));
Assert.That(deployment.Environment, Is.EqualTo("E1"));
Assert.That(deployment.DeployedBy, Is.EqualTo("jsmith"));
Assert.That(deployment.DeployedOn, Is.EqualTo(new DateTime(2007, 4,
15)));
- Assert.That(deployment.Revision, Is.EqualTo(785));
+ Assert.That(deployment.Revision, Is.EqualTo("1.0"));
Assert.That(deployment.Output.Output, Is.EqualTo("Output..."));
Assert.That(deployment.Result, Is.SameAs(DeploymentResult.Failure));
Assert.That(deployment.Output.Deployment, Is.SameAs(deployment));
=======================================
---
/trunk/src/Tarantino.Deployer.UnitTests/Core/Services/DeploymentRecorderTester.cs
Sat Jan 8 05:21:14 2011
+++
/trunk/src/Tarantino.Deployer.UnitTests/Core/Services/DeploymentRecorderTester.cs
Sat Jan 8 05:41:03 2011
@@ -14,7 +14,7 @@
[Test]
public void Records_deployment()
{
- var deployment = new Deployment {Revision = "1234"};
+ var deployment = new Deployment{ Revision = "1.0"};

var mocks = new MockRepository();
var factory = mocks.CreateMock<IDeploymentFactory>();
@@ -33,7 +33,7 @@
IDeploymentRecorder recorder = new DeploymentRecorder(context,
factory, repository);
string revision =
recorder.RecordDeployment("application", "environment", "Output...", "1.0",
false);

- Assert.That(revision, Is.EqualTo(revision));
+ Assert.That(revision, Is.EqualTo("1.0"));
}

mocks.VerifyAll();

Reply all
Reply to author
Forward
0 new messages