diff options
Diffstat (limited to 'src/internal')
-rw-r--r-- | src/internal/WixBuildTools.TestSupport/MsbuildUtilities.cs | 13 | ||||
-rw-r--r-- | src/internal/internal.cmd | 25 | ||||
-rw-r--r-- | src/internal/internal_t.proj | 7 |
3 files changed, 32 insertions, 13 deletions
diff --git a/src/internal/WixBuildTools.TestSupport/MsbuildUtilities.cs b/src/internal/WixBuildTools.TestSupport/MsbuildUtilities.cs index 32680e5d..3271cc20 100644 --- a/src/internal/WixBuildTools.TestSupport/MsbuildUtilities.cs +++ b/src/internal/WixBuildTools.TestSupport/MsbuildUtilities.cs | |||
@@ -17,7 +17,7 @@ namespace WixToolsetTest.Sdk | |||
17 | 17 | ||
18 | public static class MsbuildUtilities | 18 | public static class MsbuildUtilities |
19 | { | 19 | { |
20 | public static MsbuildRunnerResult BuildProject(BuildSystem buildSystem, string projectPath, string[] arguments = null, string configuration = "Release", bool? outOfProc = null, string verbosityLevel = "normal", bool suppressValidation = true) | 20 | public static MsbuildRunnerResult BuildProject(BuildSystem buildSystem, string projectPath, string[] arguments = null, string configuration = "Release", string verbosityLevel = "normal", bool suppressValidation = true) |
21 | { | 21 | { |
22 | var allArgs = new List<string> | 22 | var allArgs = new List<string> |
23 | { | 23 | { |
@@ -30,11 +30,6 @@ namespace WixToolsetTest.Sdk | |||
30 | $"-bl:{Path.ChangeExtension(projectPath, ".binlog")}" | 30 | $"-bl:{Path.ChangeExtension(projectPath, ".binlog")}" |
31 | }; | 31 | }; |
32 | 32 | ||
33 | if (outOfProc.HasValue) | ||
34 | { | ||
35 | allArgs.Add($"-p:RunWixToolsOutOfProc={outOfProc.Value}"); | ||
36 | } | ||
37 | |||
38 | if (arguments != null) | 33 | if (arguments != null) |
39 | { | 34 | { |
40 | allArgs.AddRange(arguments); | 35 | allArgs.AddRange(arguments); |
@@ -96,11 +91,9 @@ namespace WixToolsetTest.Sdk | |||
96 | } | 91 | } |
97 | } | 92 | } |
98 | 93 | ||
99 | public static IEnumerable<string> GetToolCommandLines(MsbuildRunnerResult result, string toolName, string operation, BuildSystem buildSystem, bool? outOfProc = null) | 94 | public static IEnumerable<string> GetToolCommandLines(MsbuildRunnerResult result, string toolName, string operation, BuildSystem buildSystem) |
100 | { | 95 | { |
101 | var expectedOutOfProc = buildSystem == BuildSystem.DotNetCoreSdk || outOfProc.HasValue && outOfProc.Value; | 96 | var expectedToolExe = buildSystem == BuildSystem.DotNetCoreSdk ? $"{toolName}.dll\"" : $"{toolName}.exe"; |
102 | var expectedToolExe = !expectedOutOfProc ? $"({toolName}.exe)" : | ||
103 | buildSystem == BuildSystem.DotNetCoreSdk ? $"{toolName}.dll\"" : $"{toolName}.exe"; | ||
104 | var expectedToolCommand = $"{expectedToolExe} {operation}"; | 97 | var expectedToolCommand = $"{expectedToolExe} {operation}"; |
105 | return result.Output.Where(line => line.Contains(expectedToolCommand)); | 98 | return result.Output.Where(line => line.Contains(expectedToolCommand)); |
106 | } | 99 | } |
diff --git a/src/internal/internal.cmd b/src/internal/internal.cmd index 8b46e77c..9380ce4e 100644 --- a/src/internal/internal.cmd +++ b/src/internal/internal.cmd | |||
@@ -2,10 +2,21 @@ | |||
2 | @pushd %~dp0 | 2 | @pushd %~dp0 |
3 | 3 | ||
4 | @set _C=Debug | 4 | @set _C=Debug |
5 | @set _L=%~dp0..\..\build\logs | ||
6 | |||
5 | :parse_args | 7 | :parse_args |
6 | @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 | ||
7 | @if not "%1"=="" shift & goto parse_args | 11 | @if not "%1"=="" shift & goto parse_args |
8 | 12 | ||
13 | @set _B=%~dp0..\..\build\wix\%_C% | ||
14 | |||
15 | :: Clean | ||
16 | |||
17 | @if "%_INC%"=="" call :clean | ||
18 | @if NOT "%_CLEAN%"=="" goto :end | ||
19 | |||
9 | @echo Building internal %_C% | 20 | @echo Building internal %_C% |
10 | 21 | ||
11 | :: internal | 22 | :: internal |
@@ -14,10 +25,18 @@ nuget restore || exit /b | |||
14 | :: dotnet pack -c %_C% WixBuildTools.MsgGen\WixBuildTools.MsgGen.csproj || exit /b | 25 | :: dotnet pack -c %_C% WixBuildTools.MsgGen\WixBuildTools.MsgGen.csproj || exit /b |
15 | :: dotnet pack -c %_C% WixBuildTools.XsdGen\WixBuildTools.XsdGen.csproj || exit /b | 26 | :: dotnet pack -c %_C% WixBuildTools.XsdGen\WixBuildTools.XsdGen.csproj || exit /b |
16 | 27 | ||
17 | msbuild -t:Pack WixBuildTools.TestSupport\WixBuildTools.TestSupport.csproj -p:Configuration=%_C% -nologo -m -warnaserror -bl:..\..\build\logs\internal_build.binlog || exit /b | 28 | msbuild internal_t.proj -p:Configuration=%_C% -nologo -warnaserror -bl:%_L%\internal_build.binlog || exit /b |
29 | |||
30 | @goto :end | ||
18 | 31 | ||
19 | msbuild -t:Build WixBuildTools.TestSupport.Native\WixBuildTools.TestSupport.Native.vcxproj -p:Configuration=%_C%;Platform=x86 -nologo || exit /b | 32 | :clean |
20 | msbuild -t:Build WixBuildTools.TestSupport.Native\WixBuildTools.TestSupport.Native.vcxproj -p:Configuration=%_C%;Platform=x64 -nologo || exit /b | 33 | @rd /s/q "..\..\build\internal" 2> nul |
34 | @del "..\..\build\artifacts\WixBuildTools.TestSupport.*.nupkg" 2> nul | ||
35 | @del "..\..\build\artifacts\WixBuildTools.TestSupport.Native.*.nupkg" 2> nul | ||
36 | @rd /s/q "%USERPROFILE%\.nuget\packages\wixbuildtools.testsupport" 2> nul | ||
37 | @rd /s/q "%USERPROFILE%\.nuget\packages\wixbuildtools.testsupport.native" 2> nul | ||
38 | @exit /b | ||
21 | 39 | ||
40 | :end | ||
22 | @popd | 41 | @popd |
23 | @endlocal | 42 | @endlocal |
diff --git a/src/internal/internal_t.proj b/src/internal/internal_t.proj new file mode 100644 index 00000000..fda67786 --- /dev/null +++ b/src/internal/internal_t.proj | |||
@@ -0,0 +1,7 @@ | |||
1 | <Project Sdk="Microsoft.Build.Traversal"> | ||
2 | <ItemGroup> | ||
3 | <ProjectReference Include="WixBuildTools.TestSupport\WixBuildTools.TestSupport.csproj" Targets="Pack" /> | ||
4 | <ProjectReference Include="WixBuildTools.TestSupport.Native\WixBuildTools.TestSupport.Native.vcxproj" Properties="Platform=x86" /> | ||
5 | <ProjectReference Include="WixBuildTools.TestSupport.Native\WixBuildTools.TestSupport.Native.vcxproj" Properties="Platform=x64" /> | ||
6 | </ItemGroup> | ||
7 | </Project> | ||