Commits

Johannes Rudolph committed 1966b31

Don't skip running Statlight if xUnit failed.

Comments (0)

Files changed (1)

SubSpec.tests.msbuild

 <Project DefaultTargets="Test" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
 
-    <PropertyGroup>
-        <Configuration Condition="'$(Configuration)' == ''">Release</Configuration>
-    </PropertyGroup>
+  <PropertyGroup>
+    <Configuration Condition="'$(Configuration)' == ''">Release</Configuration>
+  </PropertyGroup>
 
-    <UsingTask
-        AssemblyFile="tools\xunit.runner.msbuild.dll"
-        TaskName="Xunit.Runner.MSBuild.xunit"/>
+  <UsingTask
+      AssemblyFile="tools\xunit.runner.msbuild.dll"
+      TaskName="Xunit.Runner.MSBuild.xunit"/>
 
-    <ItemGroup>
-        <TestAssemblies
-            Include="test\*\bin\$(Configuration)\*.Tests.dll" />
-		<SilverlightTestXaps
+  <ItemGroup>
+    <TestAssemblies
+        Include="test\*\bin\$(Configuration)\*.Tests.dll" />
+    <SilverlightTestXaps
             Include="test\*\bin\SL4\$(Configuration)\*.xap" />
-    </ItemGroup>
+  </ItemGroup>
 
-    <Target Name="Test">
-        <xunit
-            Assemblies="@(TestAssemblies)"
-            Xml="build\TestResults-$(PROCESSOR_ARCHITECTURE).xml"
-            Html="build\TestResults-$(PROCESSOR_ARCHITECTURE).html" />
-			
-		<Exec Command="&quot;tools\StatLight\StatLight.exe&quot; @(SilverlightTestXaps -> '-x=&quot;%(Identity)&quot;', ' ') --teamcity -r=&quot;build\TestResults.Silverlight-$(PROCESSOR_ARCHITECTURE).xml&quot;" />
-    </Target>
+  <Target Name="Test" DependsOnTargets="xUnitTests;SilverlightTests">
+    <Error Text="xUnit Test error(s) occured" Code="%(xUnitExitCodes.Identity)" Condition=" '%(xUnitExitCodes.Identity)' != '0' And '@(TestAssemblies)' != ''"/>
+    <Error Text="StatLight (Silverlight) Test error(s) occured" Code="%(StatLightExitCodes.Identity)" Condition=" '%(StatLightExitCodes.Identity)' != '0' And '@(SilverlightTestXaps)' != ''"/>
+  </Target>
 
+  <Target Name="xUnitTests">
+    <xunit
+      Assemblies="@(TestAssemblies)"
+      Xml="build\TestResults-$(PROCESSOR_ARCHITECTURE).xml"
+      Html="build\TestResults-$(PROCESSOR_ARCHITECTURE).html"
+      ContinueOnError="true">
+      
+      <Output TaskParameter="ExitCode" ItemName="xUnitExitCodes"/>
+    
+    </xunit>
+  </Target>
+
+  <Target Name="SilverlightTests">
+    <Exec 
+      Command="&quot;tools\StatLight\StatLight.exe&quot; @(SilverlightTestXaps -> '-x=&quot;%(Identity)&quot;', ' ') --teamcity -r=&quot;build\TestResults.Silverlight-$(PROCESSOR_ARCHITECTURE).xml&quot;"
+      ContinueOnError="true">
+
+      <Output TaskParameter="ExitCode" ItemName="StatLightExitCodes"/>
+    
+    </Exec>
+  </Target>
 </Project>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.