From e99d0d3f1b4c5afe2197b647c7244f07160da344 Mon Sep 17 00:00:00 2001 From: DEATHB4DEFEAT <77995199+DEATHB4DEFEAT@users.noreply.github.com> Date: Thu, 18 Jan 2024 02:32:22 -0800 Subject: [PATCH] Build Only Tests with DebugOpt to Save Time (#40) --- Scripts/bat/buildAllDebug.bat | 2 ++ Scripts/bat/buildAllRelease.bat | 2 ++ Scripts/bat/runQuickAll.bat | 2 ++ Scripts/bat/runQuickClient.bat | 2 ++ Scripts/bat/runQuickServer.bat | 2 ++ Scripts/bat/runTests.bat | 5 +---- Scripts/bat/runTestsIntegration.bat | 5 +---- Scripts/bat/runTestsYAML.bat | 5 +---- Scripts/sh/buildAllDebug.sh | 2 +- Scripts/sh/buildAllRelease.sh | 2 +- Scripts/sh/runTests.sh | 5 +---- Scripts/sh/runTestsIntegration.sh | 5 +---- Scripts/sh/runTestsYAML.sh | 5 +---- 13 files changed, 18 insertions(+), 26 deletions(-) diff --git a/Scripts/bat/buildAllDebug.bat b/Scripts/bat/buildAllDebug.bat index 17415a48a0..5cf4952175 100644 --- a/Scripts/bat/buildAllDebug.bat +++ b/Scripts/bat/buildAllDebug.bat @@ -1,6 +1,8 @@ @echo off cd ../../ + call python RUN_THIS.py call git submodule update --init --recursive call dotnet build -c Debug + pause diff --git a/Scripts/bat/buildAllRelease.bat b/Scripts/bat/buildAllRelease.bat index 485492ed06..6a8cbac664 100644 --- a/Scripts/bat/buildAllRelease.bat +++ b/Scripts/bat/buildAllRelease.bat @@ -1,6 +1,8 @@ @echo off cd ../../ + call python RUN_THIS.py call git submodule update --init --recursive call dotnet build -c Release + pause diff --git a/Scripts/bat/runQuickAll.bat b/Scripts/bat/runQuickAll.bat index c2d3438094..26884f1d0b 100644 --- a/Scripts/bat/runQuickAll.bat +++ b/Scripts/bat/runQuickAll.bat @@ -1,4 +1,6 @@ @echo off + start runQuickServer.bat %* start runQuickClient.bat %* + exit diff --git a/Scripts/bat/runQuickClient.bat b/Scripts/bat/runQuickClient.bat index 16e02d0ada..172fd1ce6e 100644 --- a/Scripts/bat/runQuickClient.bat +++ b/Scripts/bat/runQuickClient.bat @@ -1,4 +1,6 @@ @echo off cd ../../ + call dotnet run --project Content.Client --no-build %* + pause diff --git a/Scripts/bat/runQuickServer.bat b/Scripts/bat/runQuickServer.bat index 602d33663a..ca61ef6b2c 100644 --- a/Scripts/bat/runQuickServer.bat +++ b/Scripts/bat/runQuickServer.bat @@ -1,4 +1,6 @@ @echo off cd ../../ + call dotnet run --project Content.Server --no-build %* + pause diff --git a/Scripts/bat/runTests.bat b/Scripts/bat/runTests.bat index 3617c01c3d..4d46d728da 100644 --- a/Scripts/bat/runTests.bat +++ b/Scripts/bat/runTests.bat @@ -1,11 +1,8 @@ cd ..\..\ -dotnet restore -dotnet build --configuration DebugOpt --no-restore /p:WarningsAsErrors=nullable /m - mkdir Scripts\logs del Scripts\logs\Content.Tests.log -dotnet test --no-build --configuration DebugOpt Content.Tests/Content.Tests.csproj -- NUnit.ConsoleOut=0 > Scripts\logs\Content.Tests.log +dotnet test Content.Tests/Content.Tests.csproj -c DebugOpt -- NUnit.ConsoleOut=0 > Scripts\logs\Content.Tests.log pause diff --git a/Scripts/bat/runTestsIntegration.bat b/Scripts/bat/runTestsIntegration.bat index cef6d2d9f1..39aa4cac5c 100644 --- a/Scripts/bat/runTestsIntegration.bat +++ b/Scripts/bat/runTestsIntegration.bat @@ -1,11 +1,8 @@ cd ..\..\ -dotnet restore -dotnet build --configuration DebugOpt --no-restore /p:WarningsAsErrors=nullable /m - mkdir Scripts\logs del Scripts\logs\Content.IntegrationTests.log -dotnet test --no-build --configuration DebugOpt Content.IntegrationTests/Content.IntegrationTests.csproj -- NUnit.ConsoleOut=0 NUnit.MapWarningTo=Failed > Scripts\logs\Content.IntegrationTests.log +dotnet test Content.IntegrationTests/Content.IntegrationTests.csproj -c DebugOpt -- NUnit.ConsoleOut=0 NUnit.MapWarningTo=Failed > Scripts\logs\Content.IntegrationTests.log pause diff --git a/Scripts/bat/runTestsYAML.bat b/Scripts/bat/runTestsYAML.bat index 5daad29991..8b41dd61b8 100644 --- a/Scripts/bat/runTestsYAML.bat +++ b/Scripts/bat/runTestsYAML.bat @@ -1,11 +1,8 @@ cd ..\..\ -dotnet restore -dotnet build --configuration DebugOpt --no-restore /p:WarningsAsErrors=nullable /m - mkdir Scripts\logs del Scripts\logs\Content.YAMLLinter.log -dotnet run --project Content.YAMLLinter/Content.YAMLLinter.csproj --no-build -- NUnit.ConsoleOut=0 > Scripts\logs\Content.YAMLLinter.log +dotnet run --project Content.YAMLLinter/Content.YAMLLinter.csproj -c DebugOpt -- NUnit.ConsoleOut=0 > Scripts\logs\Content.YAMLLinter.log pause diff --git a/Scripts/sh/buildAllDebug.sh b/Scripts/sh/buildAllDebug.sh index 9e51c52d95..1ee457ff2a 100644 --- a/Scripts/sh/buildAllDebug.sh +++ b/Scripts/sh/buildAllDebug.sh @@ -2,7 +2,7 @@ # make sure to start from script dir if [ "$(dirname $0)" != "." ]; then - cd "$(dirname $0)" + cd "$(dirname $0)" fi cd ../../ diff --git a/Scripts/sh/buildAllRelease.sh b/Scripts/sh/buildAllRelease.sh index d67628d1f1..b3749ac28d 100644 --- a/Scripts/sh/buildAllRelease.sh +++ b/Scripts/sh/buildAllRelease.sh @@ -2,7 +2,7 @@ # make sure to start from script dir if [ "$(dirname $0)" != "." ]; then - cd "$(dirname $0)" + cd "$(dirname $0)" fi cd ../../ diff --git a/Scripts/sh/runTests.sh b/Scripts/sh/runTests.sh index 0ab3c278a3..bf6fc0f5bb 100644 --- a/Scripts/sh/runTests.sh +++ b/Scripts/sh/runTests.sh @@ -1,12 +1,9 @@ cd ../../ -dotnet restore -dotnet build --configuration DebugOpt --no-restore /p:WarningsAsErrors=nullable /m - mkdir Scripts/logs rm Scripts/logs/Content.Tests.log -dotnet test --no-build --configuration DebugOpt Content.Tests/Content.Tests.csproj -- NUnit.ConsoleOut=0 > Scripts/logs/Content.Tests.log +dotnet test Content.Tests/Content.Tests.csproj -c DebugOpt -- NUnit.ConsoleOut=0 > Scripts/logs/Content.Tests.log echo "Tests complete. Press enter to continue." read diff --git a/Scripts/sh/runTestsIntegration.sh b/Scripts/sh/runTestsIntegration.sh index ff06de2db3..c6db14c252 100644 --- a/Scripts/sh/runTestsIntegration.sh +++ b/Scripts/sh/runTestsIntegration.sh @@ -1,12 +1,9 @@ cd ../../ -dotnet restore -dotnet build --configuration DebugOpt --no-restore /p:WarningsAsErrors=nullable /m - mkdir Scripts/logs rm Scripts/logs/Content.IntegrationTests.log -dotnet test --no-build --configuration DebugOpt Content.IntegrationTests/Content.IntegrationTests.csproj -- NUnit.ConsoleOut=0 NUnit.MapWarningTo=Failed > Scripts/logs/Content.IntegrationTests.log +dotnet test Content.IntegrationTests/Content.IntegrationTests.csproj -c DebugOpt -- NUnit.ConsoleOut=0 NUnit.MapWarningTo=Failed > Scripts/logs/Content.IntegrationTests.log echo "Tests complete. Press enter to continue." read diff --git a/Scripts/sh/runTestsYAML.sh b/Scripts/sh/runTestsYAML.sh index b94998fb13..5a4b09bf4b 100644 --- a/Scripts/sh/runTestsYAML.sh +++ b/Scripts/sh/runTestsYAML.sh @@ -1,12 +1,9 @@ cd ../../ -dotnet restore -dotnet build --configuration DebugOpt --no-restore /p:WarningsAsErrors=nullable /m - mkdir Scripts/logs rm Scripts/logs/Content.YAMLLinter.log -dotnet run --project Content.YAMLLinter/Content.YAMLLinter.csproj --no-build -- NUnit.ConsoleOut=0 > Scripts/logs/Content.YAMLLinter.log +dotnet run --project Content.YAMLLinter/Content.YAMLLinter.csproj -c DebugOpt -- NUnit.ConsoleOut=0 > Scripts/logs/Content.YAMLLinter.log echo "Tests complete. Press enter to continue." read