Skip to content

Commit

Permalink
Merge branch 'ci-odbc-fix'
Browse files Browse the repository at this point in the history
Fix build failures in ODBC CI job by using Debian UnixODBC packages
instead of Microsoft ones.

See #1035.
  • Loading branch information
vadz committed Feb 23, 2023
2 parents aa3d518 + e7b5d1f commit 334ff8d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion scripts/ci/install_odbc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,15 @@
#
source ${SOCI_SOURCE_DIR}/scripts/ci/common.sh

# Remove buggy versions of the packages from Microsoft repositories as well as
# their dependencies.
run_apt remove \
libodbc1 odbcinst1debian2 \
unixodbc unixodbc-dev

run_apt install \
tar bzip2 \
unixodbc unixodbc-dev \
unixodbc unixodbc-dbgsym unixodbc-dev \
odbc-postgresql odbc-postgresql-dbgsym

# Use full path to the driver library to avoid errors like
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/test_odbc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ source ${SOCI_SOURCE_DIR}/scripts/ci/common.sh

# Exclude the tests which can't be run due to the absence of ODBC drivers (MS
# SQL and MySQL).
run_test -E 'soci_odbc_test_m.sql'
LSAN_OPTIONS=suppressions=${SOCI_SOURCE_DIR}/scripts/suppress_odbc.txt run_test -E 'soci_odbc_test_m.sql'
6 changes: 6 additions & 0 deletions scripts/suppress_odbc.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# This is a suppression file for LeakSanitizer when running ODBC tests under Unix.

# There seems to be a leak inside SQLDriverConnect() that we can't do anything
# about (we do close the connection, but there are still a couple of once only
# leaks as well a 252 byte leak per connection, it seems).
leak:SQLDriverConnect

0 comments on commit 334ff8d

Please sign in to comment.