Permalink
Browse files

Run Forrest, Run! - enabling running store tests in build.cmd

  • Loading branch information...
1 parent c596479 commit ec48a64a6729db26c229e94b924ca027266c651c @moozzyk moozzyk committed May 9, 2014
View
@@ -32,3 +32,4 @@ PublishProfiles/
jquery.signalR.js
jquery.signalR.min.js
xamarin/SignalRPackage/component/lib/mobile/
+tests/Microsoft.AspNet.SignalR.Client.Store.Tests/AppPackages/
@@ -3,4 +3,8 @@
<package id="OpenCover" version="4.5.1403" />
<package id="ReportGenerator" version="1.7.3.0" />
<package id="xunit.runners" version="1.9.1" />
+ <package id="xunit.runners" version="2.0.0-beta-build2650" />
+ <package id="xunit.core" version="2.0.0-beta-build2650" />
+ <package id="Microsoft.Bcl" version="1.1.9" />
+ <package id="Microsoft.Bcl.Build" version="1.0.14" />
</packages>
View
@@ -1,4 +1,8 @@
@echo Off
+
+rem Enforce package restore to avoid build issues. See http://go.microsoft.com/fwlink/?LinkID=317568 for more details
+msbuild .nuget\NuGet.targets /t:RestorePackages
+
set target=%1
if "%target%" == "" (
set target=BuildCmd
@@ -7,4 +11,5 @@ set config=%2
if "%config%" == "" (
set config=Debug
)
+
msbuild Build\Build.proj /t:"%target%" /p:Configuration="%config%" /m /fl /flp:LogFile=msbuild.log;Verbosity=Normal /nr:false
View
@@ -24,7 +24,7 @@
<NuGetToolsPath>$(ProjectRoot)\.nuget</NuGetToolsPath>
<NuGetExePath>$(NuGetToolsPath)\nuget.exe</NuGetExePath>
<ToolsPath>$(ProjectRoot)\tools\</ToolsPath>
- <XunitPath>$(ToolsPath)xunit\</XunitPath>
+ <XunitPath>$(ProjectRoot)\packages\xunit.runners.2.0.0-beta-build2650\tools\</XunitPath>
<ChutzpahExe>chutzpah.console.exe</ChutzpahExe>
<ChutzpahPath>$(ProjectRoot)\tools\chutzpah</ChutzpahPath>
<ChutzpahExePath>$(ChutzpahPath)\$(ChutzpahExe)</ChutzpahExePath>
@@ -82,8 +82,6 @@
<Projects Include="$(ProjectRoot)\src\Microsoft.AspNet.SignalR.Client.Portable\Microsoft.AspNet.SignalR.Client.Portable.csproj">
<Build Condition="!$(WP8SDKInstalled)">false</Build>
<Platform>portable-net45+sl5+netcore45+wp8+wp81+wpa81</Platform>
- <!-- HttpClient causes issues with running FxCop on the SL5 and WP8 clients -->
- <RunFxCop>false</RunFxCop>
</Projects>
<!-- The SignalR .NET client is the only remaining project that targets .NET 4.0 starting in SignalR 2.0 -->
<Projects Include="$(ProjectRoot)\src\Microsoft.AspNet.SignalR.Client\Microsoft.AspNet.SignalR.Client.csproj">
@@ -151,6 +149,7 @@
<UnitTestProjects Include="$(ProjectRoot)\tests\Microsoft.AspNet.SignalR.Tests\Microsoft.AspNet.SignalR.Tests.csproj"></UnitTestProjects>
<UnitTestProjects Include="$(ProjectRoot)\tests\Microsoft.AspNet.SignalR.Client.Tests\Microsoft.AspNet.SignalR.Client.Tests.csproj"></UnitTestProjects>
<UnitTestProjects Include="$(ProjectRoot)\tests\Microsoft.AspNet.SignalR.SqlServer.Tests\Microsoft.AspNet.SignalR.SqlServer.Tests.csproj"></UnitTestProjects>
+ <UnitTestProjects Include="$(ProjectRoot)\tests\Microsoft.AspNet.SignalR.Client.Store.Tests\Microsoft.AspNet.SignalR.Client.Store.Tests.csproj"></UnitTestProjects>
</ItemGroup>
<ItemGroup>
@@ -254,24 +253,27 @@
<Exec Command="&quot;$(ChutzpahExePath)&quot; &quot;$(JSTester)&quot; /showFailureReport /silent /timeoutMilliseconds 30000" Condition=" '$(OS)' == 'Windows_NT'" />
- <xunit Assembly="$(ProjectArtifactsDir)\Microsoft.AspNet.SignalR.Tests\Microsoft.AspNet.SignalR.Tests.dll"
+ <xunit Assemblies="$(ProjectArtifactsDir)\Microsoft.AspNet.SignalR.Tests\Microsoft.AspNet.SignalR.Tests.dll"
Xml="$(TestResultsPath)\Microsoft.AspNet.SignalR.Tests.XunitResults.xml"
Verbose="true" />
-
- <xunit Assembly="$(ProjectArtifactsDir)\Microsoft.AspNet.SignalR.Client.Tests\Microsoft.AspNet.SignalR.Client.Tests.dll"
+ <xunit Assemblies="$(ProjectArtifactsDir)\Microsoft.AspNet.SignalR.Client.Tests\Microsoft.AspNet.SignalR.Client.Tests.dll"
Xml="$(TestResultsPath)\Microsoft.AspNet.SignalR.Client.Tests.XunitResults.xml"
Verbose="true" />
- <xunit Assembly="$(ProjectArtifactsDir)\Microsoft.AspNet.SignalR.SqlServer.Tests\Microsoft.AspNet.SignalR.SqlServer.Tests.dll"
+ <xunit Assemblies="$(ProjectArtifactsDir)\Microsoft.AspNet.SignalR.SqlServer.Tests\Microsoft.AspNet.SignalR.SqlServer.Tests.dll"
Xml="$(TestResultsPath)\Microsoft.AspNet.SignalR.SqlServer.Tests.XunitResults.xml"
Verbose="true" />
+ <xunit Assemblies="$(ProjectArtifactsDir)\Microsoft.AspNet.SignalR.Client.Store.Tests\Microsoft.AspNet.SignalR.Client.Store.Tests.dll"
+ Xml="$(TestResultsPath)\Microsoft.AspNet.SignalR.Client.Store.Tests.XunitResults.xml"
+ Verbose="true" />
+
<CallTarget Targets="KillIISExpress" Condition=" '$(OS)' == 'Windows_NT'" />
<OnError ExecuteTargets="KillIISExpress" Condition=" '$(OS)' == 'Windows_NT'" />
</Target>
<Target Name="RunFunctionalTests" DependsOnTargets="BuildNetFunctionalTests">
- <xunit Assembly="$(ProjectArtifactsDir)\Microsoft.AspNet.SignalR.FunctionalTests\bin\Microsoft.AspNet.SignalR.FunctionalTests.dll"
+ <xunit Assemblies="$(ProjectArtifactsDir)\Microsoft.AspNet.SignalR.FunctionalTests\bin\Microsoft.AspNet.SignalR.FunctionalTests.dll"
Xml="$(TestResultsPath)\Microsoft.AspNet.SignalR.FunctionalTests.XunitResults.xml"
Verbose="true" />
@@ -226,9 +226,6 @@
<Compile Include="..\Microsoft.AspNet.SignalR.Core\Infrastructure\TaskQueue.cs">
<Link>Infrastructure\TaskQueue.cs</Link>
</Compile>
- <Compile Include="..\Microsoft.AspNet.SignalR.Core\Owin\Infrastructure\ByteBuffer.cs">
- <Link>Infrastructure\ByteBuffer.cs</Link>
- </Compile>
<Compile Include="..\Microsoft.AspNet.SignalR.Core\TaskAsyncHelper.cs">
<Link>Infrastructure\TaskAsyncHelper.cs</Link>
</Compile>
@@ -47,6 +47,12 @@
<TargetPlatform Include="Windows, Version=8.1" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="..\Common\CommonAssemblyInfo.cs">
+ <Link>Properties\CommonAssemblyInfo.cs</Link>
+ </Compile>
+ <Compile Include="..\Common\CommonVersionInfo.cs">
+ <Link>Properties\CommonVersionInfo.cs</Link>
+ </Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Transports\WebSocketTransport.cs" />
</ItemGroup>
@@ -63,6 +69,7 @@
<HintPath>..\..\packages\Microsoft.Net.Http.2.2.22\lib\portable-net45+win8+wpa81\System.Net.Http.Primitives.dll</HintPath>
</Reference>
</ItemGroup>
+ <Import Project="..\..\src\Common\Microsoft.AspNet.SignalR.targets" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
@@ -1,30 +1,10 @@
-using System.Resources;
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
-[assembly: AssemblyTitle("Microsoft.AspNet.SignalR.Client.Store")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("Microsoft.AspNet.SignalR.Client.Store")]
-[assembly: AssemblyCopyright("Copyright © 2014")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-[assembly: NeutralResourcesLanguage("en")]
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: AssemblyTitle("Microsoft.AspNet.SignalR.Client.Store")]
+[assembly: AssemblyDescription("SignalR WebSocket transport for Windows 8.1 Store client")]
@@ -8,14 +8,19 @@ namespace Microsoft.AspNet.SignalR.Client.Transports
{
public class WebSocketTransport : IClientTransport
{
+ ~WebSocketTransport()
+ {
+ Dispose(false);
+ }
+
public string Name
{
get { return "webSockets"; }
}
public bool SupportsKeepAlive
{
- get { throw new NotImplementedException(); }
+ get { return true; }
}
public Task<NegotiationResponse> Negotiate(IConnection connection, string connectionData)
@@ -45,7 +50,13 @@ public void LostConnection(IConnection connection)
public void Dispose()
{
- throw new NotImplementedException();
+ Dispose(true);
+ GC.SuppressFinalize(this);
+ }
+
+ protected virtual void Dispose(bool disposing)
+ {
+
}
}
}
@@ -30,6 +30,8 @@ public static Task WriteAsync(this Stream stream, byte[] buffer)
}
#if !(NETFX_CORE || NET45)
+
+ [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared class.")]
private static Func<IAsyncResult, object> WrapEndWrite(Stream stream)
{
return ar =>
@@ -123,6 +123,7 @@
<AppxManifest Include="Package.appxmanifest">
<SubType>Designer</SubType>
</AppxManifest>
+ <None Include="app.config" />
<None Include="Microsoft.AspNet.SignalR.Client.Store.Tests_TemporaryKey.pfx" />
<None Include="packages.config" />
</ItemGroup>
@@ -171,6 +172,7 @@
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '12.0' ">
<VisualStudioVersion>12.0</VisualStudioVersion>
</PropertyGroup>
+ <Import Project="..\..\src\Common\Microsoft.AspNet.SignalR.targets" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
@@ -12,5 +12,11 @@ public void NameReturnsCorrectTransportName()
{
Assert.Equal("webSockets", new WebSocketTransport().Name);
}
+
+ [Fact]
+ public void SupportsKeepAliveReturnsTrue()
+ {
+ Assert.True(new WebSocketTransport().SupportsKeepAlive);
+ }
}
-}
+}
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+ <runtime>
+ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+ <dependentAssembly>
+ <assemblyIdentity name="System.Net.Http.Extensions" publicKeyToken="B03F5F7F11D50A3A" culture="neutral"/>
+ <bindingRedirect oldVersion="0.0.0.0-2.2.22.0" newVersion="2.2.22.0"/>
+ </dependentAssembly>
+ </assemblyBinding>
+ </runtime>
+</configuration>
Binary file not shown.
Binary file not shown.

0 comments on commit ec48a64

Please sign in to comment.