From 45bae9c7162bb85e965fcb6b34703cf846d5a5ed Mon Sep 17 00:00:00 2001 From: DEATHB4DEFEAT Date: Wed, 17 Jan 2024 23:53:43 -0800 Subject: [PATCH] split tests and integration tests scripts into two --- Scripts/bat/runTests.bat | 11 +++++++++++ Scripts/bat/runTestsIntegration.bat | 3 --- Scripts/bat/runTestsYAML.bat | 1 + Scripts/sh/runTests.sh | 12 ++++++++++++ Scripts/sh/runTestsIntegration.sh | 3 --- Scripts/sh/runTestsYAML.sh | 1 + 6 files changed, 25 insertions(+), 6 deletions(-) create mode 100644 Scripts/bat/runTests.bat create mode 100644 Scripts/sh/runTests.sh diff --git a/Scripts/bat/runTests.bat b/Scripts/bat/runTests.bat new file mode 100644 index 0000000000..3617c01c3d --- /dev/null +++ b/Scripts/bat/runTests.bat @@ -0,0 +1,11 @@ +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 + +pause diff --git a/Scripts/bat/runTestsIntegration.bat b/Scripts/bat/runTestsIntegration.bat index 100cbf8348..cef6d2d9f1 100644 --- a/Scripts/bat/runTestsIntegration.bat +++ b/Scripts/bat/runTestsIntegration.bat @@ -5,9 +5,6 @@ dotnet build --configuration DebugOpt --no-restore /p:WarningsAsErrors=nullable 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 - 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 diff --git a/Scripts/bat/runTestsYAML.bat b/Scripts/bat/runTestsYAML.bat index eaee34aab0..5daad29991 100644 --- a/Scripts/bat/runTestsYAML.bat +++ b/Scripts/bat/runTestsYAML.bat @@ -4,6 +4,7 @@ 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 diff --git a/Scripts/sh/runTests.sh b/Scripts/sh/runTests.sh new file mode 100644 index 0000000000..0ab3c278a3 --- /dev/null +++ b/Scripts/sh/runTests.sh @@ -0,0 +1,12 @@ +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 + +echo "Tests complete. Press enter to continue." +read diff --git a/Scripts/sh/runTestsIntegration.sh b/Scripts/sh/runTestsIntegration.sh index 327e515300..ff06de2db3 100644 --- a/Scripts/sh/runTestsIntegration.sh +++ b/Scripts/sh/runTestsIntegration.sh @@ -5,9 +5,6 @@ dotnet build --configuration DebugOpt --no-restore /p:WarningsAsErrors=nullable 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 - 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 diff --git a/Scripts/sh/runTestsYAML.sh b/Scripts/sh/runTestsYAML.sh index 606540bdde..b94998fb13 100644 --- a/Scripts/sh/runTestsYAML.sh +++ b/Scripts/sh/runTestsYAML.sh @@ -4,6 +4,7 @@ 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