Przeglądaj źródła

Added '_Test' target to build scripts

ArnoldZokas 15 lat temu
rodzic
commit
b287a2de36

+ 0 - 2
build/BuildAll.bat

@@ -1,9 +1,7 @@
-:BEGIN
 @ECHO OFF
 %WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Build /p:BuildConfiguration=Debug
 IF ERRORLEVEL 1 GOTO END
 
-:SILVERLIGHT2
 %WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Build /p:BuildConfiguration=Debug_Silverlight2
 
 :END

+ 4 - 0
build/Common.targets

@@ -10,4 +10,8 @@
 		<MSBuild Projects="@(Solution)" Properties="Configuration=$(BuildConfiguration)" BuildInParallel="true" />
 	</Target>
 
+	<Target Name="_Test">
+		<Exec Command="&quot;E:\dotnet-protobufs\lib\NUnit 2.2.8.0\nunit-console.exe&quot; %(TestContainer.Identity)" />
+	</Target>
+
 </Project>

+ 6 - 3
build/GenerateCompletePackage.bat

@@ -1,13 +1,16 @@
-:BEGIN
 @ECHO OFF
+%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Build /p:BuildConfiguration=Debug
+IF ERRORLEVEL 1 GOTO END
+
+%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Build /p:BuildConfiguration=Debug_Silverlight2
+IF ERRORLEVEL 1 GOTO END
+
 %WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Build /p:BuildConfiguration=Release
 IF ERRORLEVEL 1 GOTO END
 
-:SILVERLIGHT2
 %WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Build /p:BuildConfiguration=Release_Silverlight2
 IF ERRORLEVEL 1 GOTO END
 
-:GENERATE_PACKAGE
 %WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:GeneratePackage /p:PackageScope=AllBinariesAndSource
 
 :END

+ 0 - 3
build/GenerateReleasePackage.bat

@@ -1,13 +1,10 @@
-:BEGIN
 @ECHO OFF
 %WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Build /p:BuildConfiguration=Release
 IF ERRORLEVEL 1 GOTO END
 
-:SILVERLIGHT2
 %WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Build /p:BuildConfiguration=Release_Silverlight2
 IF ERRORLEVEL 1 GOTO END
 
-:GENERATE_PACKAGE
 %WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:GeneratePackage /p:PackageScope=ReleaseBinaries
 
 :END

+ 9 - 2
build/build.csproj

@@ -11,18 +11,25 @@
 		
 		<!--File Paths-->
 		<SolutionFile>$(ProjectDirectory)\src\ProtocolBuffers.sln</SolutionFile>
+		
+		<!--Tool Paths-->
+		<NUnitExePath>$(ProjectDirectory)\lib\NUnit 2.2.8.0\nunit-console.exe</NUnitExePath>
 	</PropertyGroup>
 
 	<Import Project="Common.targets"/>
 
 	<ItemGroup>
 		<WorkingDirectories Include="$(BuildTempDirectory)" />
+		
 		<Solution Include="$(SolutionFile)" />
+		
+		<TestContainer Include="$(ProjectDirectory)\src\ProtocolBuffers.Test\bin\$(BuildConfiguration)\Google.ProtocolBuffers.Test.dll" />
+		<TestContainer Include="$(ProjectDirectory)\src\ProtoGen.Test\bin\$(BuildConfiguration)\Google.ProtocolBuffers.ProtoGen.Test.dll" />
 	</ItemGroup>
 
 	<!-- targets -->
-	<Target Name="Build" DependsOnTargets="_Compile" />
+	<Target Name="Build" DependsOnTargets="_Compile;_Test" />
 	<Target Name="RunBenchmarks" DependsOnTargets="_Compile" />
-	<Target Name="GeneratePackage" />
+	<Target Name="GeneratePackage" DependsOnTargets="_Compile" />
 
 </Project>