mirror of
https://github.com/danbulant/Cosmos
synced 2026-06-12 19:21:40 +00:00
Test runner cleanup.
Removed TestKernels.csproj.
This commit is contained in:
parent
ec96889b15
commit
ebeef5d635
6 changed files with 75 additions and 82 deletions
11
Test.sln
11
Test.sln
|
|
@ -154,8 +154,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleTest", "Tests\Kernel
|
|||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cosmos.TestRunner.UI.Avalonia", "Tests\Cosmos.TestRunner.UI.Avalonia\Cosmos.TestRunner.UI.Avalonia.csproj", "{2992AA07-E126-4EE0-B31C-D0B2ADE3393A}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestKernels", "Tests\TestKernels\TestKernels.csproj", "{CCFD198D-4859-462B-9EF7-B305A8B4E6FC}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cosmos.Debug.HyperVServer", "source\Cosmos.Debug.HyperVServer\Cosmos.Debug.HyperVServer.csproj", "{3421E19D-16C7-4593-9F6B-291ECB86A3EB}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cosmos.TestRunner.Full", "Tests\Cosmos.TestRunner.Full\Cosmos.TestRunner.Full.csproj", "{65EE0B97-D3F0-400D-B432-85FF5553C44E}"
|
||||
|
|
@ -597,14 +595,6 @@ Global
|
|||
{2992AA07-E126-4EE0-B31C-D0B2ADE3393A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{2992AA07-E126-4EE0-B31C-D0B2ADE3393A}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{2992AA07-E126-4EE0-B31C-D0B2ADE3393A}.Release|x86.Build.0 = Release|Any CPU
|
||||
{CCFD198D-4859-462B-9EF7-B305A8B4E6FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{CCFD198D-4859-462B-9EF7-B305A8B4E6FC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{CCFD198D-4859-462B-9EF7-B305A8B4E6FC}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{CCFD198D-4859-462B-9EF7-B305A8B4E6FC}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{CCFD198D-4859-462B-9EF7-B305A8B4E6FC}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{CCFD198D-4859-462B-9EF7-B305A8B4E6FC}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{CCFD198D-4859-462B-9EF7-B305A8B4E6FC}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{CCFD198D-4859-462B-9EF7-B305A8B4E6FC}.Release|x86.Build.0 = Release|Any CPU
|
||||
{3421E19D-16C7-4593-9F6B-291ECB86A3EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{3421E19D-16C7-4593-9F6B-291ECB86A3EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{3421E19D-16C7-4593-9F6B-291ECB86A3EB}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
|
|
@ -742,7 +732,6 @@ Global
|
|||
{D4B1618A-3653-43CD-B617-20482B12712B} = {29EEC029-6A2B-478A-B6E5-D63A91388ABA}
|
||||
{0DF97CAC-220B-4DAD-B397-42E394255763} = {ECEA7778-E786-4317-90B9-A2D4427CB91C}
|
||||
{2992AA07-E126-4EE0-B31C-D0B2ADE3393A} = {0E67EFE8-5944-4F6C-8B47-C5E06D4C79F5}
|
||||
{CCFD198D-4859-462B-9EF7-B305A8B4E6FC} = {0E67EFE8-5944-4F6C-8B47-C5E06D4C79F5}
|
||||
{3421E19D-16C7-4593-9F6B-291ECB86A3EB} = {F7C6CA93-1D02-443C-9C8B-A1988DE0306B}
|
||||
{65EE0B97-D3F0-400D-B432-85FF5553C44E} = {0E67EFE8-5944-4F6C-8B47-C5E06D4C79F5}
|
||||
{8574E797-7C48-4F12-B537-4F927BCBA93B} = {0E67EFE8-5944-4F6C-8B47-C5E06D4C79F5}
|
||||
|
|
|
|||
|
|
@ -186,15 +186,14 @@ namespace Cosmos.TestRunner.Core
|
|||
|
||||
private void RunIL2CPU(string kernelFileName, string outputFile)
|
||||
{
|
||||
var refsFilePath = Path.Combine(Path.GetTempPath(), Guid.NewGuid() + ".refs");
|
||||
var workingDirectory = Path.Combine(FindCosmosRoot(), "Tests", "TestKernels");
|
||||
var refsFilePath = kernelFileName + ".refs";
|
||||
|
||||
RunProcess("dotnet", workingDirectory, $"msbuild /t:Restore;WriteReferenceAssembliesToFile \"/p:ReferencesFile={refsFilePath}\" /nologo");
|
||||
if (!File.Exists(refsFilePath))
|
||||
{
|
||||
throw new FileNotFoundException("References file not found!", refsFilePath);
|
||||
}
|
||||
|
||||
var xReferences = File.ReadAllLines(refsFilePath);
|
||||
|
||||
File.Delete(refsFilePath);
|
||||
|
||||
var xPlugsReferences = new List<string>();
|
||||
|
||||
if (KernelPkg == "X86")
|
||||
|
|
|
|||
|
|
@ -2,18 +2,33 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
<IsTestRunnerProject>True</IsTestRunnerProject>
|
||||
<TargetLatestRuntimePatch>True</TargetLatestRuntimePatch>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="..\TestKernels\TestKernels.csproj" />
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\source\TheRingMaster\TheRingMaster.csproj" ReferenceOutputAssembly="False" />
|
||||
<ProjectReference Include="..\..\Tools\NASM\NASM.csproj" ReferenceOutputAssembly="False" />
|
||||
<ProjectReference Include="..\Cosmos.TestRunner.Core\Cosmos.TestRunner.Core.csproj" />
|
||||
<ProjectReference Include="$(IL2CPURepoRoot)source\Cosmos.IL2CPU\Cosmos.IL2CPU.csproj" />
|
||||
<ProjectReference Include="$(IL2CPURepoRoot)source\IL2CPU\IL2CPU.csproj" ReferenceOutputAssembly="False" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Kernels\BoxingTests\BoxingTests.csproj" />
|
||||
<ProjectReference Include="..\Kernels\ConsoleTest\ConsoleTest.csproj" />
|
||||
<ProjectReference Include="..\Kernels\Cosmos.Compiler.Tests.Bcl\Cosmos.Compiler.Tests.Bcl.csproj" />
|
||||
<ProjectReference Include="..\Kernels\Cosmos.Compiler.Tests.Encryption\Cosmos.Compiler.Tests.Encryption.csproj" />
|
||||
<ProjectReference Include="..\Kernels\Cosmos.Compiler.Tests.Exceptions\Cosmos.Compiler.Tests.Exceptions.csproj" />
|
||||
<ProjectReference Include="..\Kernels\Cosmos.Compiler.Tests.Interfaces\Cosmos.Compiler.Tests.Interfaces.csproj" />
|
||||
<ProjectReference Include="..\Kernels\Cosmos.Compiler.Tests.MethodTests\Cosmos.Compiler.Tests.MethodTests.csproj" />
|
||||
<ProjectReference Include="..\Kernels\Cosmos.Compiler.Tests.SingleEchoTest\Cosmos.Compiler.Tests.SingleEchoTest.csproj" />
|
||||
<ProjectReference Include="..\Kernels\Cosmos.Compiler.Tests.TypeSystem\Cosmos.Compiler.Tests.TypeSystem.csproj" />
|
||||
<ProjectReference Include="..\Kernels\Cosmos.Kernel.Tests.DiskManager\Cosmos.Kernel.Tests.DiskManager.csproj" />
|
||||
<ProjectReference Include="..\Kernels\Cosmos.Kernel.Tests.Fat2\Cosmos.Kernel.Tests.Fat2.csproj" />
|
||||
<ProjectReference Include="..\Kernels\Cosmos.Kernel.Tests.Fat\Cosmos.Kernel.Tests.Fat.csproj" />
|
||||
<ProjectReference Include="..\Kernels\Cosmos.Kernel.Tests.IO\Cosmos.Kernel.Tests.IO.csproj" />
|
||||
<ProjectReference Include="..\Kernels\GraphicTest\GraphicTest.csproj" />
|
||||
<ProjectReference Include="..\Kernels\SimpleStructsAndArraysTest\SimpleStructsAndArraysTest.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,12 @@
|
|||
<Project>
|
||||
|
||||
<PropertyGroup>
|
||||
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
|
||||
<SelfContained>True</SelfContained>
|
||||
<_UsingDefaultForHasRuntimeOutput>False</_UsingDefaultForHasRuntimeOutput>
|
||||
<HasRuntimeOutput>False</HasRuntimeOutput>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" PrivateAssets="All" />
|
||||
</ItemGroup>
|
||||
|
|
@ -9,18 +16,56 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PlugsProjectReference Include="$(MSBuildThisFileDirectory)..\..\source\Cosmos.Core_Asm\Cosmos.Core_Asm.csproj" />
|
||||
<PlugsProjectReference Include="$(MSBuildThisFileDirectory)..\..\source\Cosmos.Core_Plugs\Cosmos.Core_Plugs.csproj" />
|
||||
<PlugsProjectReference Include="$(MSBuildThisFileDirectory)..\..\source\Cosmos.Debug.Kernel.Plugs.Asm\Cosmos.Debug.Kernel.Plugs.Asm.csproj" />
|
||||
<PlugsProjectReference Include="$(MSBuildThisFileDirectory)..\..\source\Cosmos.System2_Plugs\Cosmos.System2_Plugs.csproj" />
|
||||
<ProjectReference Include="$(MSBuildThisFileDirectory)..\..\source\Cosmos.Core_Asm\Cosmos.Core_Asm.csproj" IsPlugsReference="True" />
|
||||
<ProjectReference Include="$(MSBuildThisFileDirectory)..\..\source\Cosmos.Core_Plugs\Cosmos.Core_Plugs.csproj" IsPlugsReference="True" />
|
||||
<ProjectReference Include="$(MSBuildThisFileDirectory)..\..\source\Cosmos.Debug.Kernel.Plugs.Asm\Cosmos.Debug.Kernel.Plugs.Asm.csproj" IsPlugsReference="True" />
|
||||
<ProjectReference Include="$(MSBuildThisFileDirectory)..\..\source\Cosmos.System2_Plugs\Cosmos.System2_Plugs.csproj" IsPlugsReference="True" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!-- VS 15.8+ -->
|
||||
<!-- <ProjectReference Include="@(PlugsProjectReference)" ExcludeAssets="Compile" /> -->
|
||||
<ProjectReference Include="@(PlugsProjectReference)" PrivateAssets="All" ReferenceOutputAssembly="False" OutputItemType="Content" CopyToOutputDirectory="PreserveNewest" />
|
||||
<ProjectReference Update="@(ProjectReference)">
|
||||
<!-- https://github.com/dotnet/sdk/issues/952 -->
|
||||
<!--<ExcludeAssets Condition="'%(IsPlugsReference)' == 'True'">Compile</ExcludeAssets>-->
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<_ReferencesFile Condition="'$(_ReferencesFile)' == ''">$(TargetPath).refs</_ReferencesFile>
|
||||
<AssignTargetPathsDependsOn>
|
||||
$(AssignTargetPathsDependsOn);
|
||||
_AddReferencesFileToContent
|
||||
</AssignTargetPathsDependsOn>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="_AddReferencesFileToContent">
|
||||
<ItemGroup>
|
||||
<AllItemsFullPathWithTargetPath Include="$(_ReferencesFile)" CopyToOutputDirectory="Always" />
|
||||
<AllItemsFullPathWithTargetPath Update="$(_ReferencesFile)" TargetPath="%(Filename)%(Extension)" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<PropertyGroup>
|
||||
<BuildDependsOn>
|
||||
$(BuildDependsOn);
|
||||
WriteReferenceAssembliesToFile
|
||||
</BuildDependsOn>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="WriteReferenceAssembliesToFile"
|
||||
DependsOnTargets="ResolveReferences;_ComputeNetPublishAssets"
|
||||
Inputs="$(TargetPath)"
|
||||
Outputs="$(_ReferencesFile)">
|
||||
|
||||
<ItemGroup>
|
||||
<_Il2cpuAssemblies Include="@(ResolvedAssembliesToPublish)"
|
||||
Condition="'%(ResolvedAssembliesToPublish.AssetType)' != 'native'
|
||||
AND '%(ResolvedAssembliesToPublish.Extension)' == '.dll'" />
|
||||
</ItemGroup>
|
||||
|
||||
<WriteLinesToFile File="$(_ReferencesFile)" Lines="@(_Il2cpuAssemblies)" Overwrite="True" />
|
||||
|
||||
</Target>
|
||||
|
||||
<Import Project="..\..\Directory.Build.targets" />
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
This project is used by the test runner to resolve the correct references to pass to IL2CPU.
|
||||
This project is also imported by Cosmos.TestRunner.Full, to avoid duplicating the project references to test kernel projects.
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
<Project>
|
||||
|
||||
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" Condition="'$(IsTestRunnerProject)' != 'True'" />
|
||||
|
||||
<PropertyGroup Condition="'$(IsTestRunnerProject)' != 'True'">
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
|
||||
<SelfContained>True</SelfContained>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Kernels\BoxingTests\BoxingTests.csproj" />
|
||||
<ProjectReference Include="..\Kernels\ConsoleTest\ConsoleTest.csproj" />
|
||||
<ProjectReference Include="..\Kernels\Cosmos.Compiler.Tests.Bcl\Cosmos.Compiler.Tests.Bcl.csproj" />
|
||||
<ProjectReference Include="..\Kernels\Cosmos.Compiler.Tests.Encryption\Cosmos.Compiler.Tests.Encryption.csproj" />
|
||||
<ProjectReference Include="..\Kernels\Cosmos.Compiler.Tests.Exceptions\Cosmos.Compiler.Tests.Exceptions.csproj" />
|
||||
<ProjectReference Include="..\Kernels\Cosmos.Compiler.Tests.Interfaces\Cosmos.Compiler.Tests.Interfaces.csproj" />
|
||||
<ProjectReference Include="..\Kernels\Cosmos.Compiler.Tests.MethodTests\Cosmos.Compiler.Tests.MethodTests.csproj" />
|
||||
<ProjectReference Include="..\Kernels\Cosmos.Compiler.Tests.SingleEchoTest\Cosmos.Compiler.Tests.SingleEchoTest.csproj" />
|
||||
<ProjectReference Include="..\Kernels\Cosmos.Compiler.Tests.TypeSystem\Cosmos.Compiler.Tests.TypeSystem.csproj" />
|
||||
<ProjectReference Include="..\Kernels\Cosmos.Kernel.Tests.Fat2\Cosmos.Kernel.Tests.Fat2.csproj" />
|
||||
<ProjectReference Include="..\Kernels\Cosmos.Kernel.Tests.Fat\Cosmos.Kernel.Tests.Fat.csproj" />
|
||||
<ProjectReference Include="..\Kernels\Cosmos.Kernel.Tests.IO\Cosmos.Kernel.Tests.IO.csproj" />
|
||||
<ProjectReference Include="..\Kernels\GraphicTest\GraphicTest.csproj" />
|
||||
<ProjectReference Include="..\Kernels\SimpleStructsAndArraysTest\SimpleStructsAndArraysTest.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\source\Cosmos.Core_Asm\Cosmos.Core_Asm.csproj" />
|
||||
<ProjectReference Include="..\..\source\Cosmos.Core_Plugs\Cosmos.Core_Plugs.csproj" />
|
||||
<ProjectReference Include="..\..\source\Cosmos.Debug.Kernel.Plugs.Asm\Cosmos.Debug.Kernel.Plugs.Asm.csproj" />
|
||||
<ProjectReference Include="..\..\source\Cosmos.System2_Plugs\Cosmos.System2_Plugs.csproj" />
|
||||
<ProjectReference Include="..\..\source\Kernel-X86\10-CPU\Cosmos.CPU_Asm\Cosmos.CPU_Asm.csproj" />
|
||||
<ProjectReference Include="..\..\source\Kernel-X86\10-CPU\Cosmos.CPU_Plugs\Cosmos.CPU_Plugs.csproj" />
|
||||
<ProjectReference Include="..\..\source\Kernel-X86\20-Platform\Cosmos.Platform.PC\Cosmos.Platform.PC.csproj" />
|
||||
<ProjectReference Include="..\..\source\Kernel-X86\91-Plugs\Cosmos.Plugs.TapRoot\Cosmos.Plugs.TapRoot.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="WriteReferenceAssembliesToFile" DependsOnTargets="ResolveReferences;_ComputeNetPublishAssets">
|
||||
|
||||
<Error Condition="'$(ReferencesFile)' == ''" Text="References file path is empty!" />
|
||||
|
||||
<ItemGroup>
|
||||
<_Il2cpuAssemblies Include="@(ResolvedAssembliesToPublish)" Condition="'%(ResolvedAssembliesToPublish.AssetType)' != 'native'" />
|
||||
</ItemGroup>
|
||||
|
||||
<WriteLinesToFile File="$(ReferencesFile)" Lines="@(_Il2cpuAssemblies)" Overwrite="True" />
|
||||
|
||||
</Target>
|
||||
|
||||
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" Condition="'$(IsTestRunnerProject)' != 'True'" />
|
||||
|
||||
</Project>
|
||||
Loading…
Reference in a new issue