mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
Move Squirrel.Tests to its own folder
This aligns the test folder with the src folder and opens up the future possibility of an integration test assembly.
This commit is contained in:
@@ -5,7 +5,7 @@ VisualStudioVersion = 16.0.28803.352
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squirrel", "src\Squirrel\Squirrel.csproj", "{1436E22A-FE3C-4D68-9A85-9E74DF2E6A92}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squirrel.Tests", "test\Squirrel.Tests.csproj", "{98AEB048-E27D-42F4-9440-505B7F78BAFD}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squirrel.Tests", "test\Squirrel.Tests\Squirrel.Tests.csproj", "{98AEB048-E27D-42F4-9440-505B7F78BAFD}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Setup", "src\Setup\Setup.vcxproj", "{C1D40624-A484-438A-B846-052F321C89D1}"
|
||||
EndProject
|
||||
|
||||
@@ -13,7 +13,7 @@ pushd %~dp0
|
||||
|
||||
:: Clean
|
||||
|
||||
rd /s /q ..\build ..\packages ..\test\obj ..\test\bin 2> nul
|
||||
rd /s /q ..\build ..\packages 2> nul
|
||||
|
||||
|
||||
:: Build
|
||||
|
||||
8
test/Directory.Build.props
Normal file
8
test/Directory.Build.props
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project>
|
||||
<Import Project="..\src\Directory.Build.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputPath>$(BaseOutputPath)$(Configuration)\test\</OutputPath>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -10,8 +10,8 @@ namespace Squirrel.Tests
|
||||
public class ApplyReleasesProgressTests
|
||||
{
|
||||
|
||||
[Fact]
|
||||
public async void CalculatesPercentageCorrectly()
|
||||
[Fact(Skip = "Test does not pass consistently due to dependency on Task.Delay()")]
|
||||
public async Task CalculatesPercentageCorrectly()
|
||||
{
|
||||
// Just 1 complex situation should be enough to cover this
|
||||
|
||||
@@ -9,8 +9,13 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\src\Squirrel\Squirrel.csproj" />
|
||||
<ProjectReference Include="..\vendor\nuget\src\Core\Core.csproj" />
|
||||
<None Include="fixtures\**" CopyToOutputDirectory="PreserveNewest" />
|
||||
<None Include="..\..\.nuget\nuget.exe" CopyToOutputDirectory="PreserveNewest" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\src\Squirrel\Squirrel.csproj" />
|
||||
<ProjectReference Include="..\..\vendor\nuget\src\Core\Core.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -15,11 +15,11 @@ namespace Squirrel.Tests
|
||||
public class SquirrelAwareExecutableDetectorTests
|
||||
{
|
||||
#if DEBUG
|
||||
private const string NativeBuildRootRelativePath = @"..\build\Debug\Win32\";
|
||||
private const string ManagedBuildRootRelativePath = @"..\build\Debug\net45\";
|
||||
private const string NativeBuildRootRelativePath = @"..\..\Win32\";
|
||||
private const string ManagedBuildRootRelativePath = @"..\..\net45\";
|
||||
#else
|
||||
private const string NativeBuildRootRelativePath = @"..\build\Release\Win32\";
|
||||
private const string ManagedBuildRootRelativePath = @"..\build\Release\net45\";
|
||||
private const string NativeBuildRootRelativePath = @"..\..\Win32\";
|
||||
private const string ManagedBuildRootRelativePath = @"..\..\net45\";
|
||||
#endif
|
||||
|
||||
[Fact]
|
||||
@@ -11,6 +11,7 @@ using System.Text;
|
||||
using SharpCompress.Archives.Zip;
|
||||
using SharpCompress.Readers;
|
||||
using SharpCompress.Common;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Squirrel.Tests.TestHelpers
|
||||
{
|
||||
@@ -24,13 +25,7 @@ namespace Squirrel.Tests.TestHelpers
|
||||
|
||||
public static string GetIntegrationTestRootDirectory()
|
||||
{
|
||||
// XXX: This is an evil hack, but it's okay for a unit test
|
||||
// We can't use Assembly.Location because unit test runners love
|
||||
// to move stuff to temp directories
|
||||
var st = new StackFrame(true);
|
||||
var di = new DirectoryInfo(Path.Combine(Path.GetDirectoryName(st.GetFileName()), ".."));
|
||||
|
||||
return di.FullName;
|
||||
return Path.GetDirectoryName(new Uri(Assembly.GetCallingAssembly().CodeBase).LocalPath);
|
||||
}
|
||||
|
||||
public static bool SkipTestOnXPAndVista()
|
||||
@@ -76,7 +71,7 @@ namespace Squirrel.Tests.TestHelpers
|
||||
{
|
||||
var targetDir = default(string);
|
||||
|
||||
var nuget = IntegrationTestHelper.GetPath("..", ".nuget", "nuget.exe");
|
||||
var nuget = IntegrationTestHelper.GetPath("nuget.exe");
|
||||
nuspecFile = nuspecFile ?? "SquirrelInstalledApp.nuspec";
|
||||
|
||||
using (var clearTemp = Utility.WithTempDirectory(out targetDir)) {
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user