Skip to content

Commit

Permalink
Build Only Tests with DebugOpt to Save Time (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
DEATHB4DEFEAT authored Jan 18, 2024
1 parent c4dcf8d commit e99d0d3
Show file tree
Hide file tree
Showing 13 changed files with 18 additions and 26 deletions.
2 changes: 2 additions & 0 deletions Scripts/bat/buildAllDebug.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
@echo off
cd ../../

call python RUN_THIS.py
call git submodule update --init --recursive
call dotnet build -c Debug

pause
2 changes: 2 additions & 0 deletions Scripts/bat/buildAllRelease.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
@echo off
cd ../../

call python RUN_THIS.py
call git submodule update --init --recursive
call dotnet build -c Release

pause
2 changes: 2 additions & 0 deletions Scripts/bat/runQuickAll.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
@echo off

start runQuickServer.bat %*
start runQuickClient.bat %*

exit
2 changes: 2 additions & 0 deletions Scripts/bat/runQuickClient.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
@echo off
cd ../../

call dotnet run --project Content.Client --no-build %*

pause
2 changes: 2 additions & 0 deletions Scripts/bat/runQuickServer.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
@echo off
cd ../../

call dotnet run --project Content.Server --no-build %*

pause
5 changes: 1 addition & 4 deletions Scripts/bat/runTests.bat
Original file line number Diff line number Diff line change
@@ -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
5 changes: 1 addition & 4 deletions Scripts/bat/runTestsIntegration.bat
Original file line number Diff line number Diff line change
@@ -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
5 changes: 1 addition & 4 deletions Scripts/bat/runTestsYAML.bat
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion Scripts/sh/buildAllDebug.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# make sure to start from script dir
if [ "$(dirname $0)" != "." ]; then
cd "$(dirname $0)"
cd "$(dirname $0)"
fi

cd ../../
Expand Down
2 changes: 1 addition & 1 deletion Scripts/sh/buildAllRelease.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# make sure to start from script dir
if [ "$(dirname $0)" != "." ]; then
cd "$(dirname $0)"
cd "$(dirname $0)"
fi

cd ../../
Expand Down
5 changes: 1 addition & 4 deletions Scripts/sh/runTests.sh
Original file line number Diff line number Diff line change
@@ -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
5 changes: 1 addition & 4 deletions Scripts/sh/runTestsIntegration.sh
Original file line number Diff line number Diff line change
@@ -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
5 changes: 1 addition & 4 deletions Scripts/sh/runTestsYAML.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit e99d0d3

Please sign in to comment.