summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Chen <luke.chen@mongodb.com>2022-07-18 11:12:56 +1000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-07-18 01:45:12 +0000
commit4e55569e7d57646a160cd472783db5e5c3054756 (patch)
tree1155c9c94636a6f4e5ffe85e1c5f6e6f8b65b871
parentaed8e3a74d7f7bd5fc2d607d86d79636f9127cf2 (diff)
downloadmongo-4e55569e7d57646a160cd472783db5e5c3054756.tar.gz
Import wiredtiger: f0973921f60c967f65ec74aa063aef51fc148de0 from branch mongodb-master
ref: 22879bd37a..f0973921f6 for: 6.1.0-rc0 WT-9587 Fix Windows status reporting in evergreen (#8124)
-rw-r--r--src/third_party/wiredtiger/import.data2
-rw-r--r--src/third_party/wiredtiger/test/evergreen/build_windows.ps125
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)
}