Skip to content

Commit 659e039

Browse files
Merge pull request #413 from TNG/ci/run-cpp-cli-test-on-windows-only
Run C++/CLI Test only on Windows
2 parents 4dc1594 + 5047fa3 commit 659e039

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

ArchUnitNETTests/ArchUnitNETTests.csproj

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
77
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
88
</PropertyGroup>
9+
<PropertyGroup Condition="'$(OS)' == 'Windows_NT'">
10+
<DefineConstants>$(DefineConstants);WINDOWS</DefineConstants>
11+
</PropertyGroup>
912
<ItemGroup>
1013
<ProjectReference Include="..\ArchUnitNET.xUnit\ArchUnitNET.xUnit.csproj" />
1114
<ProjectReference Include="..\TestAssemblies\InterfaceAssembly\InterfaceAssembly.csproj" />
@@ -37,18 +40,19 @@
3740
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.4" />
3841
</ItemGroup>
3942
<ItemGroup>
40-
<None Update="Dependencies\cpplib\CppDllTest.dll">
41-
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
42-
</None>
4343
<None Update="Domain\PlantUml\zzz_test_version_with_errors.puml">
4444
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
4545
</None>
4646
</ItemGroup>
4747
<ItemGroup>
48-
<Folder Include="Dependencies\cpplib\" />
4948
<Folder Include="Fluent\Syntax\Elements\Snapshots\" />
5049
</ItemGroup>
51-
<ItemGroup>
50+
<!-- Windows-only C++/CLI dependency -->
51+
<ItemGroup Condition="'$(OS)' == 'Windows_NT'">
52+
<None Update="Dependencies\cpplib\CppDllTest.dll">
53+
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
54+
</None>
55+
<Folder Include="Dependencies\cpplib\" />
5256
<Reference Include="CppDllTest">
5357
<HintPath>Dependencies\cpplib\CppDllTest.dll</HintPath>
5458
</Reference>

ArchUnitNETTests/Dependencies/CppDependenciesTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
namespace ArchUnitNETTests.Dependencies
77
{
8+
#if WINDOWS
89
public class CppDependenciesTests
910
{
1011
private static readonly Architecture Architecture = new ArchLoader()
@@ -26,6 +27,7 @@ internal class CppExampleClassUser
2627
{
2728
CppExampleClass _cppExampleClass = new CppExampleClass();
2829
}
30+
#endif
2931

3032
/*
3133
* C++/CLI code contains the next .h .cpp content

0 commit comments

Comments
 (0)