aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2022-10-03 15:55:20 -0700
committerRob Mensching <rob@firegiant.com>2022-10-04 14:23:47 -0700
commit21ea5adcc788bbecd81e475277aba927ec66c860 (patch)
treea02076c55c29fd3c78ba0136745f0621b357825a
parent7d231e729b4e53979952dcdd12654aa77a411521 (diff)
downloadwix-21ea5adcc788bbecd81e475277aba927ec66c860.tar.gz
wix-21ea5adcc788bbecd81e475277aba927ec66c860.tar.bz2
wix-21ea5adcc788bbecd81e475277aba927ec66c860.zip
Run tests in bulk to improve performance
The fewer executions of "dotnet test" the better so batch up calls by referencing multiple assembly DLLs.
-rw-r--r--src/api/api.cmd15
-rw-r--r--src/burn/burn.cmd24
-rw-r--r--src/libs/libs.cmd11
-rw-r--r--src/test/burn/test_burn.cmd2
-rw-r--r--src/test/msi/test_msi.cmd2
-rw-r--r--src/testresultfilelist.txt24
-rw-r--r--src/tools/tools.cmd8
-rw-r--r--src/wix/wix.cmd20
8 files changed, 62 insertions, 44 deletions
diff --git a/src/api/api.cmd b/src/api/api.cmd
index d1f87f54..0c3bb31b 100644
--- a/src/api/api.cmd
+++ b/src/api/api.cmd
@@ -26,10 +26,12 @@
26msbuild api_t.proj -p:Configuration=%_C% -nologo -m -warnaserror -bl:%_L%\api_build.binlog || exit /b 26msbuild api_t.proj -p:Configuration=%_C% -nologo -m -warnaserror -bl:%_L%\api_build.binlog || exit /b
27 27
28:: Test 28:: Test
29dotnet test burn\test\WixToolsetTest.Mba.Core -c %_C% --nologo --no-build -l "trx;LogFileName=%_L%\TestResults\WixToolsetTest.Mba.Core.trx" || exit /b 29dotnet test ^
30dotnet test %_B%\x86\BalUtilUnitTest.dll --nologo -l "trx;LogFileName=%_L%\TestResults\BalUtilUnitTest.trx" || exit /b 30 %_B%\net6.0\WixToolsetTest.Data.dll ^
31dotnet test %_B%\x86\BextUtilUnitTest.dll --nologo -l "trx;LogFileName=%_L%\TestResults\BextUtilUnitTest.trx" || exit /b 31 %_B%\net6.0\win-x86\WixToolsetTest.Mba.Core.dll ^
32dotnet test wix\api_wix.sln -c %_C% --nologo --no-build -l "trx;LogFileName=%_L%\TestResults\api_wix.trx" || exit /b 32 %_B%\x86\BalUtilUnitTest.dll ^
33 %_B%\x86\BextUtilUnitTest.dll ^
34 --nologo -l "trx;LogFileName=%_L%\TestResults\api.trx" || exit /b
33 35
34@goto :end 36@goto :end
35 37
@@ -41,10 +43,7 @@ dotnet test wix\api_wix.sln -c %_C% --nologo --no-build -l "trx;LogFileName=%_L%
41@del "..\..\build\artifacts\WixToolset.Data.*.nupkg" 2> nul 43@del "..\..\build\artifacts\WixToolset.Data.*.nupkg" 2> nul
42@del "..\..\build\artifacts\WixToolset.Extensibility.*.nupkg" 2> nul 44@del "..\..\build\artifacts\WixToolset.Extensibility.*.nupkg" 2> nul
43@del "..\..\build\artifacts\WixToolset.Mba.Core.*.nupkg" 2> nul 45@del "..\..\build\artifacts\WixToolset.Mba.Core.*.nupkg" 2> nul
44@del "%_L%\TestResults\WixToolsetTest.Mba.Core.trx" 2> nul 46@del "%_L%\TestResults\api.trx" 2> nul
45@del "%_L%\TestResults\BalUtilUnitTest.trx" 2> nul
46@del "%_L%\TestResults\BextUtilUnitTest.trx" 2> nul
47@del "%_L%\TestResults\api_wix.trx" 2> nul
48@rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.balutil" 2> nul 47@rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.balutil" 2> nul
49@rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.bextutil" 2> nul 48@rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.bextutil" 2> nul
50@rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.bootstrappercore.native" 2> nul 49@rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.bootstrappercore.native" 2> nul
diff --git a/src/burn/burn.cmd b/src/burn/burn.cmd
index 127f9253..f1753106 100644
--- a/src/burn/burn.cmd
+++ b/src/burn/burn.cmd
@@ -3,12 +3,20 @@
3 3
4@set _C=Debug 4@set _C=Debug
5@set _L=%~dp0..\..\build\logs 5@set _L=%~dp0..\..\build\logs
6
6:parse_args 7:parse_args
7@if /i "%1"=="release" set _C=Release 8@if /i "%1"=="release" set _C=Release
9@if /i "%1"=="inc" set _INC=1
10@if /i "%1"=="clean" set _CLEAN=1
8@if not "%1"=="" shift & goto parse_args 11@if not "%1"=="" shift & goto parse_args
9 12
10@set _B=%~dp0..\..\build\burn\%_C% 13@set _B=%~dp0..\..\build\burn\%_C%
11 14
15:: Clean
16
17@if "%_INC%"=="" call :clean
18@if NOT "%_CLEAN%"=="" goto :end
19
12@echo Building burn %_C% 20@echo Building burn %_C%
13 21
14:: burn 22:: burn
@@ -17,8 +25,20 @@ nuget restore || exit /b
17 25
18msbuild burn_t.proj -p:Configuration=%_C% -nologo -m -warnaserror -bl:%_L%\burn_build.binlog || exit /b 26msbuild burn_t.proj -p:Configuration=%_C% -nologo -m -warnaserror -bl:%_L%\burn_build.binlog || exit /b
19 27
20dotnet test %_B%\x86\BurnUnitTest.dll --nologo -l "trx;LogFileName=%_L%\TestResults\BurnUnitTest32.trx" || exit /b 28dotnet test ^
21dotnet test %_B%\x64\BurnUnitTest.dll --nologo -l "trx;LogFileName=%_L%\TestResults\BurnUnitTest64.trx" || exit /b 29 %_B%\x86\BurnUnitTest.dll ^
30 %_B%\x64\BurnUnitTest.dll ^
31 --nologo -l "trx;LogFileName=%_L%\TestResults\burn.trx" || exit /b
32
33@goto :end
34
35:clean
36@rd /s/q "..\..\build\burn" 2> nul
37@del "..\..\build\artifacts\WixToolset.Burn.*.nupkg" 2> nul
38@del "%_L%\TestResults\burn.trx" 2> nul
39@rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.burn" 2> nul
40@exit /b
22 41
42:end
23@popd 43@popd
24@endlocal 44@endlocal
diff --git a/src/libs/libs.cmd b/src/libs/libs.cmd
index e9402701..51331459 100644
--- a/src/libs/libs.cmd
+++ b/src/libs/libs.cmd
@@ -21,9 +21,11 @@
21 21
22msbuild -Restore libs_t.proj -p:Configuration=%_C% -nologo -m -warnaserror -bl:%_L%\libs_build.binlog || exit /b 22msbuild -Restore libs_t.proj -p:Configuration=%_C% -nologo -m -warnaserror -bl:%_L%\libs_build.binlog || exit /b
23 23
24dotnet test %_B%\net6.0\WixToolsetTest.Versioning.dll --nologo -l "trx;LogFileName=%_L%\TestResults\WixToolsetTest.Versioning.trx" || exit /b 24dotnet test ^
25dotnet test %_B%\x86\DUtilUnitTest.dll --nologo -l "trx;LogFileName=%_L%\TestResults\DutilUnitTest32.trx" || exit /b 25 %_B%\net6.0\WixToolsetTest.Versioning.dll ^
26dotnet test %_B%\x64\DUtilUnitTest.dll --nologo -l "trx;LogFileName=%_L%\TestResults\DutilUnitTest64.trx" || exit /b 26 %_B%\x86\DUtilUnitTest.dll ^
27 %_B%\x64\DUtilUnitTest.dll ^
28 --nologo -l "trx;LogFileName=%_L%\TestResults\libs.trx" || exit /b
27 29
28@goto :end 30@goto :end
29 31
@@ -32,8 +34,7 @@ dotnet test %_B%\x64\DUtilUnitTest.dll --nologo -l "trx;LogFileName=%_L%\TestRes
32@del "..\..\build\artifacts\WixToolset.DUtil.*.nupkg" 2> nul 34@del "..\..\build\artifacts\WixToolset.DUtil.*.nupkg" 2> nul
33@del "..\..\build\artifacts\WixToolset.Versioning.*.nupkg" 2> nul 35@del "..\..\build\artifacts\WixToolset.Versioning.*.nupkg" 2> nul
34@del "..\..\build\artifacts\WixToolset.WcaUtil.*.nupkg" 2> nul 36@del "..\..\build\artifacts\WixToolset.WcaUtil.*.nupkg" 2> nul
35@del "%_L%\TestResults\WixToolsetTest.Versioning.trx" 2> nul 37@del "%_L%\TestResults\libs.trx" 2> nul
36@del "%_L%\TestResults\DutilUnitTest*.trx" 2> nul
37@rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.dutil" 2> nul 38@rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.dutil" 2> nul
38@rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.versioning" 2> nul 39@rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.versioning" 2> nul
39@rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.wcautil" 2> nul 40@rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.wcautil" 2> nul
diff --git a/src/test/burn/test_burn.cmd b/src/test/burn/test_burn.cmd
index 72ffd448..311a6b32 100644
--- a/src/test/burn/test_burn.cmd
+++ b/src/test/burn/test_burn.cmd
@@ -21,7 +21,7 @@ mt.exe -manifest "WixToolsetTest.BurnE2E\testhost.longpathaware.manifest" -updat
21 21
22@if not "%RuntimeTestsEnabled%"=="true" goto :LExit 22@if not "%RuntimeTestsEnabled%"=="true" goto :LExit
23 23
24dotnet test -c %_C% --no-build WixToolsetTest.BurnE2E -l "trx;LogFileName=%_L%\TestResults\WixToolsetTest.BurnE2E.trx" || exit /b 24dotnet test -c %_C% WixToolsetTest.BurnE2E --nologo --no-build -l "trx;LogFileName=%_L%\TestResults\WixToolsetTest.BurnE2E.trx" || exit /b
25 25
26:LExit 26:LExit
27@popd 27@popd
diff --git a/src/test/msi/test_msi.cmd b/src/test/msi/test_msi.cmd
index bb9d0162..2a6f5831 100644
--- a/src/test/msi/test_msi.cmd
+++ b/src/test/msi/test_msi.cmd
@@ -16,7 +16,7 @@ msbuild -t:Build -Restore TestData\TestData.proj -p:Configuration=%_C% -m -bl:%_
16 16
17@if not "%RuntimeTestsEnabled%"=="true" goto :LExit 17@if not "%RuntimeTestsEnabled%"=="true" goto :LExit
18 18
19dotnet test -c %_C% --no-build WixToolsetTest.MsiE2E -l "trx;LogFileName=%_L%\TestResults\WixToolsetTest.MsiE2E.trx" || exit /b 19dotnet test -c %_C% WixToolsetTest.MsiE2E --nologo --no-build -l "trx;LogFileName=%_L%\TestResults\WixToolsetTest.MsiE2E.trx" || exit /b
20 20
21:LExit 21:LExit
22@popd 22@popd
diff --git a/src/testresultfilelist.txt b/src/testresultfilelist.txt
index 59584e64..d3981c6e 100644
--- a/src/testresultfilelist.txt
+++ b/src/testresultfilelist.txt
@@ -1,24 +1,12 @@
1build/logs/TestResults/api_wix.trx 1build/logs/TestResults/api.trx
2build/logs/TestResults/BalUtilUnitTest.trx 2build/logs/TestResults/burn.trx
3build/logs/TestResults/BextUtilUnitTest.trx 3build/logs/TestResults/libs.trx
4build/logs/TestResults/BurnUnitTest32.trx 4build/logs/TestResults/tools.trx
5build/logs/TestResults/BurnUnitTest64.trx 5build/logs/TestResults/wix_prepublish.trx
6build/logs/TestResults/DutilUnitTest32.trx 6build/logs/TestResults/wix_postpublish.trx
7build/logs/TestResults/DutilUnitTest64.trx
8build/logs/TestResults/WixToolsetTest.Bal.trx 7build/logs/TestResults/WixToolsetTest.Bal.trx
9build/logs/TestResults/WixToolsetTest.BuildTasks.trx
10build/logs/TestResults/WixToolsetTest.BurnE2E.trx 8build/logs/TestResults/WixToolsetTest.BurnE2E.trx
11build/logs/TestResults/WixToolsetTest.Converters.trx
12build/logs/TestResults/WixToolsetTest.Converters.Symbolizer.trx
13build/logs/TestResults/WixToolsetTest.Core.trx
14build/logs/TestResults/WixToolsetTest.Core.Native.trx
15build/logs/TestResults/WixToolsetTest.CoreIntegration.trx
16build/logs/TestResults/WixToolsetTest.Dnc.HostGenerator.trx 9build/logs/TestResults/WixToolsetTest.Dnc.HostGenerator.trx
17build/logs/TestResults/WixToolsetTest.Heat.trx
18build/logs/TestResults/WixToolsetTest.HeatTasks.trx
19build/logs/TestResults/WixToolsetTest.ManagedHost.trx 10build/logs/TestResults/WixToolsetTest.ManagedHost.trx
20build/logs/TestResults/WixToolsetTest.Mba.Core.trx
21build/logs/TestResults/WixToolsetTest.MsiE2E.trx 11build/logs/TestResults/WixToolsetTest.MsiE2E.trx
22build/logs/TestResults/WixToolsetTest.Sdk.trx
23build/logs/TestResults/WixToolsetTest.Versioning.trx
24build/logs/TestResults/WixToolsetTest.WixE2ETests.trx \ No newline at end of file 12build/logs/TestResults/WixToolsetTest.WixE2ETests.trx \ No newline at end of file
diff --git a/src/tools/tools.cmd b/src/tools/tools.cmd
index 90c10af0..2ec67f46 100644
--- a/src/tools/tools.cmd
+++ b/src/tools/tools.cmd
@@ -10,6 +10,8 @@
10@if /i "%1"=="clean" set _CLEAN=1 10@if /i "%1"=="clean" set _CLEAN=1
11@if not "%1"=="" shift & goto parse_args 11@if not "%1"=="" shift & goto parse_args
12 12
13@set _B=%~dp0..\..\build\tools\%_C%
14
13:: Clean 15:: Clean
14 16
15@if "%_INC%"=="" call :clean 17@if "%_INC%"=="" call :clean
@@ -24,8 +26,10 @@ msbuild -Restore tools.sln -p:Configuration=%_C% -nologo -m -warnaserror -bl:%_L
24msbuild publish_t.proj -p:Configuration=%_C% -nologo -m -warnaserror -bl:%_L%\tools_publish.binlog || exit /b 26msbuild publish_t.proj -p:Configuration=%_C% -nologo -m -warnaserror -bl:%_L%\tools_publish.binlog || exit /b
25 27
26:: Test 28:: Test
27dotnet test -c %_C% --no-build --nologo test\WixToolsetTest.Heat -l "trx;LogFileName=%_L%\TestResults\WixToolsetTest.Heat.trx" || exit /b 29dotnet test ^
28dotnet test -c %_C% --no-build --nologo test\WixToolsetTest.HeatTasks -l "trx;LogFileName=%_L%\TestResults\WixToolsetTest.HeatTasks.trx" || exit /b 30 %_B%\test\WixToolsetTest.Heat\net472\WixToolsetTest.Heat.dll ^
31 %_B%\test\WixToolsetTest.HeatTasks\net472\WixToolsetTest.HeatTasks.dll ^
32 --nologo -l "trx;LogFileName=%_L%\TestResults\tools.trx" || exit /b
29 33
30:: Pack 34:: Pack
31msbuild -t:Pack WixToolset.Heat -p:Configuration=%_C% -p:NoBuild=true -nologo -m -warnaserror -bl:%_L%\tools_pack.binlog || exit /b 35msbuild -t:Pack WixToolset.Heat -p:Configuration=%_C% -p:NoBuild=true -nologo -m -warnaserror -bl:%_L%\tools_pack.binlog || exit /b
diff --git a/src/wix/wix.cmd b/src/wix/wix.cmd
index ff2043eb..e1bfe384 100644
--- a/src/wix/wix.cmd
+++ b/src/wix/wix.cmd
@@ -7,6 +7,7 @@
7@if /i "%1"=="release" set _C=Release 7@if /i "%1"=="release" set _C=Release
8@if not "%1"=="" shift & goto parse_args 8@if not "%1"=="" shift & goto parse_args
9 9
10@set _B=%~dp0..\..\build\wix\%_C%
10@set _P_OBJ=%~dp0..\..\build\wix\obj\publish_t\%_C%\ 11@set _P_OBJ=%~dp0..\..\build\wix\obj\publish_t\%_C%\
11@set _P=%~dp0..\..\build\wix\%_C%\publish\ 12@set _P=%~dp0..\..\build\wix\%_C%\publish\
12@set _RCO=/S /R:1 /W:1 /NP /XO /NS /NC /NFL /NDL /NJH /NJS 13@set _RCO=/S /R:1 /W:1 /NP /XO /NS /NC /NFL /NDL /NJH /NJS
@@ -24,11 +25,13 @@ msbuild wix.sln -p:Configuration=%_C% -nologo -m -warnaserror -bl:%_L%\wix_build
24 25
25 26
26:: Pre-Publish Test 27:: Pre-Publish Test
27dotnet test -c %_C% --no-build --nologo test\WixToolsetTest.Converters -l "trx;LogFileName=%_L%\TestResults\WixToolsetTest.Converters.trx" || exit /b 28dotnet test ^
28dotnet test -c %_C% --no-build --nologo test\WixToolsetTest.Converters.Symbolizer -l "trx;LogFileName=%_L%\TestResults\WixToolsetTest.Converters.Symbolizer.trx" || exit /b 29 %_B%\test\WixToolsetTest.Converters\net6.0\WixToolsetTest.Converters.dll ^
29dotnet test -c %_C% --no-build --nologo test\WixToolsetTest.Core -l "trx;LogFileName=%_L%\TestResults\WixToolsetTest.Core.trx" || exit /b 30 %_B%\test\WixToolsetTest.Converters.Symbolizer\net472\WixToolsetTest.Converters.Symbolizer.dll ^
30dotnet test -c %_C% --no-build --nologo test\WixToolsetTest.Core.Native -l "trx;LogFileName=%_L%\TestResults\WixToolsetTest.Core.Native.trx" || exit /b 31 %_B%\test\WixToolsetTest.Core\net6.0\WixToolsetTest.Core.dll ^
31dotnet test -c %_C% --no-build --nologo test\WixToolsetTest.CoreIntegration -l "trx;LogFileName=%_L%\TestResults\WixToolsetTest.CoreIntegration.trx" || exit /b 32 %_B%\test\WixToolsetTest.Core.Native\net6.0\win-x64\WixToolsetTest.Core.Native.dll ^
33 %_B%\test\WixToolsetTest.CoreIntegration\net6.0\WixToolsetTest.CoreIntegration.dll ^
34 --nologo -l "trx;LogFileName=%_L%\TestResults\wix_prepublish.trx" || exit /b
32 35
33 36
34:: Publish 37:: Publish
@@ -50,8 +53,11 @@ msbuild -t:Publish -p:Configuration=%_C% -nologo -warnaserror WixToolset.Sdk\Wix
50 53
51 54
52:: Test 55:: Test
53dotnet test -c %_C% --no-build --nologo test\WixToolsetTest.BuildTasks -l "trx;LogFileName=%_L%\TestResults\WixToolsetTest.BuildTasks.trx" || exit /b 56dotnet test ^
54dotnet test -c %_C% --no-build --nologo test\WixToolsetTest.Sdk -l "trx;LogFileName=%_L%\TestResults\WixToolsetTest.Sdk.trx" || exit /b 57 %_B%\test\WixToolsetTest.BuildTasks\net472\win-x64\WixToolsetTest.BuildTasks.dll ^
58 %_B%\test\WixToolsetTest.Sdk\net472\WixToolsetTest.Sdk.dll ^
59 --nologo -l "trx;LogFileName=%_L%\TestResults\wix_postpublish.trx" || exit /b
60
55 61
56:: Pack 62:: Pack
57msbuild pack_t.proj -p:Configuration=%_C% -nologo -m -warnaserror -bl:%_L%\wix_pack.binlog || exit /b 63msbuild pack_t.proj -p:Configuration=%_C% -nologo -m -warnaserror -bl:%_L%\wix_pack.binlog || exit /b