From 4e55569e7d57646a160cd472783db5e5c3054756 Mon Sep 17 00:00:00 2001 From: Luke Chen Date: Mon, 18 Jul 2022 11:12:56 +1000 Subject: Import wiredtiger: f0973921f60c967f65ec74aa063aef51fc148de0 from branch mongodb-master ref: 22879bd37a..f0973921f6 for: 6.1.0-rc0 WT-9587 Fix Windows status reporting in evergreen (#8124) --- src/third_party/wiredtiger/import.data | 2 +- .../wiredtiger/test/evergreen/build_windows.ps1 | 25 +++++++++++++++++----- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data index 654ed5bffed..aaacbb9534c 100644 --- a/src/third_party/wiredtiger/import.data +++ b/src/third_party/wiredtiger/import.data @@ -2,5 +2,5 @@ "vendor": "wiredtiger", "github": "wiredtiger/wiredtiger.git", "branch": "mongodb-master", - "commit": "22879bd37a0dd16ac10ff45ca24f75da3075ed4b" + "commit": "f0973921f60c967f65ec74aa063aef51fc148de0" } diff --git a/src/third_party/wiredtiger/test/evergreen/build_windows.ps1 b/src/third_party/wiredtiger/test/evergreen/build_windows.ps1 index 56a68b0ab55..0c6111ad714 100644 --- a/src/third_party/wiredtiger/test/evergreen/build_windows.ps1 +++ b/src/third_party/wiredtiger/test/evergreen/build_windows.ps1 @@ -4,12 +4,25 @@ param ( [string]$vcvars_bat = "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build\vcvars64.bat" ) +function Die-On-Failure { + param ( + $Result + ) + + if ($Result -ne 0) { + throw("Task failed: " + $Result) + } +} + +# This script should fail when a cmdlet fails. +$ErrorActionPreference = "Stop" + # Source the vcvars to ensure we have access to the Visual Studio toolchain cmd /c "`"$vcvars_bat`"&set" | foreach { - if ($_ -match "=") { - $v = $_.split("="); set-item -force -path "ENV:\$($v[0])" -value "$($v[1])" - } + if ($_ -match "=") { + $v = $_.split("="); set-item -force -path "ENV:\$($v[0])" -value "$($v[1])" + } } # Ensure the PROCESSOR_ARCHITECTURE environment variable is set. This is sometimes not set @@ -26,12 +39,14 @@ if (-not (Test-Path cmake_build)) { cd cmake_build # Configure build with CMake. -if( $configure -eq $true) { +if ($configure -eq $true) { # Note that ${args} are all the command line options that are not automatically parsed by the param function. C:\cmake\bin\cmake --no-warn-unused-cli -DSWIG_DIR='C:\swigwin-3.0.2' -DSWIG_EXECUTABLE='C:\swigwin-3.0.2\swig.exe' -DCMAKE_BUILD_TYPE='None' -DENABLE_PYTHON=1 -DENABLE_STRICT=1 -DCMAKE_TOOLCHAIN_FILE='..\cmake\toolchains\cl.cmake' ${args} -G "Ninja" ..\. + Die-On-Failure($LastExitCode) } # Execute Ninja build. -if( $build -eq $true) { +if ($build -eq $true) { ninja + Die-On-Failure($LastExitCode) } -- cgit v1.2.1