Merge pull request #539 from CJ-SPT/test-mod
Intoduce test mod and restructure test suites into their own solution folder
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="..\Build.props" />
|
||||
<Import Project="..\..\Build.props" />
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
@@ -7,14 +7,16 @@
|
||||
<ItemGroup>
|
||||
<PackageReference Include="BenchmarkDotNet" Version="0.15.2" />
|
||||
<PackageReference Include="FastCloner" Version="3.3.10" />
|
||||
<ProjectReference Include="..\Libraries\SPTarkov.Server.Core\SPTarkov.Server.Core.csproj" />
|
||||
<ProjectReference Include="..\Libraries\SPTarkov.Server.Assets\SPTarkov.Server.Assets.csproj" />
|
||||
<ProjectReference Include="..\Libraries\SPTarkov.Common\SPTarkov.Common.csproj" />
|
||||
<ProjectReference Include="..\Libraries\SPTarkov.DI\SPTarkov.DI.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Assets\**">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Libraries\SPTarkov.Common\SPTarkov.Common.csproj" />
|
||||
<ProjectReference Include="..\..\Libraries\SPTarkov.DI\SPTarkov.DI.csproj" />
|
||||
<ProjectReference Include="..\..\Libraries\SPTarkov.Server.Assets\SPTarkov.Server.Assets.csproj" />
|
||||
<ProjectReference Include="..\..\Libraries\SPTarkov.Server.Core\SPTarkov.Server.Core.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,32 @@
|
||||
using SPTarkov.DI.Annotations;
|
||||
using SPTarkov.Server.Core.DI;
|
||||
using SPTarkov.Server.Core.Models.Spt.Mod;
|
||||
using SPTarkov.Server.Core.Models.Utils;
|
||||
|
||||
namespace TestMod;
|
||||
|
||||
public record TestModMetadata : AbstractModMetadata
|
||||
{
|
||||
public override string ModGuid { get; init; } = "com.sp-tarkov.test-mod";
|
||||
public override string Name { get; init; } = "test-mod";
|
||||
public override string Author { get; init; } = "SPTarkov";
|
||||
public override List<string>? Contributors { get; set; }
|
||||
public override string Version { get; init; } = "1.0.0";
|
||||
public override string SptVersion { get; init; } = "4.0.0";
|
||||
public override List<string>? LoadBefore { get; set; }
|
||||
public override List<string>? LoadAfter { get; set; }
|
||||
public override List<string>? Incompatibilities { get; set; }
|
||||
public override Dictionary<string, string>? ModDependencies { get; set; }
|
||||
public override string? Url { get; set; }
|
||||
public override bool? IsBundleMod { get; set; }
|
||||
public override string? License { get; init; } = "MIT";
|
||||
}
|
||||
|
||||
[Injectable(TypePriority = OnLoadOrder.PostDBModLoader + 1)]
|
||||
public class TestMod(ISptLogger<TestMod> logger) : IOnLoad
|
||||
{
|
||||
public Task OnLoad()
|
||||
{
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="..\..\Build.props" />
|
||||
<PropertyGroup>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Libraries\SPTarkov.Common\SPTarkov.Common.csproj" />
|
||||
<ProjectReference Include="..\..\Libraries\SPTarkov.DI\SPTarkov.DI.csproj" />
|
||||
<ProjectReference Include="..\..\Libraries\SPTarkov.Reflection\SPTarkov.Reflection.csproj" />
|
||||
<ProjectReference Include="..\..\Libraries\SPTarkov.Server.Assets\SPTarkov.Server.Assets.csproj" />
|
||||
<ProjectReference Include="..\..\Libraries\SPTarkov.Server.Core\SPTarkov.Server.Core.csproj" />
|
||||
</ItemGroup>
|
||||
<Target Name="CopyToServer" AfterTargets="PostBuildEvent">
|
||||
<ItemGroup>
|
||||
<OutputDLL Include="$(ProjectDir)$(OutDir)$(TargetName).dll" />
|
||||
<Resources Include="$(ProjectDir)Resources\**\*.*" />
|
||||
</ItemGroup>
|
||||
<!-- Copies the output dll -->
|
||||
<Copy SourceFiles="@(OutputDLL);" DestinationFolder="$(SolutionDir)\SPTarkov.Server\bin\$(Configuration)\net9.0\user\mods\TestMod" />
|
||||
<Copy
|
||||
SourceFiles="@(Resources);"
|
||||
DestinationFolder="$(SolutionDir)\SPTarkov.Server\bin\$(Configuration)\net9.0\user\mods\TestMod\Resources\%(RecursiveDir)"
|
||||
/>
|
||||
</Target>
|
||||
</Project>
|
||||
@@ -1,5 +1,5 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="..\Build.props" />
|
||||
<Import Project="..\..\Build.props" />
|
||||
<PropertyGroup>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
@@ -9,10 +9,10 @@
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="4.3.1" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Libraries\SPTarkov.Server.Assets\SPTarkov.Server.Assets.csproj" />
|
||||
<ProjectReference Include="..\Libraries\SPTarkov.Server.Core\SPTarkov.Server.Core.csproj" />
|
||||
<ProjectReference Include="..\Libraries\SPTarkov.DI\SPTarkov.DI.csproj" />
|
||||
<ProjectReference Include="..\Libraries\SPTarkov.Common\SPTarkov.Common.csproj" />
|
||||
<ProjectReference Include="..\..\Libraries\SPTarkov.Server.Assets\SPTarkov.Server.Assets.csproj" />
|
||||
<ProjectReference Include="..\..\Libraries\SPTarkov.Server.Core\SPTarkov.Server.Core.csproj" />
|
||||
<ProjectReference Include="..\..\Libraries\SPTarkov.DI\SPTarkov.DI.csproj" />
|
||||
<ProjectReference Include="..\..\Libraries\SPTarkov.Common\SPTarkov.Common.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="TestAssets\**">
|
||||
+23
-12
@@ -10,8 +10,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SPTarkov.Server.Core", "Lib
|
||||
{20A5EBD3-75D1-4E06-8240-09EEF874017A} = {20A5EBD3-75D1-4E06-8240-09EEF874017A}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTests", "UnitTests\UnitTests.csproj", "{6C0681F9-4013-4579-82DA-0A9297984FD3}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{F084DDFD-89F3-44F9-89C3-5CA11F4CDEEF}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{587959C2-5AFA-4B77-B327-566610F9A289}"
|
||||
@@ -26,8 +24,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SPTarkov.Server.Assets", "L
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HideoutCraftQuestIdGenerator", "Tools\HideoutCraftQuestIdGenerator\HideoutCraftQuestIdGenerator.csproj", "{C24B1FEB-F8AC-434E-998D-5DA4D1687295}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Benchmarks", "Benchmarks\Benchmarks.csproj", "{6884273A-72E9-4035-B5BE-EE101C69F5F5}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SPTarkov.Reflection", "Libraries\SPTarkov.Reflection\SPTarkov.Reflection.csproj", "{9073A593-A2F5-471E-9678-B896A7226FD4}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JsonExtensionDataGenerator", "Tools\JsonExtensionDataGenerator\JsonExtensionDataGenerator.csproj", "{6F4670CD-6861-47A8-9A02-2B63AD73A929}"
|
||||
@@ -36,6 +32,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Patches", "Patches", "{9E41
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ceciler.Virtualizer", "Patches\Ceciler.Virtualizer\Ceciler.Virtualizer.csproj", "{20A5EBD3-75D1-4E06-8240-09EEF874017A}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Testing", "Testing", "{07B50C44-6D38-474E-87AF-68672D241EEB}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Benchmarks", "Testing\Benchmarks\Benchmarks.csproj", "{3E342BAC-EE44-44E4-8E99-393F0C9F787C}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTests", "Testing\UnitTests\UnitTests.csproj", "{28B90486-1436-4CD7-88D0-122B6963AB58}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestMod", "Testing\TestMod\TestMod.csproj", "{755E473C-14F2-40BC-9377-2FAB11CA91DC}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@@ -50,10 +54,6 @@ Global
|
||||
{AC8643DC-8779-4B4A-BBDA-2D4CC466F765}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{AC8643DC-8779-4B4A-BBDA-2D4CC466F765}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{AC8643DC-8779-4B4A-BBDA-2D4CC466F765}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{6C0681F9-4013-4579-82DA-0A9297984FD3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{6C0681F9-4013-4579-82DA-0A9297984FD3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{6C0681F9-4013-4579-82DA-0A9297984FD3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6C0681F9-4013-4579-82DA-0A9297984FD3}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{4B4AF50D-B2C6-47D1-B567-EA4560D8CBA1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4B4AF50D-B2C6-47D1-B567-EA4560D8CBA1}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4B4AF50D-B2C6-47D1-B567-EA4560D8CBA1}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
@@ -74,10 +74,6 @@ Global
|
||||
{C24B1FEB-F8AC-434E-998D-5DA4D1687295}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C24B1FEB-F8AC-434E-998D-5DA4D1687295}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C24B1FEB-F8AC-434E-998D-5DA4D1687295}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{6884273A-72E9-4035-B5BE-EE101C69F5F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{6884273A-72E9-4035-B5BE-EE101C69F5F5}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{6884273A-72E9-4035-B5BE-EE101C69F5F5}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6884273A-72E9-4035-B5BE-EE101C69F5F5}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{9073A593-A2F5-471E-9678-B896A7226FD4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9073A593-A2F5-471E-9678-B896A7226FD4}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9073A593-A2F5-471E-9678-B896A7226FD4}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
@@ -90,6 +86,18 @@ Global
|
||||
{20A5EBD3-75D1-4E06-8240-09EEF874017A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{20A5EBD3-75D1-4E06-8240-09EEF874017A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{20A5EBD3-75D1-4E06-8240-09EEF874017A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{3E342BAC-EE44-44E4-8E99-393F0C9F787C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{3E342BAC-EE44-44E4-8E99-393F0C9F787C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{3E342BAC-EE44-44E4-8E99-393F0C9F787C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{3E342BAC-EE44-44E4-8E99-393F0C9F787C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{28B90486-1436-4CD7-88D0-122B6963AB58}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{28B90486-1436-4CD7-88D0-122B6963AB58}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{28B90486-1436-4CD7-88D0-122B6963AB58}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{28B90486-1436-4CD7-88D0-122B6963AB58}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{755E473C-14F2-40BC-9377-2FAB11CA91DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{755E473C-14F2-40BC-9377-2FAB11CA91DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{755E473C-14F2-40BC-9377-2FAB11CA91DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{755E473C-14F2-40BC-9377-2FAB11CA91DC}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@@ -104,5 +112,8 @@ Global
|
||||
{9073A593-A2F5-471E-9678-B896A7226FD4} = {F084DDFD-89F3-44F9-89C3-5CA11F4CDEEF}
|
||||
{6F4670CD-6861-47A8-9A02-2B63AD73A929} = {587959C2-5AFA-4B77-B327-566610F9A289}
|
||||
{20A5EBD3-75D1-4E06-8240-09EEF874017A} = {9E41CD5A-271C-4294-AAF9-8EB379311416}
|
||||
{3E342BAC-EE44-44E4-8E99-393F0C9F787C} = {07B50C44-6D38-474E-87AF-68672D241EEB}
|
||||
{28B90486-1436-4CD7-88D0-122B6963AB58} = {07B50C44-6D38-474E-87AF-68672D241EEB}
|
||||
{755E473C-14F2-40BC-9377-2FAB11CA91DC} = {07B50C44-6D38-474E-87AF-68672D241EEB}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||
Reference in New Issue
Block a user