-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d60ebaf
commit 3f04587
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
|
||
set -x | ||
set -e | ||
|
||
DEBIAN_FRONTEND=noninteractive sudo apt-get update | ||
DEBIAN_FRONTEND=noninteractive sudo apt-get install -y mariadb-server unixodbc-dev git cmake gcc libssl-dev tar curl libcurl4-openssl-dev libkrb5-dev | ||
|
||
sudo service mysql start | ||
sudo ln -s /var/run/mysqld/mysqld.sock /tmp/mysql.sock | ||
sudo mysql -u root -e 'CREATE DATABASE IF NOT EXISTS test;' | ||
sudo mysql -u root -e "USE mysql; UPDATE user SET plugin='mysql_native_password' WHERE User='root'; FLUSH PRIVILEGES;" | ||
mysql --version | ||
|
||
# set variables for Connector/ODBC | ||
export TEST_DRIVER=maodbc_test | ||
export TEST_SCHEMA=test | ||
export TEST_DSN=maodbc_test | ||
export TEST_UID=root | ||
export TEST_PASSWORD= | ||
|
||
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_OPENSSL=ON -DWITH_SSL=OPENSSL -DODBC_LIB_DIR=/usr/lib/s390x-linux-gnu/ | ||
cmake --build . --config RelWithDebInfo | ||
|
||
################################################################################################################### | ||
# run test suite | ||
################################################################################################################### | ||
|
||
echo "Running tests" | ||
|
||
cd test | ||
export ODBCINI="$PWD/odbc.ini" | ||
export ODBCSYSINI=$PWD | ||
|
||
ctest -V |