Skip to content

Commit baffc17

Browse files
committed
fix connection string tests to run against MySql.Data
1 parent e90ca53 commit baffc17

File tree

2 files changed

+31
-5
lines changed

2 files changed

+31
-5
lines changed

.ci/test.ps1

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ if ($LASTEXITCODE -ne 0){
1212
exit $LASTEXITCODE;
1313
}
1414

15+
echo "Executing connection string tests"
1516
dotnet test tests\MySqlConnector.Tests\MySqlConnector.Tests.csproj -c Release
1617
if ($LASTEXITCODE -ne 0){
1718
exit $LASTEXITCODE;
@@ -31,6 +32,13 @@ if ($LASTEXITCODE -ne 0){
3132
exit $LASTEXITCODE;
3233
}
3334

35+
echo "Executing baseline connection string tests"
36+
dotnet restore tests\MySqlConnector.Tests\MySqlConnector.Tests.csproj /p:Configuration=Baseline
37+
dotnet test tests\MySqlConnector.Tests\MySqlConnector.Tests.csproj -c Baseline
38+
if ($LASTEXITCODE -ne 0){
39+
exit $LASTEXITCODE;
40+
}
41+
3442
echo "Executing baseline tests with No Compression, No SSL"
3543
Copy-Item -Force .ci\config\config.json tests\SideBySide\config.json
3644
dotnet restore tests\SideBySide\SideBySide.csproj /p:Configuration=Baseline
Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

3+
<PropertyGroup Condition=" '$(Configuration)' != 'Baseline' ">
4+
<TargetFrameworks>netcoreapp1.1.1</TargetFrameworks>
5+
</PropertyGroup>
6+
7+
<PropertyGroup Condition=" '$(Configuration)' == 'Baseline' ">
8+
<TargetFrameworks>net462</TargetFrameworks>
9+
<DefineConstants>BASELINE</DefineConstants>
10+
</PropertyGroup>
11+
312
<PropertyGroup>
413
<VersionPrefix>0.1.0</VersionPrefix>
5-
<TargetFramework>netcoreapp1.1.1</TargetFramework>
614
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
715
<AssemblyName>MySqlConnector.Tests</AssemblyName>
816
<PackageId>MySqlConnector.Tests</PackageId>
917
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
1018
</PropertyGroup>
1119

12-
<ItemGroup>
13-
<ProjectReference Include="..\..\src\MySqlConnector\MySqlConnector.csproj" />
14-
</ItemGroup>
15-
1620
<ItemGroup>
1721
<PackageReference Include="Microsoft.DotNet.InternalAbstractions" Version="1.0.0" />
1822
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-*" />
@@ -21,4 +25,18 @@
2125
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
2226
</ItemGroup>
2327

28+
<ItemGroup Condition=" '$(Configuration)' != 'Baseline' ">
29+
<ProjectReference Include="..\..\src\MySqlConnector\MySqlConnector.csproj" />
30+
</ItemGroup>
31+
32+
<ItemGroup Condition=" '$(Configuration)' == 'Baseline' ">
33+
<PackageReference Include="MySql.Data" Version="6.9.8" />
34+
<Compile Remove="NormalizeTests.cs;TypeMapperTests.cs;Utf8Tests.cs" />
35+
</ItemGroup>
36+
37+
<ItemGroup Condition=" '$(TargetFramework)' == 'net462' ">
38+
<Reference Include="System" />
39+
<Reference Include="Microsoft.CSharp" />
40+
</ItemGroup>
41+
2442
</Project>

0 commit comments

Comments
 (0)