From 2fd251e7b1c383df7f7af212b2023a08c3d9371f Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Fri, 27 Jan 2023 14:24:30 +0100 Subject: [PATCH] Fix running tests on Linux with dotne7 --- .github/workflows/tests.yml | 10 +- Source/FlaxTests.Build.cs | 2 +- .../Microsoft.Extensions.DependencyModel.dll | 3 + .../DotNet/NUnit/nunit.engine.api.dll | 4 +- .../DotNet/NUnit/nunit.engine.core.dll | 4 +- .../Platforms/DotNet/NUnit/nunit.engine.dll | 4 +- .../NUnit/nunit3-netcore-console.deps.json | 319 ++++++++++++++++++ .../DotNet/NUnit/nunit3-netcore-console.dll | 3 + .../NUnit/nunit3-netcore-console.dll.config | 35 ++ .../nunit3-netcore-console.runtimeconfig.json | 13 + .../NUnit/testcentric.engine.metadata.dll | 4 +- 11 files changed, 387 insertions(+), 14 deletions(-) create mode 100644 Source/Platforms/DotNet/NUnit/Microsoft.Extensions.DependencyModel.dll create mode 100644 Source/Platforms/DotNet/NUnit/nunit3-netcore-console.deps.json create mode 100644 Source/Platforms/DotNet/NUnit/nunit3-netcore-console.dll create mode 100644 Source/Platforms/DotNet/NUnit/nunit3-netcore-console.dll.config create mode 100644 Source/Platforms/DotNet/NUnit/nunit3-netcore-console.runtimeconfig.json diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index fc43086d2..add822324 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -32,16 +32,16 @@ jobs: run: | ./GenerateProjectFiles.sh -vs2022 ./Development/Scripts/Linux/CallBuildTool.sh -build -log -arch=x64 -platform=Linux -configuration=Development -buildtargets=FlaxTestsTarget - ./Development/Scripts/Linux/CallBuildTool.sh -build -log -arch=x64 -platform=Linux -configuration=Debug -buildtargets="Flax.Build.Tests" + dotnet msbuild Source/Tools/Flax.Build.Tests/Flax.Build.Tests.csproj /m /t:Restore,Build /p:Configuration=Debug /p:Platform=AnyCPU /nologo - name: Test run: | - Binaries/Editor/Linux/Development/FlaxTests - dotnet Source/Platforms/DotNet/NUnit/nunit3-console.exe Binaries/Editor/Linux/Development/FlaxEngine.CSharp.dll --framework=netcore-7.0 - dotnet Source/Platforms/DotNet/NUnit/nunit3-console.exe Binaries/Tests/Flax.Build.Tests.dll --framework=netcore-7.0 + ${GITHUB_WORKSPACE}/Binaries/Editor/Linux/Development/FlaxTests + dotnet Source/Platforms/DotNet/NUnit/nunit3-netcore-console.dll Binaries/Editor/Linux/Development/FlaxEngine.CSharp.dll + dotnet Source/Platforms/DotNet/NUnit/nunit3-netcore-console.dll Binaries/Tests/Flax.Build.Tests.dll - name: Test UseLargeWorlds run: | ./Development/Scripts/Linux/CallBuildTool.sh -build -log -arch=x64 -platform=Linux -configuration=Development -buildtargets=FlaxTestsTarget -UseLargeWorlds=true - Binaries/Editor/Linux/Development/FlaxTests + ${GITHUB_WORKSPACE}/Binaries/Editor/Linux/Development/FlaxTests # Tests on Windows tests-windows: diff --git a/Source/FlaxTests.Build.cs b/Source/FlaxTests.Build.cs index 72f023663..7d8275268 100644 --- a/Source/FlaxTests.Build.cs +++ b/Source/FlaxTests.Build.cs @@ -20,7 +20,7 @@ public class FlaxTestsTarget : FlaxEditor OutputName = "FlaxTests"; ConfigurationName = "Tests"; IsPreBuilt = false; - UseSymbolsExports = false; + UseSymbolsExports = true; Platforms = new[] { TargetPlatform.Windows, diff --git a/Source/Platforms/DotNet/NUnit/Microsoft.Extensions.DependencyModel.dll b/Source/Platforms/DotNet/NUnit/Microsoft.Extensions.DependencyModel.dll new file mode 100644 index 000000000..c0315dc59 --- /dev/null +++ b/Source/Platforms/DotNet/NUnit/Microsoft.Extensions.DependencyModel.dll @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:693ad69d561f8533c9c45c41d8bcd9810547e2e862dffb275b10b5eb0dab9a6b +size 67960 diff --git a/Source/Platforms/DotNet/NUnit/nunit.engine.api.dll b/Source/Platforms/DotNet/NUnit/nunit.engine.api.dll index 8097fec02..1190c4edb 100644 --- a/Source/Platforms/DotNet/NUnit/nunit.engine.api.dll +++ b/Source/Platforms/DotNet/NUnit/nunit.engine.api.dll @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:695191d3cc03eea28fee47cc265d977a8cb884bf0a8e8403a8006c0141edbca1 -size 18432 +oid sha256:12e2330938618cbf2c457be2c0e75d242b91e87d3c033d8cfb86c8957ed0e0a8 +size 17920 diff --git a/Source/Platforms/DotNet/NUnit/nunit.engine.core.dll b/Source/Platforms/DotNet/NUnit/nunit.engine.core.dll index e70119fd5..711ab93d9 100644 --- a/Source/Platforms/DotNet/NUnit/nunit.engine.core.dll +++ b/Source/Platforms/DotNet/NUnit/nunit.engine.core.dll @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:56d27370c602bf1b6f4cb1d14ac634e71d693c7cea3e256d6d578f057509c0fa -size 111616 +oid sha256:4eff8853d7f3f8e20384a09a010780d6ac81923a5fecd8f21753ceb053db55c2 +size 89600 diff --git a/Source/Platforms/DotNet/NUnit/nunit.engine.dll b/Source/Platforms/DotNet/NUnit/nunit.engine.dll index efe00b34b..6e3f2e183 100644 --- a/Source/Platforms/DotNet/NUnit/nunit.engine.dll +++ b/Source/Platforms/DotNet/NUnit/nunit.engine.dll @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2c4873d02f61aa83738c9265b6f11a5ea13b0620fa2fb331a40e3ceb2e191599 -size 65024 +oid sha256:7584c2fecbdbefc8ddd0b49d9e8bc4bdd527ec9ba204ef3d95dca3a0bae16e05 +size 47616 diff --git a/Source/Platforms/DotNet/NUnit/nunit3-netcore-console.deps.json b/Source/Platforms/DotNet/NUnit/nunit3-netcore-console.deps.json new file mode 100644 index 000000000..156558138 --- /dev/null +++ b/Source/Platforms/DotNet/NUnit/nunit3-netcore-console.deps.json @@ -0,0 +1,319 @@ +{ + "runtimeTarget": { + "name": ".NETCoreApp,Version=v6.0", + "signature": "" + }, + "compilationOptions": {}, + "targets": { + ".NETCoreApp,Version=v6.0": { + "nunit3-netcore-console/3.16.1": { + "dependencies": { + "nunit.engine": "3.16.1", + "nunit.engine.api": "3.16.1" + }, + "runtime": { + "nunit3-netcore-console.dll": {} + } + }, + "Microsoft.Extensions.DependencyModel/3.1.0": { + "dependencies": { + "System.Text.Json": "4.7.0" + }, + "runtime": { + "lib/netstandard2.0/Microsoft.Extensions.DependencyModel.dll": { + "assemblyVersion": "3.1.0.0", + "fileVersion": "3.100.19.56502" + } + } + }, + "Microsoft.NETCore.Platforms/1.1.0": {}, + "Microsoft.NETCore.Targets/1.1.0": {}, + "Microsoft.Win32.Registry/4.3.0": { + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Collections": "4.3.0", + "System.Globalization": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0" + } + }, + "System.Collections/4.3.0": { + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Globalization/4.3.0": { + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.IO/4.3.0": { + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, + "System.Reflection/4.3.0": { + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.IO": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Reflection.Primitives/4.3.0": { + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Resources.ResourceManager/4.3.0": { + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Globalization": "4.3.0", + "System.Reflection": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Runtime/4.3.0": { + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0" + } + }, + "System.Runtime.Extensions/4.3.0": { + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Runtime.Handles/4.3.0": { + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Runtime.InteropServices/4.3.0": { + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Reflection": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Handles": "4.3.0" + } + }, + "System.Text.Encoding/4.3.0": { + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Text.Json/4.7.0": {}, + "System.Threading.Tasks/4.3.0": { + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "TestCentric.Metadata/1.7.1": { + "runtime": { + "lib/netstandard2.0/testcentric.engine.metadata.dll": { + "assemblyVersion": "1.7.1.0", + "fileVersion": "1.7.1.0" + } + } + }, + "nunit.engine/3.16.1": { + "dependencies": { + "nunit.engine.api": "3.16.1", + "nunit.engine.core": "3.16.1" + }, + "runtime": { + "nunit.engine.dll": {} + } + }, + "nunit.engine.api/3.16.1": { + "runtime": { + "nunit.engine.api.dll": {} + } + }, + "nunit.engine.core/3.16.1": { + "dependencies": { + "Microsoft.Extensions.DependencyModel": "3.1.0", + "Microsoft.Win32.Registry": "4.3.0", + "TestCentric.Metadata": "1.7.1", + "nunit.engine.api": "3.16.1" + }, + "runtime": { + "nunit.engine.core.dll": {} + } + } + } + }, + "libraries": { + "nunit3-netcore-console/3.16.1": { + "type": "project", + "serviceable": false, + "sha512": "" + }, + "Microsoft.Extensions.DependencyModel/3.1.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-8tBjqI1xU3CNjdXMZF7BaY71ChU44x30QtHI2rVmPB3+3PjYi+YGhVTV5+IOlc40F81Bylh4gWwHET3jVKFE4Q==", + "path": "microsoft.extensions.dependencymodel/3.1.0", + "hashPath": "microsoft.extensions.dependencymodel.3.1.0.nupkg.sha512" + }, + "Microsoft.NETCore.Platforms/1.1.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==", + "path": "microsoft.netcore.platforms/1.1.0", + "hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512" + }, + "Microsoft.NETCore.Targets/1.1.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==", + "path": "microsoft.netcore.targets/1.1.0", + "hashPath": "microsoft.netcore.targets.1.1.0.nupkg.sha512" + }, + "Microsoft.Win32.Registry/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-Lw1/VwLH1yxz6SfFEjVRCN0pnflLEsWgnV4qsdJ512/HhTwnKXUG+zDQ4yTO3K/EJQemGoNaBHX5InISNKTzUQ==", + "path": "microsoft.win32.registry/4.3.0", + "hashPath": "microsoft.win32.registry.4.3.0.nupkg.sha512" + }, + "System.Collections/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-3Dcj85/TBdVpL5Zr+gEEBUuFe2icOnLalmEh9hfck1PTYbbyWuZgh4fmm2ysCLTrqLQw6t3TgTyJ+VLp+Qb+Lw==", + "path": "system.collections/4.3.0", + "hashPath": "system.collections.4.3.0.nupkg.sha512" + }, + "System.Globalization/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-kYdVd2f2PAdFGblzFswE4hkNANJBKRmsfa2X5LG2AcWE1c7/4t0pYae1L8vfZ5xvE2nK/R9JprtToA61OSHWIg==", + "path": "system.globalization/4.3.0", + "hashPath": "system.globalization.4.3.0.nupkg.sha512" + }, + "System.IO/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-3qjaHvxQPDpSOYICjUoTsmoq5u6QJAFRUITgeT/4gqkF1bajbSmb1kwSxEA8AHlofqgcKJcM8udgieRNhaJ5Cg==", + "path": "system.io/4.3.0", + "hashPath": "system.io.4.3.0.nupkg.sha512" + }, + "System.Reflection/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-KMiAFoW7MfJGa9nDFNcfu+FpEdiHpWgTcS2HdMpDvt9saK3y/G4GwprPyzqjFH9NTaGPQeWNHU+iDlDILj96aQ==", + "path": "system.reflection/4.3.0", + "hashPath": "system.reflection.4.3.0.nupkg.sha512" + }, + "System.Reflection.Primitives/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-5RXItQz5As4xN2/YUDxdpsEkMhvw3e6aNveFXUn4Hl/udNTCNhnKp8lT9fnc3MhvGKh1baak5CovpuQUXHAlIA==", + "path": "system.reflection.primitives/4.3.0", + "hashPath": "system.reflection.primitives.4.3.0.nupkg.sha512" + }, + "System.Resources.ResourceManager/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-/zrcPkkWdZmI4F92gL/TPumP98AVDu/Wxr3CSJGQQ+XN6wbRZcyfSKVoPo17ilb3iOr0cCRqJInGwNMolqhS8A==", + "path": "system.resources.resourcemanager/4.3.0", + "hashPath": "system.resources.resourcemanager.4.3.0.nupkg.sha512" + }, + "System.Runtime/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-JufQi0vPQ0xGnAczR13AUFglDyVYt4Kqnz1AZaiKZ5+GICq0/1MH/mO/eAJHt/mHW1zjKBJd7kV26SrxddAhiw==", + "path": "system.runtime/4.3.0", + "hashPath": "system.runtime.4.3.0.nupkg.sha512" + }, + "System.Runtime.Extensions/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-guW0uK0fn5fcJJ1tJVXYd7/1h5F+pea1r7FLSOz/f8vPEqbR2ZAknuRDvTQ8PzAilDveOxNjSfr0CHfIQfFk8g==", + "path": "system.runtime.extensions/4.3.0", + "hashPath": "system.runtime.extensions.4.3.0.nupkg.sha512" + }, + "System.Runtime.Handles/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-OKiSUN7DmTWeYb3l51A7EYaeNMnvxwE249YtZz7yooT4gOZhmTjIn48KgSsw2k2lYdLgTKNJw/ZIfSElwDRVgg==", + "path": "system.runtime.handles/4.3.0", + "hashPath": "system.runtime.handles.4.3.0.nupkg.sha512" + }, + "System.Runtime.InteropServices/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-uv1ynXqiMK8mp1GM3jDqPCFN66eJ5w5XNomaK2XD+TuCroNTLFGeZ+WCmBMcBDyTFKou3P6cR6J/QsaqDp7fGQ==", + "path": "system.runtime.interopservices/4.3.0", + "hashPath": "system.runtime.interopservices.4.3.0.nupkg.sha512" + }, + "System.Text.Encoding/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-BiIg+KWaSDOITze6jGQynxg64naAPtqGHBwDrLaCtixsa5bKiR8dpPOHA7ge3C0JJQizJE+sfkz1wV+BAKAYZw==", + "path": "system.text.encoding/4.3.0", + "hashPath": "system.text.encoding.4.3.0.nupkg.sha512" + }, + "System.Text.Json/4.7.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-IPq/x/d5nAcnD3vIyM3AbPOaTgcqrh0AqPSx7U53UFu3M6k1TH1u/eXc9/h4jm/3mpP1WRUpevlPY4PACd7AWw==", + "path": "system.text.json/4.7.0", + "hashPath": "system.text.json.4.7.0.nupkg.sha512" + }, + "System.Threading.Tasks/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-LbSxKEdOUhVe8BezB/9uOGGppt+nZf6e1VFyw6v3DN6lqitm0OSn2uXMOdtP0M3W4iMcqcivm2J6UgqiwwnXiA==", + "path": "system.threading.tasks/4.3.0", + "hashPath": "system.threading.tasks.4.3.0.nupkg.sha512" + }, + "TestCentric.Metadata/1.7.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-QjdwsUJXJbGmFKNiTZbWeRpwhqRcEAtgb+dwR4YVK8xUBBEfXfrFV074f1DBtnrOfAIT+LnZCeVVeg/fYUlAEA==", + "path": "testcentric.metadata/1.7.1", + "hashPath": "testcentric.metadata.1.7.1.nupkg.sha512" + }, + "nunit.engine/3.16.1": { + "type": "project", + "serviceable": false, + "sha512": "" + }, + "nunit.engine.api/3.16.1": { + "type": "project", + "serviceable": false, + "sha512": "" + }, + "nunit.engine.core/3.16.1": { + "type": "project", + "serviceable": false, + "sha512": "" + } + } +} \ No newline at end of file diff --git a/Source/Platforms/DotNet/NUnit/nunit3-netcore-console.dll b/Source/Platforms/DotNet/NUnit/nunit3-netcore-console.dll new file mode 100644 index 000000000..96a3a9a1b --- /dev/null +++ b/Source/Platforms/DotNet/NUnit/nunit3-netcore-console.dll @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e6c782a1ac5c8d10ca9137f45a88137b7e23e862e6aaefc494d85a92bba236fa +size 165376 diff --git a/Source/Platforms/DotNet/NUnit/nunit3-netcore-console.dll.config b/Source/Platforms/DotNet/NUnit/nunit3-netcore-console.dll.config new file mode 100644 index 000000000..fb93fb52c --- /dev/null +++ b/Source/Platforms/DotNet/NUnit/nunit3-netcore-console.dll.config @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Source/Platforms/DotNet/NUnit/nunit3-netcore-console.runtimeconfig.json b/Source/Platforms/DotNet/NUnit/nunit3-netcore-console.runtimeconfig.json new file mode 100644 index 000000000..30e8b4c84 --- /dev/null +++ b/Source/Platforms/DotNet/NUnit/nunit3-netcore-console.runtimeconfig.json @@ -0,0 +1,13 @@ +{ + "runtimeOptions": { + "tfm": "net6.0", + "rollForward": "Major", + "framework": { + "name": "Microsoft.NETCore.App", + "version": "6.0.0" + }, + "configProperties": { + "System.Reflection.Metadata.MetadataUpdater.IsSupported": false + } + } +} \ No newline at end of file diff --git a/Source/Platforms/DotNet/NUnit/testcentric.engine.metadata.dll b/Source/Platforms/DotNet/NUnit/testcentric.engine.metadata.dll index 8d16a9559..4ffc2c0e6 100644 --- a/Source/Platforms/DotNet/NUnit/testcentric.engine.metadata.dll +++ b/Source/Platforms/DotNet/NUnit/testcentric.engine.metadata.dll @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b08bf44fd3270243def47673d606959915ba723db7e694e58cb44a92145b0ebb -size 176640 +oid sha256:69e4533ee53bfcee5305ee16c1fe485c4d4d8525ac3d367d9e04d5b4baa4a6c6 +size 177664