wip
Some checks failed
CI / build (push) Failing after 2m49s

This commit is contained in:
Louis Seubert 2026-10-27 21:11:30 +01:00
commit 6694ceb407
Signed by: louis9902
SSH key fingerprint: SHA256:HkW1JCsONisFW0uQchtmqod/1QUpxsEIxbg7aIquMX0
8 changed files with 37 additions and 161 deletions

View file

@ -1,11 +0,0 @@
{
"solution": {
"path": "../../arcade.slnx",
"projects": [
"src/sdk/Sdk/Geekeey.Arcade.NET.Sdk/Geekeey.Arcade.NET.Sdk.csproj",
"src/sdk/Sdk/Geekeey.Arcade.NET.Sdk.Razor/Geekeey.Arcade.NET.Sdk.Razor.csproj",
"src/sdk/Sdk/Geekeey.Arcade.NET.Sdk.Test/Geekeey.Arcade.NET.Sdk.Test.csproj",
"src/sdk/Sdk/Geekeey.Arcade.NET.Sdk.Web/Geekeey.Arcade.NET.Sdk.Web.csproj"
]
}
}

6
src/sdk/Sdk.slnx Normal file
View file

@ -0,0 +1,6 @@
<Solution>
<Project Path="Sdk/Geekeey.Arcade.NET.Sdk/Geekeey.Arcade.NET.Sdk.csproj" />
<Project Path="Sdk/Geekeey.Arcade.NET.Sdk.Razor/Geekeey.Arcade.NET.Sdk.Razor.csproj" />
<Project Path="Sdk/Geekeey.Arcade.NET.Sdk.Test/Geekeey.Arcade.NET.Sdk.Test.csproj" />
<Project Path="Sdk/Geekeey.Arcade.NET.Sdk.Web/Geekeey.Arcade.NET.Sdk.Web.csproj" />
</Solution>

View file

@ -6,9 +6,6 @@
<SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking>
<IncludeSymbols>false</IncludeSymbols>
<IsPackable>true</IsPackable>
<!-- The packaging project is not a testing platform application itself: the Microsoft.Testing.Platform
package flows to consumers and defaults 'IsTestingPlatformApplication' to true there. -->
<IsTestingPlatformApplication>false</IsTestingPlatformApplication>
<Description>MSBuild SDK for test projects with standardized build, analyzer, and editor configuration defaults.</Description>
</PropertyGroup>
@ -23,8 +20,5 @@
<None Include="../../common/Common.props" Pack="true" PackagePath="common/Common.props" />
<None Include="../../common/Common.targets" Pack="true" PackagePath="common/Common.targets" />
<None Include="../../configuration/**/*" Pack="true" PackagePath="configuration/%(RecursiveDir)%(Filename)%(Extension)" />
<None Include="extensions/TestingPlatformExtensions.props" Pack="true" PackagePath="Sdk/TestingPlatformExtensions.props" />
<None Include="extensions/TestingPlatformExtensions.targets" Pack="true" PackagePath="Sdk/TestingPlatformExtensions.targets" />
<None Include="extensions/TestingPlatformExtensions.cs" Pack="true" PackagePath="common/source/TestingPlatformExtensions.cs" />
</ItemGroup>
</Project>

View file

@ -14,6 +14,4 @@
<EditorConfigFiles Include="$(MSBuildThisFileDirectory)../configuration/Geekeey.Arcade.NET.Sdk.Test.editorconfig" />
<EditorConfigFiles Include="$(MSBuildThisFileDirectory)../configuration/Geekeey.Arcade.NET.FileBasedProgram.editorconfig" Condition="'$(FileBasedProgram)' == 'true'" />
</ItemGroup>
<Import Project="$(MSBuildThisFileDirectory)TestingPlatformExtensions.props" />
</Project>

View file

@ -1,5 +1,3 @@
<Project>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" Condition="'$(_MustImportMicrosoftNETSdk)' == 'true'" />
<Import Project="$(MSBuildThisFileDirectory)TestingPlatformExtensions.targets" />
</Project>

View file

@ -1,60 +0,0 @@
// Copyright (c) The Geekeey Authors
// SPDX-License-Identifier: EUPL-1.2
// <auto-generated>
// This file is generated into the test project by Geekeey.Arcade.NET.Sdk.Test.
// </auto-generated>
#nullable enable
#pragma warning disable TPEXP
using Microsoft.Testing.Platform.Builder;
using Microsoft.Testing.Platform.CommandLine;
using Microsoft.Testing.Platform.Configurations;
namespace Geekeey.Arcade.NET.Sdk.Test;
public static class TestingPlatformExtensions
{
public static void AddExtensions(ITestApplicationBuilder builder, string[] arguments)
{
builder.Configuration.AddConfigurationSource(() => new ResultDirectoryConfigurationSource());
}
public static class TestingPlatformBuilderHook
{
public static void AddExtensions(ITestApplicationBuilder builder, string[] arguments)
=> TestingPlatformExtensions.AddExtensions(builder, arguments);
}
private sealed class ResultDirectoryConfigurationSource : IConfigurationSource
{
public string Uid => "Geekeey.Arcade.NET.Sdk.Test.TestingPlatformExtensions";
public string Version => "1.0.0";
public string DisplayName => "Geekeey Arcade Testing Platform extensions";
public string Description => "Uses the artifacts directory for test results by default.";
public Task<bool> IsEnabledAsync() => Task.FromResult(true);
public int Order => 4;
public Task<IConfigurationProvider> BuildAsync(CommandLineParseResult commandLineParseResult)
=> Task.FromResult<IConfigurationProvider>(new ResultDirectoryConfigurationProvider());
}
private sealed class ResultDirectoryConfigurationProvider : IConfigurationProvider
{
public Task LoadAsync() => Task.CompletedTask;
public bool TryGet(string key, out string? value)
{
if (string.Equals(key, "platformOptions:resultDirectory", StringComparison.OrdinalIgnoreCase))
{
value = @"__ARTIFACTS_PATH__";
return true;
}
value = null;
return false;
}
}
}

View file

@ -1,9 +0,0 @@
<Project>
<!-- Register the SDK's Testing Platform extensions with MTP's generated entry point. -->
<ItemGroup Condition="'$(IsTestProject)' == 'true' and '$(Language)' == 'C#' and '$(ArtifactsPath)' != ''">
<TestingPlatformBuilderHook Include="D7E9E4C8-5F8A-4D0D-9C0E-9C3D0A5B2A11">
<DisplayName>Geekeey Arcade Testing Platform extensions</DisplayName>
<TypeFullName>Geekeey.Arcade.NET.Sdk.Test.TestingPlatformExtensions.TestingPlatformBuilderHook</TypeFullName>
</TestingPlatformBuilderHook>
</ItemGroup>
</Project>

View file

@ -1,31 +0,0 @@
<Project>
<PropertyGroup>
<_ArcadeTestingPlatformExtensionsSourcePath>$(MSBuildThisFileDirectory)../common/source/TestingPlatformExtensions.cs</_ArcadeTestingPlatformExtensionsSourcePath>
<_ArcadeTestingPlatformExtensionsGeneratedPath>$(IntermediateOutputPath)TestingPlatformExtensions.g.cs</_ArcadeTestingPlatformExtensionsGeneratedPath>
</PropertyGroup>
<Target Name="_GenerateArcadeTestingPlatformExtensions" BeforeTargets="CoreCompile"
Inputs="$(_ArcadeTestingPlatformExtensionsSourcePath)" Outputs="$(_ArcadeTestingPlatformExtensionsGeneratedPath)"
Condition="'$(Language)' == 'C#' and '$(ArtifactsPath)' != ''">
<ReadLinesFromFile File="$(_ArcadeTestingPlatformExtensionsSourcePath)">
<Output TaskParameter="Lines" ItemName="_ArcadeTestingPlatformExtensionsSourceLine" />
</ReadLinesFromFile>
<ItemGroup>
<_ArcadeTestingPlatformExtensionsSourceLineWithPath Include="@(_ArcadeTestingPlatformExtensionsSourceLine-&gt;Replace('__ARTIFACTS_PATH__', '$(ArtifactsPath)'))" />
</ItemGroup>
<WriteLinesToFile
File="$(_ArcadeTestingPlatformExtensionsGeneratedPath)"
Lines="@(_ArcadeTestingPlatformExtensionsSourceLineWithPath)"
Overwrite="true"
WriteOnlyWhenDifferent="true" />
</Target>
<Target Name="_IncludeArcadeTestingPlatformExtensions" BeforeTargets="CoreCompile"
DependsOnTargets="_GenerateArcadeTestingPlatformExtensions"
Condition="'$(Language)' == 'C#' and '$(ArtifactsPath)' != ''">
<ItemGroup>
<Compile Remove="**/TestingPlatformExtensions.g.cs" />
<FileWrites Include="$(_ArcadeTestingPlatformExtensionsGeneratedPath)" />
</ItemGroup>
</Target>
</Project>