Skip to content

Commit

Permalink
apacheGH-36815: [C#]: Enable net472 tests under Windows (apache#36818)
Browse files Browse the repository at this point in the history
### What changes are included in this PR?

The primary C# test project is updated to run for .NET 4.7.2 only on Windows platforms.

### Are these changes tested?

Yes.
* Closes: apache#36815

Authored-by: Curt Hagenlocher <[email protected]>
Signed-off-by: Curt Hagenlocher <[email protected]>
  • Loading branch information
CurtHagenlocher authored and loicalleyne committed Nov 13, 2023
1 parent b198fb9 commit 8a6a4ab
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion csharp/src/Apache.Arrow/Types/Time32Type.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace Apache.Arrow.Types
{
public sealed class Time32Type : TimeType
{
public static readonly Time32Type Default = Millisecond;
public static Time32Type Default => Millisecond;

public override ArrowTypeId TypeId => ArrowTypeId.Time32;
public override string Name => "time32";
Expand Down
2 changes: 1 addition & 1 deletion csharp/src/Apache.Arrow/Types/Time64Type.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace Apache.Arrow.Types
{
public sealed class Time64Type : TimeType
{
public static readonly Time64Type Default = Nanosecond;
public static Time64Type Default => Nanosecond;

public override ArrowTypeId TypeId => ArrowTypeId.Time64;
public override string Name => "time64";
Expand Down
12 changes: 8 additions & 4 deletions csharp/test/Apache.Arrow.Tests/Apache.Arrow.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net7.0</TargetFrameworks>
<!-- TODO: CI can't run with net472 on non-Windows platforms
<TargetFrameworks>net7.0;net472</TargetFrameworks>
-->
<IsWindows Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true'">true</IsWindows>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

<PropertyGroup Condition="'$(IsWindows)'=='true'">
<TargetFrameworks>net7.0;net472</TargetFrameworks>
</PropertyGroup>
<PropertyGroup Condition="'$(IsWindows)'!='true'">
<TargetFrameworks>net7.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="xunit" Version="2.5.2" />
Expand Down

0 comments on commit 8a6a4ab

Please sign in to comment.