From 562db1374ea9563fc003f283ba0e618969231752 Mon Sep 17 00:00:00 2001 From: robot-clickhouse Date: Wed, 15 May 2024 10:04:47 +0000 Subject: [PATCH] Backport #63787 to 24.3: Fix `test_odbc_interaction` for arm64 on linux --- tests/integration/helpers/cluster.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/integration/helpers/cluster.py b/tests/integration/helpers/cluster.py index 1f29dfe8eee..16982f39295 100644 --- a/tests/integration/helpers/cluster.py +++ b/tests/integration/helpers/cluster.py @@ -4294,6 +4294,9 @@ class ClickHouseInstance: ) return xml_str + def get_machine_name(self): + return platform.machine() + @property def odbc_drivers(self): if self.odbc_ini_path: @@ -4301,12 +4304,12 @@ class ClickHouseInstance: "SQLite3": { "DSN": "sqlite3_odbc", "Database": "/tmp/sqliteodbc", - "Driver": "/usr/lib/x86_64-linux-gnu/odbc/libsqlite3odbc.so", - "Setup": "/usr/lib/x86_64-linux-gnu/odbc/libsqlite3odbc.so", + "Driver": f"/usr/lib/{self.get_machine_name()}-linux-gnu/odbc/libsqlite3odbc.so", + "Setup": f"/usr/lib/{self.get_machine_name()}-linux-gnu/odbc/libsqlite3odbc.so", }, "MySQL": { "DSN": "mysql_odbc", - "Driver": "/usr/lib/x86_64-linux-gnu/odbc/libmyodbc.so", + "Driver": f"/usr/lib/{self.get_machine_name()}-linux-gnu/odbc/libmyodbc.so", "Database": odbc_mysql_db, "Uid": odbc_mysql_uid, "Pwd": odbc_mysql_pass, @@ -4323,8 +4326,8 @@ class ClickHouseInstance: "ReadOnly": "No", "RowVersioning": "No", "ShowSystemTables": "No", - "Driver": "/usr/lib/x86_64-linux-gnu/odbc/psqlodbca.so", - "Setup": "/usr/lib/x86_64-linux-gnu/odbc/libodbcpsqlS.so", + "Driver": f"/usr/lib/{self.get_machine_name()}-linux-gnu/odbc/psqlodbca.so", + "Setup": f"/usr/lib/{self.get_machine_name()}-linux-gnu/odbc/libodbcpsqlS.so", "ConnSettings": "", }, }