Skip to content

Commit 3202761

Browse files
committed
Changed used tests configuration repo. Added 32b build
Made msiexec process to wait for the finish Moved 32 and 64b DSN installation in different actions
1 parent 2c260cd commit 3202761

File tree

2 files changed

+40
-12
lines changed

2 files changed

+40
-12
lines changed

.github/workflows/ci.yml

Lines changed: 39 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ jobs:
4141
- uses: actions/checkout@v4
4242
- id: set-matrix
4343
name: build matrix
44-
uses: rusher/mariadb-test-build-matrix@main
44+
uses: mariadb-corporation/connector-ci-build-matrix@main
4545
with:
46-
additional-matrix: '[]'
46+
additional-matrix: '[{"name": "MariaDB 11.4 (local) - windows 2025", "os": "windows-2025", "db-type": "community", "db-tag": "11.4"},{"name": "MariaDB 11.4 32bits (local) - windows 2025", "os": "windows-2025", "db-type": "community", "db-tag": "11.4", "arch": "32"}]'
4747

4848
ci:
4949
name: ${{ matrix.name }}
@@ -59,7 +59,7 @@ jobs:
5959

6060
- name: Setup Test Environment
6161
id: setup-env
62-
uses: rusher/mariadb-test-setup@master
62+
uses: mariadb-corporation/connector-ci-setup@master
6363
with:
6464
node-version: ${{ matrix.node }}
6565
db-type: ${{ matrix.db-type }}
@@ -96,30 +96,58 @@ jobs:
9696
run: |
9797
choco install wixtoolset -y
9898
99-
- name: make windows
100-
if: ${{ startsWith(matrix.os, 'windows') }}
99+
- name: make windows 64bit
100+
if: ${{ startsWith(matrix.os, 'windows') && (matrix.arch != '32' || !matrix.arch) }}
101101
shell: powershell
102102
run: |
103103
cmake -DCONC_WITH_MSI=OFF -DCONC_WITH_UNIT_TESTS=OFF -DWITH_MSI=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_SSL=SCHANNEL . #-DDIRECT_LINK_TESTS=1 .
104104
cmake --build . --config RelWithDebInfo
105105
106+
- name: make windows 32bit
107+
if: ${{ startsWith(matrix.os, 'windows') && startsWith(matrix.arch, '32') }}
108+
run: |
109+
cmake -A Win32 -DCONC_WITH_MSI=OFF -DCONC_WITH_UNIT_TESTS=OFF -DWITH_MSI=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_SSL=SCHANNEL . #-DDIRECT_LINK_TESTS=1 .
110+
cmake --build . --config RelWithDebInfo
111+
106112
- name: Install generated MSI (Windows only)
107113
if: startsWith(matrix.os, 'windows')
108114
shell: powershell
109115
run: |
110-
pwd
116+
$pwd= Get-Location
117+
$log= Join-Path $pwd "install.log"
118+
Write-Output $log
111119
ls ${{ github.workspace }}\packaging\windows
112120
Get-ChildItem -Path ${{ github.workspace }}\packaging\windows\mariadb-connector-odbc-*.msi
113-
$log = "install.log"
114121
foreach ($msi in Get-ChildItem -Path ${{ github.workspace }}\packaging\windows\mariadb-connector-odbc-*.msi) {
115-
$procInstall= Start-Process msiexec.exe -ArgumentList "/i $($msi.FullName) /qn /norestart" -NoNewWindow -PassThru
116-
#$procLog = Start-Process "powershell" "Get-Content -Path `"$log`" -Wait" -NoNewWindow -PassThru
117-
#$procMain.WaitForExit()
118-
#$procLog.Kill()
122+
$procInstall= Start-Process msiexec.exe -ArgumentList "/i $($msi.FullName) /qn /norestart /L* `"$log`"" -NoNewWindow -PassThru
123+
Start-Sleep -Milliseconds 500
124+
if (Test-Path) {
125+
Get-Content -Path $log -Wait | ForEach-Object {
126+
if ($procInstall.HasExited) { break }
127+
$_
128+
} else {
129+
echo "Log file still does not exist"
130+
Start-Sleep -Milliseconds 500
131+
}
132+
Write-Host "Installer exit code: $($procInstall.ExitCode)"
119133
}
134+
135+
- name: Create 64b DSN
136+
if: ${{ startsWith(matrix.os, 'windows') && (matrix.arch != '32' || !matrix.arch) }}
137+
shell: powershell
138+
run: |
120139
Get-OdbcDriver -Platform "64-bit"
121140
Add-OdbcDsn -Name $env:TEST_DSN -DriverName "MariaDB ODBC 3.1 Driver" -DsnType "User" -SetPropertyValue @( "SERVER=$env:TEST_SERVER", "DATABASE=$env:TEST_SCHEMA", "USER=$env:TEST_UID", "PASSWORD=$env:TEST_PASSWORD", "PORT=$env:TEST_PORT" )
122141
142+
- name: Create 32b DSN
143+
if: ${{ startsWith(matrix.os, 'windows') && startsWith(matrix.arch, '32') }}
144+
shell: powershell
145+
run: |
146+
Get-OdbcDriver -Platform "32-bit"
147+
$powershell32b = "$env:WINDIR\SysWOW64\WindowsPowerShell\v1.0\powershell.exe"
148+
$dsn= "Add-OdbcDsn -Name $env:TEST_DSN -DriverName `"MariaDB ODBC 3.1 Driver`" -DsnType `"User`" -SetPropertyValue @( `"SERVER=$env:TEST_SERVER`", `"DATABASE=$env:TEST_SCHEMA`", `"USER=$env:TEST_UID`", `"PASSWORD=$env:TEST_PASSWORD`", `"PORT=$env:TEST_PORT`" )"
149+
$powershell32b -NoProfile -Command $dsn
150+
123151
- name: Run test suite
124152
shell: bash
125153
run: |

test/catalog2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1407,7 +1407,7 @@ ODBC_TEST(odbc185)
14071407

14081408
OK_SIMPLE_STMT(hstmt1, "DROP TABLE IF EXISTS t_odbc185");
14091409
CHECK_STMT_RC(hstmt1, SQLExecDirectW(hstmt1,
1410-
W(L"CREATE TABLE t_odbc185 (ccol CHAR(32), vcfield VARCHAR(32) not null, tcol TEXT, ttcol TINYTEXT, mtcol MEDIUMTEXT,\
1410+
W(L"CREATE TABLE t_odbc185 (ccol CHAR(32), vcfield VARCHAR(32) NOT NULL, tcol TEXT, ttcol TINYTEXT, mtcol MEDIUMTEXT,\
14111411
ltcol LONGTEXT, ecol ENUM('enum val 1', 'enum val 2'), scol SET('set m1', 'set m3'))"), SQL_NTS));
14121412

14131413
/* It doesn't matter if we call SQLColumns or SQLColumnsW */

0 commit comments

Comments
 (0)