Added:
trunk/TestSuite/configs/
trunk/TestSuite/configs/mysql-50.config
trunk/TestSuite/configs/mysql-51.config
Modified:
trunk/Client.build
trunk/TestSuite/BaseTest.cs
trunk/mysqlclient/MySql.Data.2005.csproj
trunk/mysqlclient/core/Resources.Designer.cs
Log:
work getting test suite working correctly with new CI setup
Modified: trunk/Client.build
===================================================================
--- trunk/Client.build 2006-12-04 17:57:52 UTC (rev 475)
+++ trunk/Client.build 2006-12-05 18:52:03 UTC (rev 476)
@@ -31,20 +31,15 @@
<property name="build.dir" value="."/>
</if>
- <!-- builds the client on all supported frameworks -->
- <target name="allframeworks" depends="net-2.0">
- <!--<call target="Docs"/>-->
- </target>
-
<!-- core managed driver target -->
- <target name="client" description="Core client target">
+ <target name="compile-client" description="Core client target">
<property name="nant.settings.currentframework" value="${framework}"/>
<property name="outdir" value="mysqlclient/bin/${framework}/${buildType}"/>
<mkdir dir="${outdir}" failonerror="false"/>
<resgen todir="mysqlclient/core">
- <resources prefix="MySql.Data.MySqlClient">
+ <resources>
<include name="mysqlclient/core/*.resx" />
</resources>
</resgen>
@@ -53,9 +48,9 @@
define="${defines}" debug="${debug}" optimize="${opt}" keycontainer="ConnectorNet"
doc="${outdir}/MySql.Data.xml">
<arg value="/nowarn:0679,1591,2029"/>
- <resources prefix="MySql.Data.MySqlClient" dynamicprefix="false">
- <include name="mysqlclient/Resources.resources"/>
- <include name="mysqlclient/ResoucedWords.txt"/>
+ <resources prefix="MySql.Data.MySqlClient.Core">
+ <include name="mysqlclient/core/Resources.resources"/>
+ <include name="mysqlclient/core/ReservedWords.txt"/>
</resources>
<references>
<include name="System.Data.dll"/>
@@ -88,11 +83,16 @@
</csc>
</target>
+ <!-- builds the client on all supported frameworks -->
+ <target name="allframeworks" depends="net-2.0">
+ <!--<call target="Docs"/>-->
+ </target>
+
<!-- core managed driver target 1.1 -->
<target name="net-1.1" description="1.1 .NET target">
<property name="nunit.dir" value="${nunit1.dir}"/>
<property name="framework" value="net-1.1"/>
- <call target="client"/>
+ <call target="compile-client"/>
<call target="compile-test-suite"/>
</target>
@@ -104,7 +104,7 @@
<property name="defines" value="${defines},"/>
</if>
<property name="defines" value="${defines}NET20"/>
- <call target="client"/>
+ <call target="compile-client"/>
<call target="compile-test-suite"/>
</target>
@@ -123,7 +123,7 @@
</target>
<!-- testing targets -->
- <target name="alltests" depends="test-net-2.0, test-net-1.1">
+ <target name="alltests" depends="test-net-2.0">
</target>
<target name="test-net-1.1" depends="net-1.1">
@@ -150,29 +150,22 @@
-->
<target name="testclient" description="Target to run NUnit tests">
<mkdir dir="results"/>
- <echo message="Stopping all services"/>
<property name="doCoverage" value="false"/>
- <servicecontroller action="Stop" service="MySql4.1"/>
- <servicecontroller action="Stop" service="MySql5.0"/>
- <servicecontroller action="Stop" service="MySql5.1"/>
<!-- test 4.1 -->
- <echo message="Testing MySQL 4.1"/>
+<!-- <echo message="Testing MySQL 4.1"/>
<property name="excludes" value="5.0,NotWorking"/>
- <servicecontroller action="Start" service="MySql4.1"/>
- <call target="testdb"/>
+ <call target="testdb"/> -->
<echo message="Testing MySQL 5.0"/>
- <servicecontroller action="Stop" service="MySql4.1"/>
- <servicecontroller action="Start" service="MySql5.0"/>
<property name="excludes" value="NotWorking"/>
+ <property name="config" value="mysql-50.config"/>
<!--<property name="doCoverage" value="true"/>-->
<call target="testdb"/>
<echo message="Testing MySQL 5.1"/>
- <servicecontroller action="Stop" service="MySql5.0"/>
- <servicecontroller action="Start" service="MySql5.1"/>
<property name="excludes" value="NotWorking"/>
+ <property name="config" value="mysql-51.config"/>
<call target="testdb"/>
</target>
@@ -181,16 +174,16 @@
coverage
-->
<target name="testdb" description="Target to test a database with all possible configurations">
- <copy file="testsuite/configs/${config}.config" tofile="bin/${framework}/${buildType}/MySql.Data.Tests.dll.config"/>
+ <copy overwrite="true" file="testsuite/configs/${config}" tofile="mysqlclient/bin/${framework}/${buildType}/MySql.Data.Tests.dll.config"/>
<property name="nunit-exe" value="${nunit.dir}/bin/nunit-console.exe"/>
<property name="nunit-exe" value="${nunit.dir}/mono/bin/nunit-console.exe" if="${string::contains(framework, 'mono')}"/>
-
+
<exec unless="${doCoverage}" program="${nunit-exe}"
- commandline="/exclude=${excludes} /xml=../../../results/nunit-${framework}-${buildType}.xml bin/${framework}/${buildType}/MySql.Data.Tests.dll"
+ commandline="/fixture=MySql.Data.MySqlClient.Tests.AsyncTests /exclude=${excludes} mysqlclient/bin/${framework}/${buildType}/MySql.Data.Tests.dll"
failonerror="true"/>
<exec if="${doCoverage}" program="${ncover.executable}"
- commandline="/c "${nunit-exe}" "bin/${framework}/${buildType}/MySql.Data.Tests.dll /exclude=${excludes} /xml=../../../results/nunit-${framework}-${buildType}.xml" /a MySql.Data /o results/ncover-${framework}-${config}.xml"
+ commandline="/c "${nunit-exe}" "mysqlclient/bin/${framework}/${buildType}/MySql.Data.Tests.dll /exclude=${excludes} /xml=../../../results/nunit-${framework}-${buildType}.xml" /a MySql.Data /o results/ncover-${framework}-${config}.xml"
failonerror="true"/>
</target>
Modified: trunk/TestSuite/BaseTest.cs
===================================================================
--- trunk/TestSuite/BaseTest.cs 2006-12-04 17:57:52 UTC (rev 475)
+++ trunk/TestSuite/BaseTest.cs 2006-12-05 18:52:03 UTC (rev 476)
@@ -37,18 +37,35 @@
protected string host;
protected string user;
protected string password;
+ protected int port;
+ protected string database;
public BaseTest()
{
- csAdditions = ";pooling=false;use ssl=true";
- user = "root";
- password = "";
- host = "192.168.1.127";
- }
+ csAdditions = ";pooling=false;";
+ user = "root";
+ password = "";
+ host = "localhost";
+ database = "test";
+ port = 3306;
+ object o = ConfigurationSettings.AppSettings["port"];
+ if (o != null)
+ port = Int32.Parse((string)o);
+ o = ConfigurationSettings.AppSettings["database"];
+ if (o != null)
+ database = (string)o;
+ o = ConfigurationSettings.AppSettings["userid"];
+ if (o != null)
+ user = (string)o;
+ o = ConfigurationSettings.AppSettings["password"];
+ if (o != null)
+ password = (string)o;
+ }
+
protected virtual string GetConnectionInfo()
{
- return String.Empty;
+ return String.Format("protocol=tcp;port={0}", port);
}
protected string GetConnectionString(bool includedb)
@@ -56,7 +73,7 @@
string connStr = String.Format("server={0};user id={1};password={2};" +
"persist security info=true;{3}", host, user, password, csAdditions);
if (includedb)
- connStr += ";database=test";
+ connStr += String.Format("database={0};", database);
connStr += GetConnectionInfo();
return connStr;
}
Added: trunk/TestSuite/configs/mysql-50.config
===================================================================
--- trunk/TestSuite/configs/mysql-50.config 2006-12-04 17:57:52 UTC (rev 475)
+++ trunk/TestSuite/configs/mysql-50.config 2006-12-05 18:52:03 UTC (rev 476)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+ <appSettings>
+ <add key="port" value="3328"/>
+ <add key="userid" value="test"/>
+ <add key="password" value="test"/>
+ <add key="database" value="test11"/>
+ </appSettings>
+</configuration>
\ No newline at end of file
Added: trunk/TestSuite/configs/mysql-51.config
===================================================================
--- trunk/TestSuite/configs/mysql-51.config 2006-12-04 17:57:52 UTC (rev 475)
+++ trunk/TestSuite/configs/mysql-51.config 2006-12-05 18:52:03 UTC (rev 476)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+ <appSettings>
+ <add key="port" value="3329"/>
+ <add key="userid" value="test"/>
+ <add key="password" value="test"/>
+ <add key="database" value="test11"/>
+ </appSettings>
+</configuration>
\ No newline at end of file
Modified: trunk/mysqlclient/MySql.Data.2005.csproj
===================================================================
--- trunk/mysqlclient/MySql.Data.2005.csproj 2006-12-04 17:57:52 UTC (rev 475)
+++ trunk/mysqlclient/MySql.Data.2005.csproj 2006-12-05 18:52:03 UTC (rev 476)
@@ -11,8 +11,7 @@
<AssemblyKeyContainerName>
</AssemblyKeyContainerName>
<AssemblyName>MySql.Data</AssemblyName>
- <AssemblyOriginatorKeyFile>
- </AssemblyOriginatorKeyFile>
+ <AssemblyOriginatorKeyFile>cnet.snk</AssemblyOriginatorKeyFile>
<DefaultClientScript>JScript</DefaultClientScript>
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
<DefaultTargetSchema>IE50</DefaultTargetSchema>
@@ -26,7 +25,7 @@
</FileUpgradeFlags>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
- <SignAssembly>false</SignAssembly>
+ <SignAssembly>true</SignAssembly>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<OutputPath>bin\net-2.0\Debug\</OutputPath>
@@ -112,6 +111,7 @@
<ItemGroup>
<None Include="..\CHANGES" />
<None Include="..\README" />
+ <None Include="cnet.snk" />
</ItemGroup>
<ItemGroup>
<Compile Include="common\ContextString.cs" />
@@ -158,7 +158,11 @@
<Compile Include="core\PerformanceMonitor.cs" />
<Compile Include="core\PreparableStatement.cs" />
<Compile Include="core\ProcedureCache.cs" />
- <Compile Include="core\Resources.Designer.cs" />
+ <Compile Include="core\Resources.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DesignTime>True</DesignTime>
+ <DependentUpon>Resources.resx</DependentUpon>
+ </Compile>
<Compile Include="core\SchemaProvider.cs" />
<Compile Include="core\Statement.cs" />
<Compile Include="core\StoredProcedure.cs" />
@@ -215,6 +219,9 @@
<ItemGroup>
<EmbeddedResource Include="core\Resources.resx">
<SubType>Designer</SubType>
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+ <CustomToolNamespace>MySql.Data.MySqlClient</CustomToolNamespace>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
Modified: trunk/mysqlclient/core/Resources.Designer.cs
===================================================================
--- trunk/mysqlclient/core/Resources.Designer.cs 2006-12-04 17:57:52 UTC (rev 475)
+++ trunk/mysqlclient/core/Resources.Designer.cs 2006-12-05 18:52:03 UTC (rev 476)
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
-// Runtime Version:2.0.50727.308
+// Runtime Version:2.0.50727.312
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -39,7 +39,7 @@
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("MySql.Data.MySqlClient.Resources", typeof(Resources).Assembly);
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("MySql.Data.MySqlClient.core.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
| Thread |
|---|
| • Connector/NET commit: r476 - in trunk: . TestSuite TestSuite/configs mysqlclient mysqlclient/core | rburnett | 5 Dec |