Run unit tests in the build script.

This commit is contained in:
Sean Hall 2020-11-15 12:38:41 -06:00
Родитель c6a94a7f35
Коммит d5925b2bd8
6 изменённых файлов: 16 добавлений и 11 удалений

Просмотреть файл

@ -3,6 +3,8 @@
nuget restore || exit /b nuget restore || exit /b
msbuild -t:Test -p:Configuration=Release src\test\DUtilUnitTest || exit /b
msbuild -p:Configuration=Release;Platform=x86;PlatformToolset=v140 || exit /b msbuild -p:Configuration=Release;Platform=x86;PlatformToolset=v140 || exit /b
msbuild -p:Configuration=Release;Platform=x64;PlatformToolset=v140 || exit /b msbuild -p:Configuration=Release;Platform=x64;PlatformToolset=v140 || exit /b

Просмотреть файл

@ -21,6 +21,8 @@ environment:
build_script: build_script:
- appveyor.cmd - appveyor.cmd
test: off
pull_requests: pull_requests:
do_not_increment_build_number: true do_not_increment_build_number: true

Просмотреть файл

@ -43,7 +43,7 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="Shared"> <ImportGroup Label="Shared">
<Import Project="..\..\packages\Nerdbank.GitVersioning.3.1.91\build\Nerdbank.GitVersioning.targets" Condition="Exists('..\..\packages\Nerdbank.GitVersioning.3.1.91\build\Nerdbank.GitVersioning.targets')" /> <Import Project="..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets" Condition="Exists('..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets')" />
</ImportGroup> </ImportGroup>
<Import Project="..\NativeMultiTargeting.Build.props" /> <Import Project="..\NativeMultiTargeting.Build.props" />
@ -190,6 +190,6 @@
<PropertyGroup> <PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup> </PropertyGroup>
<Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.3.1.91\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.3.1.91\build\Nerdbank.GitVersioning.targets'))" /> <Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets'))" />
</Target> </Target>
</Project> </Project>

Просмотреть файл

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="Nerdbank.GitVersioning" version="3.1.91" targetFramework="native" developmentDependency="true" /> <package id="Nerdbank.GitVersioning" version="3.3.37" targetFramework="native" developmentDependency="true" />
</packages> </packages>

Просмотреть файл

@ -3,7 +3,7 @@
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.40\build\WixBuildTools.TestSupport.Native.props" Condition="Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.40\build\WixBuildTools.TestSupport.Native.props')" /> <Import Project="..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.props" Condition="Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.props')" />
<ItemGroup Label="ProjectConfigurations"> <ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32"> <ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
@ -63,22 +63,22 @@
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="WixBuildTools.TestSupport"> <Reference Include="WixBuildTools.TestSupport">
<HintPath>..\..\..\packages\WixBuildTools.TestSupport.4.0.40\lib\net472\WixBuildTools.TestSupport.dll</HintPath> <HintPath>..\..\..\packages\WixBuildTools.TestSupport.4.0.47\lib\net472\WixBuildTools.TestSupport.dll</HintPath>
</Reference> </Reference>
<Reference Include="WixBuildTools.TestSupport.Native"> <Reference Include="WixBuildTools.TestSupport.Native">
<HintPath>..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.40\lib\net472\WixBuildTools.TestSupport.Native.dll</HintPath> <HintPath>..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\lib\net472\WixBuildTools.TestSupport.Native.dll</HintPath>
</Reference> </Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\dutil\dutil.vcxproj" /> <ProjectReference Include="..\..\dutil\dutil.vcxproj" />
</ItemGroup> </ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<Import Project="..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.40\build\WixBuildTools.TestSupport.Native.targets" Condition="Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.40\build\WixBuildTools.TestSupport.Native.targets')" /> <Import Project="..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.targets" Condition="Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup> <PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup> </PropertyGroup>
<Error Condition="!Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.40\build\WixBuildTools.TestSupport.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.40\build\WixBuildTools.TestSupport.Native.props'))" /> <Error Condition="!Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.props'))" />
<Error Condition="!Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.40\build\WixBuildTools.TestSupport.Native.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.40\build\WixBuildTools.TestSupport.Native.targets'))" /> <Error Condition="!Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.targets'))" />
</Target> </Target>
</Project> </Project>

Просмотреть файл

@ -6,7 +6,8 @@
<package id="xunit.core" version="2.4.1" /> <package id="xunit.core" version="2.4.1" />
<package id="xunit.extensibility.core" version="2.4.1" /> <package id="xunit.extensibility.core" version="2.4.1" />
<package id="xunit.extensibility.execution" version="2.4.1" /> <package id="xunit.extensibility.execution" version="2.4.1" />
<package id="xunit.runner.msbuild" version="2.4.1" />
<package id="xunit.runner.visualstudio" version="2.4.1" /> <package id="xunit.runner.visualstudio" version="2.4.1" />
<package id="WixBuildTools.TestSupport" version="4.0.40" /> <package id="WixBuildTools.TestSupport" version="4.0.47" />
<package id="WixBuildTools.TestSupport.Native" version="4.0.40" /> <package id="WixBuildTools.TestSupport.Native" version="4.0.47" />
</packages> </packages>