Skip to content

Commit

Permalink
Fix test paths for changed folder hierarchy
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukasz Mendakiewicz committed Jul 13, 2017
1 parent ddeff66 commit ee549b4
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 22 deletions.
44 changes: 23 additions & 21 deletions GoogleTestAdapter/Tests.Common/TestResources.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,37 +18,39 @@ public static class TestResources
private const string BuildConfig = "Release";
#endif

public const string GtaSolutionDir = @"..\..\..\";
public const string SampleTestsSolutionDir = GtaSolutionDir + @"..\SampleTests\";
public const string TestdataDir = GtaSolutionDir + @"Tests.Common\bin\" + BuildConfig + @"\Resources\TestData\";
public const string RootDir = @"..\..\..\..\..\";
public const string SampleTestsSolutionDir = RootDir + @"SampleTests\";
public const string GoogleTestAdapterBuildDir = RootDir + @"out\binaries\GoogleTestAdapter\" + BuildConfig + @"\";
public const string SampleTestsBuildDir = RootDir + @"out\binaries\SampleTests\";
public const string TestdataDir = GoogleTestAdapterBuildDir + @"Tests.Common\Resources\TestData\";

// helpers
public const string TenSecondsWaiter = GtaSolutionDir + @"TenSecondsWaiter\bin\" + BuildConfig + @"\TenSecondsWaiter.exe";
public const string AlwaysCrashingExe = GtaSolutionDir + BuildConfig + @"\CrashingExe.exe";
public const string AlwaysFailingExe = GtaSolutionDir + BuildConfig + @"\FailingExe.exe";

public const string Tests_DebugX86 = SampleTestsSolutionDir + @"Debug\Tests_gta.exe";
public const string Tests_ReleaseX86 = SampleTestsSolutionDir + @"Release\Tests_gta.exe";
public const string Tests_DebugX86_Gtest170 = SampleTestsSolutionDir + @"Debug\Tests_1.7.0_gta.exe";
public const string Tests_ReleaseX64 = SampleTestsSolutionDir + @"x64\Release\Tests_gta.exe";
public const string TenSecondsWaiter = GoogleTestAdapterBuildDir + @"TenSecondsWaiter\TenSecondsWaiter.exe";
public const string AlwaysCrashingExe = GoogleTestAdapterBuildDir + @"CrashingExe\CrashingExe.exe";
public const string AlwaysFailingExe = GoogleTestAdapterBuildDir + @"FailingExe\FailingExe.exe";

public const string Tests_DebugX86 = SampleTestsBuildDir + @"Debug\Tests_gta.exe";
public const string Tests_ReleaseX86 = SampleTestsBuildDir + @"Release\Tests_gta.exe";
public const string Tests_DebugX86_Gtest170 = SampleTestsBuildDir + @"Debug\Tests_1.7.0_gta.exe";
public const string Tests_ReleaseX64 = SampleTestsBuildDir + @"Release-x64\Tests_gta.exe";
public const string Tests_ReleaseX64_Output = TestdataDir + @"Tests_gta_exe_output.txt";
public const int NrOfTests = 94;
public const int NrOfPassingTests = 40;
public const int NrOfFailingTests = 54;

public static readonly string LoadTests_ReleaseX86 = Path.Combine(SampleTestsSolutionDir, @"Release\LoadTests_gta.exe");
public static readonly string LoadTests_ReleaseX86 = Path.Combine(SampleTestsBuildDir, @"Release\LoadTests_gta.exe");

public static readonly string LongRunningTests_ReleaseX86 = Path.Combine(SampleTestsSolutionDir, @"Release\LongRunningTests_gta.exe");
public static readonly string LongRunningTests_ReleaseX86 = Path.Combine(SampleTestsBuildDir, @"Release\LongRunningTests_gta.exe");

public const string CrashingTests_DebugX86 = SampleTestsSolutionDir + @"Debug\CrashingTests_gta.exe";
public const string CrashingTests_ReleaseX86 = SampleTestsSolutionDir + @"Release\CrashingTests_gta.exe";
public const string CrashingTests_DebugX64 = SampleTestsSolutionDir + @"X64\Debug\CrashingTests_gta.exe";
public const string CrashingTests_ReleaseX64 = SampleTestsSolutionDir + @"X64\Release\CrashingTests_gta.exe";
public const string CrashingTests_DebugX86 = SampleTestsBuildDir + @"Debug\CrashingTests_gta.exe";
public const string CrashingTests_ReleaseX86 = SampleTestsBuildDir + @"Release\CrashingTests_gta.exe";
public const string CrashingTests_DebugX64 = SampleTestsBuildDir + @"Debug-x64\CrashingTests_gta.exe";
public const string CrashingTests_ReleaseX64 = SampleTestsBuildDir + @"Release-x64\CrashingTests_gta.exe";

public const string DllTests_ReleaseX86 = SampleTestsSolutionDir + @"Release\DllTests_gta.exe";
public const string DllTestsDll_ReleaseX86 = SampleTestsSolutionDir + @"Release\DllProject.dll";
public const string DllTests_ReleaseX64 = SampleTestsSolutionDir + @"X64\Release\DllTests_gta.exe";
public const string DllTestsDll_ReleaseX64 = SampleTestsSolutionDir + @"X64\Release\DllProject.dll";
public const string DllTests_ReleaseX86 = SampleTestsBuildDir + @"Release\DllTests_gta.exe";
public const string DllTestsDll_ReleaseX86 = SampleTestsBuildDir + @"Release\DllProject.dll";
public const string DllTests_ReleaseX64 = SampleTestsBuildDir + @"Release-x64\DllTests_gta.exe";
public const string DllTestsDll_ReleaseX64 = SampleTestsBuildDir + @"Release-x64\DllProject.dll";
public const int NrOfDllTests = 2;

public const string SucceedingBatch = @"Tests\Returns0.bat";
Expand Down
5 changes: 4 additions & 1 deletion SampleTests/Common.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)..\, Common.props))\Common.props" />
<PropertyGroup>

<PlatformSuffix Condition="'$(Platform)' == 'Win32'" />
<PlatformSuffix Condition="'$(Platform)' != 'Win32'">-$(Platform)</PlatformSuffix>

<!-- All test binaries should be placed in the same directory -->
<OutDir>$(EnlistmentRoot)out\binaries\$(SolutionName)\$(Configuration)\</OutDir>
<OutDir>$(EnlistmentRoot)out\binaries\$(SolutionName)\$(Configuration)$(PlatformSuffix)\</OutDir>
<OutputPath>$(OutDir)</OutputPath>

</PropertyGroup>
Expand Down

0 comments on commit ee549b4

Please sign in to comment.