diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ea8ef4f87..43396150e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -30,16 +30,15 @@ jobs: run: | sudo apt-get update sudo apt-get install -y --fix-missing libx11-dev libxcursor-dev libxinerama-dev build-essential gettext libtool libtool-bin libpulse-dev libasound2-dev libjack-dev portaudio19-dev libwayland-dev - sudo apt-get install gdb - name: Build run: | - ./GenerateProjectFiles.sh -vs2022 -log -verbose -printSDKs -dotnet=8 -useSdl=false - ./Development/Scripts/Linux/CallBuildTool.sh -build -log -dotnet=8 -arch=x64 -platform=Linux -configuration=Debug -buildtargets=FlaxTestsTarget -UseLargeWorlds=true -useSdl=false + ./GenerateProjectFiles.sh -vs2022 -log -verbose -printSDKs -dotnet=8 + ./Development/Scripts/Linux/CallBuildTool.sh -build -log -dotnet=8 -arch=x64 -platform=Linux -configuration=Development -buildtargets=FlaxTestsTarget -UseLargeWorlds=true dotnet msbuild Source/Tools/Flax.Build.Tests/Flax.Build.Tests.csproj /m /t:Restore,Build /p:Configuration=Debug /p:Platform=AnyCPU /nologo 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: | - gdb ${GITHUB_WORKSPACE}/Binaries/Editor/Linux/Debug/FlaxTests + ${GITHUB_WORKSPACE}/Binaries/Editor/Linux/Development/FlaxTests dotnet test -f net8.0 Binaries/Tests/Flax.Build.Tests.dll cp Binaries/Editor/Linux/Development/FlaxEngine.CSharp.dll Binaries/Tests cp Binaries/Editor/Linux/Development/FlaxEngine.CSharp.runtimeconfig.json Binaries/Tests diff --git a/Source/Engine/Engine/CommandLine.cpp b/Source/Engine/Engine/CommandLine.cpp index 7ee868243..4dad47971 100644 --- a/Source/Engine/Engine/CommandLine.cpp +++ b/Source/Engine/Engine/CommandLine.cpp @@ -63,6 +63,14 @@ bool CommandLine::Parse(const Char* cmdLine) { Options.CmdLine = cmdLine; +#if FLAX_TESTS + // Configure engine for test running environment + Options.Headless = true; + Options.Null = true; + Options.Mute = true; + Options.Std = true; +#endif + int32 length = StringUtils::Length(cmdLine); if (length == 0) return false; @@ -170,14 +178,6 @@ bool CommandLine::Parse(const Char* cmdLine) PARSE_BOOL_SWITCH("-shaderprofile ", ShaderProfile); #endif -#if FLAX_TESTS - // Configure engine for test running environment - Options.Headless = true; - Options.Null = true; - Options.Mute = true; - Options.Std = true; -#endif - return false; } diff --git a/Source/Engine/Platform/Mac/MacPlatform.cpp b/Source/Engine/Platform/Mac/MacPlatform.cpp index f8a36d24d..d48204fe5 100644 --- a/Source/Engine/Platform/Mac/MacPlatform.cpp +++ b/Source/Engine/Platform/Mac/MacPlatform.cpp @@ -437,7 +437,6 @@ Window* MacPlatform::CreateWindow(const CreateWindowSettings& settings) #endif -#if !PLATFORM_SDL int32 MacPlatform::CreateProcess(CreateProcessSettings& settings) { LOG(Info, "Command: {0} {1}", settings.FileName, settings.Arguments); @@ -577,6 +576,5 @@ int32 MacPlatform::CreateProcess(CreateProcessSettings& settings) return returnCode; } -#endif #endif diff --git a/Source/Engine/Platform/Mac/MacPlatform.h b/Source/Engine/Platform/Mac/MacPlatform.h index e732e48f3..e80635126 100644 --- a/Source/Engine/Platform/Mac/MacPlatform.h +++ b/Source/Engine/Platform/Mac/MacPlatform.h @@ -27,9 +27,7 @@ public: static Rectangle GetVirtualDesktopBounds(); static String GetMainDirectory(); static Window* CreateWindow(const CreateWindowSettings& settings); -#if !PLATFORM_SDL static int32 CreateProcess(CreateProcessSettings& settings); -#endif }; #endif diff --git a/Source/Engine/Platform/SDL/SDLPlatform.cpp b/Source/Engine/Platform/SDL/SDLPlatform.cpp index 3b6293c35..d31a0ff80 100644 --- a/Source/Engine/Platform/SDL/SDLPlatform.cpp +++ b/Source/Engine/Platform/SDL/SDLPlatform.cpp @@ -322,7 +322,7 @@ Window* SDLPlatform::CreateWindow(const CreateWindowSettings& settings) return New(settings); } -#if !PLATFORM_WINDOWS && !PLATFORM_WEB +#if PLATFORM_LINUX bool ReadStream(SDL_IOStream*& stream, char* buffer, int64 bufferLength, int64& bufferPosition, LogType logType, CreateProcessSettings& settings) { diff --git a/Source/Engine/Platform/SDL/SDLPlatform.h b/Source/Engine/Platform/SDL/SDLPlatform.h index 9cc87a6e6..c4c2cf741 100644 --- a/Source/Engine/Platform/SDL/SDLPlatform.h +++ b/Source/Engine/Platform/SDL/SDLPlatform.h @@ -91,7 +91,7 @@ public: static Rectangle GetMonitorBounds(const Float2& screenPos); static Rectangle GetVirtualDesktopBounds(); static Window* CreateWindow(const CreateWindowSettings& settings); -#if !PLATFORM_WINDOWS && !PLATFORM_WEB +#if PLATFORM_LINUX static int32 CreateProcess(CreateProcessSettings& settings); #endif };