summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-05-25 15:49:46 (GMT)
committerGitHub <noreply@github.com>2023-05-25 15:49:46 (GMT)
commitd176f78ec23116bedaa8c5ad27fe5ca323deebaf (patch)
tree72ee5f58b910773449699e89806fd181aa0c4fe7 /Tools
parentb328ba194157ab5191d056608d35ab4353fc61af (diff)
downloadcpython-d176f78ec23116bedaa8c5ad27fe5ca323deebaf.zip
cpython-d176f78ec23116bedaa8c5ad27fe5ca323deebaf.tar.gz
cpython-d176f78ec23116bedaa8c5ad27fe5ca323deebaf.tar.bz2
Improves the Windows MSI test run on PR (GH-104929)
Correctly set the exit code when builds fail Also build docs as part of the test (cherry picked from commit 569b2b8d612354062b8679d2d3f44f7ee03e66c2) Co-authored-by: Steve Dower <steve.dower@python.org>
Diffstat (limited to 'Tools')
-rw-r--r--Tools/msi/build.bat58
1 files changed, 24 insertions, 34 deletions
diff --git a/Tools/msi/build.bat b/Tools/msi/build.bat
index 8771d00..b9aab88 100644
--- a/Tools/msi/build.bat
+++ b/Tools/msi/build.bat
@@ -29,29 +29,23 @@ call "%D%get_externals.bat"
call "%PCBUILD%find_msbuild.bat" %MSBUILD%
if ERRORLEVEL 1 (echo Cannot locate MSBuild.exe on PATH or as MSBUILD variable & exit /b 2)
-if defined BUILDX86 (
- call "%PCBUILD%build.bat" -p Win32 -d -e %REBUILD% %BUILDTEST%
- if errorlevel 1 exit /B %ERRORLEVEL%
- call "%PCBUILD%build.bat" -p Win32 -e %REBUILD% %BUILDTEST%
- if errorlevel 1 exit /B %ERRORLEVEL%
-)
-if defined BUILDX64 (
- call "%PCBUILD%build.bat" -p x64 -d -e %REBUILD% %BUILDTEST%
- if errorlevel 1 exit /B %ERRORLEVEL%
- call "%PCBUILD%build.bat" -p x64 -e %REBUILD% %BUILDTEST%
- if errorlevel 1 exit /B %ERRORLEVEL%
-)
-if defined BUILDARM64 (
- call "%PCBUILD%build.bat" -p ARM64 -d -e %REBUILD% %BUILDTEST%
- if errorlevel 1 exit /B %ERRORLEVEL%
- call "%PCBUILD%build.bat" -p ARM64 -e %REBUILD% %BUILDTEST%
- if errorlevel 1 exit /B %ERRORLEVEL%
-)
+if defined BUILDX86 call "%PCBUILD%build.bat" -p Win32 -d -e %REBUILD% %BUILDTEST%
+if errorlevel 1 exit /B %ERRORLEVEL%
+if defined BUILDX86 call "%PCBUILD%build.bat" -p Win32 -e %REBUILD% %BUILDTEST%
+if errorlevel 1 exit /B %ERRORLEVEL%
-if defined BUILDDOC (
- call "%PCBUILD%..\Doc\make.bat" html
- if errorlevel 1 exit /B %ERRORLEVEL%
-)
+if defined BUILDX64 call "%PCBUILD%build.bat" -p x64 -d -e %REBUILD% %BUILDTEST%
+if errorlevel 1 exit /B %ERRORLEVEL%
+if defined BUILDX64 call "%PCBUILD%build.bat" -p x64 -e %REBUILD% %BUILDTEST%
+if errorlevel 1 exit /B %ERRORLEVEL%
+
+if defined BUILDARM64 call "%PCBUILD%build.bat" -p ARM64 -d -e %REBUILD% %BUILDTEST%
+if errorlevel 1 exit /B %ERRORLEVEL%
+if defined BUILDARM64 call "%PCBUILD%build.bat" -p ARM64 -e %REBUILD% %BUILDTEST%
+if errorlevel 1 exit /B %ERRORLEVEL%
+
+if defined BUILDDOC call "%PCBUILD%..\Doc\make.bat" html
+if errorlevel 1 exit /B %ERRORLEVEL%
rem Build the launcher MSI separately
%MSBUILD% "%D%launcher\launcher.wixproj" /p:Platform=x86
@@ -68,18 +62,14 @@ if defined REBUILD (
set BUILD_CMD=%BUILD_CMD% /t:Rebuild
)
-if defined BUILDX86 (
- %MSBUILD% /p:Platform=x86 %BUILD_CMD%
- if errorlevel 1 exit /B %ERRORLEVEL%
-)
-if defined BUILDX64 (
- %MSBUILD% /p:Platform=x64 %BUILD_CMD%
- if errorlevel 1 exit /B %ERRORLEVEL%
-)
-if defined BUILDARM64 (
- %MSBUILD% /p:Platform=ARM64 %BUILD_CMD%
- if errorlevel 1 exit /B %ERRORLEVEL%
-)
+if defined BUILDX86 %MSBUILD% /p:Platform=x86 %BUILD_CMD%
+if errorlevel 1 exit /B %ERRORLEVEL%
+
+if defined BUILDX64 %MSBUILD% /p:Platform=x64 %BUILD_CMD%
+if errorlevel 1 exit /B %ERRORLEVEL%
+
+if defined BUILDARM64 %MSBUILD% /p:Platform=ARM64 %BUILD_CMD%
+if errorlevel 1 exit /B %ERRORLEVEL%
exit /B 0