From 824ce1cacf065dea49cb2fe67375ff95e58b617f Mon Sep 17 00:00:00 2001 From: Wojciech Figat Date: Wed, 11 Jan 2023 16:25:29 +0100 Subject: [PATCH] Run native tests on Windows CI --- .github/workflows/tests.yml | 3 +- Source/Engine/Tests/TestEditorStates.cs | 48 ------------------------- Source/Engine/Tests/TestScripting.cs | 2 -- 3 files changed, 2 insertions(+), 51 deletions(-) delete mode 100644 Source/Engine/Tests/TestEditorStates.cs diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 952ca2bb0..fc43086d2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -64,9 +64,10 @@ jobs: - name: Build run: | .\GenerateProjectFiles.bat -vs2022 - .\Development\Scripts\Windows\CallBuildTool.bat -build -log -arch=x64 -platform=Windows -configuration=Development -buildtargets=FlaxTestsTarget -BuildBindingsOnly + .\Development\Scripts\Windows\CallBuildTool.bat -build -log -arch=x64 -platform=Windows -configuration=Development -buildtargets=FlaxTestsTarget 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\Win64\Development\FlaxTests.exe .\Source\Platforms\DotNet\NUnit\nunit3-console.exe Binaries\Editor\Win64\Development\FlaxEngine.CSharp.dll --framework=netcore-7.0 .\Source\Platforms\DotNet\NUnit\nunit3-console.exe Binaries\Tests\Flax.Build.Tests.dll --framework=netcore-7.0 diff --git a/Source/Engine/Tests/TestEditorStates.cs b/Source/Engine/Tests/TestEditorStates.cs deleted file mode 100644 index 4236dc45b..000000000 --- a/Source/Engine/Tests/TestEditorStates.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved. - -using FlaxEditor.States; -using NUnit.Framework; - -namespace FlaxEditor.Tests -{ - [TestFixture] - public class TestEditorStates - { - /*[Test] - public void TestScriptsCompiledBeforeInit() - { - Editor editor = new Editor(); - try - { - Scripting.ScriptsBuilder.CompilationsCount = 2; - editor.Init(); - - // Mock scripts compilation finish - - } - finally - { - editor.Exit(); - } - }*/ - /* - [Test] - [Ignore("TODO: finish building api for unit tests")] - public void TestStatesChain() - { - Editor editor = new Editor(); - - editor.Init(true, true); - editor.EnsureState(); - - // Mock scripts compilation finish - editor.Update(); - ScriptsBuilder.Internal_OnEvent(ScriptsBuilder.EventType.CompileEndGood); - editor.Update(); - - editor.EnsureState(); - editor.Exit(); - editor.EnsureState(); - }*/ - } -} diff --git a/Source/Engine/Tests/TestScripting.cs b/Source/Engine/Tests/TestScripting.cs index ded2a97a0..917a9e567 100644 --- a/Source/Engine/Tests/TestScripting.cs +++ b/Source/Engine/Tests/TestScripting.cs @@ -1,6 +1,5 @@ // Copyright (c) 2012-2023 Wojciech Figat. All rights reserved. -#if FLAX_TESTS namespace FlaxEngine { partial struct TestStruct : System.IEquatable @@ -128,4 +127,3 @@ namespace FlaxEngine } } } -#endif