This is an automated email from the ASF dual-hosted git repository.

isapego pushed a commit to branch ignite-27304
in repository https://gitbox.apache.org/repos/asf/ignite-3.git


The following commit(s) were added to refs/heads/ignite-27304 by this push:
     new 28ac2adae0f IGNITE-27304: Collect pdb files in case of crash
28ac2adae0f is described below

commit 28ac2adae0fb56745eb5f99e7bae7c5d52f56d4f
Author: Igor Sapego <[email protected]>
AuthorDate: Tue Mar 17 12:05:39 2026 +0100

    IGNITE-27304: Collect pdb files in case of crash
---
 .../test/platform_tests/PlatformCppTestsWindows.kt | 85 ++++++++++++++--------
 1 file changed, 53 insertions(+), 32 deletions(-)

diff --git a/.teamcity/test/platform_tests/PlatformCppTestsWindows.kt 
b/.teamcity/test/platform_tests/PlatformCppTestsWindows.kt
index 5fd464c9f32..b096b379d62 100644
--- a/.teamcity/test/platform_tests/PlatformCppTestsWindows.kt
+++ b/.teamcity/test/platform_tests/PlatformCppTestsWindows.kt
@@ -38,42 +38,34 @@ object PlatformCppTestsWindows : BuildType({
     }
 
     steps {
-        script {
+
+        powerShell {
             name = "Build C++"
             scriptContent = """
-                @echo on
-                
-                mkdir %PATH__CMAKE_BUILD_DIRECTORY%
-                cd %PATH__CMAKE_BUILD_DIRECTORY%
-                
-                cmake .. -DENABLE_TESTS=ON -DENABLE_ODBC=ON 
-DWARNINGS_AS_ERRORS=ON -DCMAKE_BUILD_TYPE=Debug 
-DCMAKE_INSTALL_PREFIX=%env.CPP_STAGING% -DCMAKE_CONFIGURATION_TYPES="Debug" -G 
"Visual Studio 15 2017" -A x64
-                
-                @echo off
-                if %%ERRORLEVEL%% NEQ 0 (
-                  echo 'CMake configuration failed'
-                  exit 5
-                )
-                @echo on
-                
+                ${'$'}ErrorActionPreference = "Stop"
+
+                New-Item -ItemType Directory -Force -Path 
"%PATH__CMAKE_BUILD_DIRECTORY%" | Out-Null
+                Set-Location "%PATH__CMAKE_BUILD_DIRECTORY%"
+
+                cmake .. -DENABLE_TESTS=ON -DENABLE_ODBC=ON 
-DWARNINGS_AS_ERRORS=ON -DCMAKE_BUILD_TYPE=Debug 
-DCMAKE_INSTALL_PREFIX="%env.CPP_STAGING%" -DCMAKE_CONFIGURATION_TYPES="Debug" 
-G "Visual Studio 15 2017" -A x64
+                if (${'$'}LASTEXITCODE -ne 0) {
+                    Write-Error "CMake configuration failed"
+                    exit 1
+                }
+
                 cmake --build . -j8
-                
-                @echo off
-                if %%ERRORLEVEL%% NEQ 0 (
-                  echo 'CMake build failed'
-                  exit 6
-                )
-                @echo on
-                
+                if (${'$'}LASTEXITCODE -ne 0) {
+                    Write-Error "CMake build failed"
+                    exit 2
+                }
+
                 cmake --install .
-                
-                @echo off
-                if %%ERRORLEVEL%% NEQ 0 (
-                  echo 'CMake install failed'
-                  exit 7
-                )
-                @echo on
+                if (${'$'}LASTEXITCODE -ne 0) {
+                    Write-Error "CMake install failed"
+                    exit 3
+                }
             """.trimIndent()
-        }
+            }
         script {
             name = "Unit tests"
             workingDir = "%PATH__CMAKE_BUILD_DIRECTORY%"
@@ -99,7 +91,6 @@ object PlatformCppTestsWindows : BuildType({
         }
         script {
             name = "ODBC integration tests"
-            enabled = false
             workingDir = "%PATH__CMAKE_BUILD_DIRECTORY%"
             scriptContent = """
                 mkdir %PATH__CRASH_DUMPS% 2>nul
@@ -107,6 +98,36 @@ object PlatformCppTestsWindows : BuildType({
             """.trimIndent()
             formatStderrAsError = true
         }
+        powerShell {
+            name = "Collect PDBs for crash dumps"
+            scriptContent = """
+                ${'$'}dumpsDir = "%PATH__CRASH_DUMPS%"
+
+                if (-not (Test-Path ${'$'}dumpsDir)) {
+                    Write-Host "Dumps directory does not exist, skipping."
+                    exit 0
+                }
+
+                ${'$'}dumps = Get-ChildItem -Path ${'$'}dumpsDir -File
+                if (${'$'}dumps.Count -eq 0) {
+                    Write-Host "Dumps directory is empty, skipping."
+                    exit 0
+                }
+
+                Write-Host "Found ${'$'}(${'$'}dumps.Count) dump file(s), 
collecting binaries from CMake build directory."
+
+                ${'$'}cmakeBuildDir = "%PATH__CMAKE_BUILD_DIRECTORY%"
+                if (-not (Test-Path ${'$'}cmakeBuildDir)) {
+                    Write-Error "CMake build directory '${'$'}cmakeBuildDir' 
does not exist."
+                    exit 1
+                }
+
+                Get-ChildItem -Path ${'$'}cmakeBuildDir -File -Include 
"*.exe", "*.dll", "*.pdb" | ForEach-Object {
+                    Copy-Item -Path ${'$'}_.FullName -Destination 
${'$'}dumpsDir -Force
+                    Write-Host "Copied: ${'$'}(${'$'}_.Name)"
+                }
+            """.trimIndent()
+        }
     }
 
     failureConditions {

Reply via email to