summaryrefslogtreecommitdiffstats
path: root/libmariadb/travis.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:07:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:07:14 +0000
commita175314c3e5827eb193872241446f2f8f5c9d33c (patch)
treecd3d60ca99ae00829c52a6ca79150a5b6e62528b /libmariadb/travis.sh
parentInitial commit. (diff)
downloadmariadb-10.5-upstream.tar.xz
mariadb-10.5-upstream.zip
Adding upstream version 1:10.5.12.upstream/1%10.5.12upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'libmariadb/travis.sh')
-rwxr-xr-xlibmariadb/travis.sh93
1 files changed, 93 insertions, 0 deletions
diff --git a/libmariadb/travis.sh b/libmariadb/travis.sh
new file mode 100755
index 00000000..ea65dfe3
--- /dev/null
+++ b/libmariadb/travis.sh
@@ -0,0 +1,93 @@
+#!/bin/bash
+
+set -e
+
+if [ -n "$server_branch" ] ; then
+
+ ###################################################################################################################
+ # run server test suite
+ ###################################################################################################################
+ echo "run server test suite"
+
+ # change travis localhost to use only 127.0.0.1
+ sudo sed -i 's/127\.0\.1\.1 localhost/127.0.0.1 localhost/' /etc/hosts
+ sudo tail /etc/hosts
+
+ # get latest server
+ git clone -b ${server_branch} https://github.com/mariadb/server ../workdir-server
+
+ cd ../workdir-server
+ # don't pull in submodules. We want the latest C/C as libmariadb
+ # build latest server with latest C/C as libmariadb
+ # skip to build some storage engines to speed up the build
+ cmake -DPLUGIN_MROONGA=NO -DPLUGIN_ROCKSDB=NO -DPLUGIN_SPIDER=NO -DPLUGIN_TOKUDB=NO
+ cd libmariadb
+ echo "PR:${TRAVIS_PULL_REQUEST} TRAVIS_COMMIT:${TRAVIS_COMMIT}"
+ if [ -n "$TRAVIS_PULL_REQUEST" ] && [ "$TRAVIS_PULL_REQUEST" != "false" ] ; then
+ # fetching pull request
+ echo "fetching PR"
+ git fetch origin pull/${TRAVIS_PULL_REQUEST}/head:PR_${TRAVIS_PULL_REQUEST}
+ echo "checkout PR"
+ git checkout PR_${TRAVIS_PULL_REQUEST}
+ else
+ echo "checkout commit"
+ git checkout ${TRAVIS_COMMIT}
+ fi
+
+ cd ..
+ git add libmariadb
+ make -j9
+
+ cd mysql-test/
+ ./mysql-test-run.pl --suite=main ${TEST_OPTION} --parallel=auto --skip-test=session_tracker_last_gtid
+
+else
+
+ ###################################################################################################################
+ # run connector test suite
+ ###################################################################################################################
+ echo "run connector test suite"
+
+ cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCERT_PATH=${SSLCERT}
+
+ if [ "$TRAVIS_OS_NAME" = "windows" ] ; then
+ echo "build from windows"
+ set MARIADB_CC_TEST=1
+ set MYSQL_TEST_DB=testc
+ set MYSQL_TEST_TLS=%TEST_REQUIRE_TLS%
+ set MYSQL_TEST_USER=%TEST_DB_USER%
+ set MYSQL_TEST_HOST=%TEST_DB_HOST%
+ set MYSQL_TEST_PASSWD=%TEST_DB_PASSWORD%
+ set MYSQL_TEST_PORT=%TEST_DB_PORT%
+ set MYSQL_TEST_TLS=%TEST_REQUIRE_TLS%
+ cmake --build . --config RelWithDebInfo
+ else
+ echo "build from linux"
+ export MARIADB_CC_TEST=1
+ export MYSQL_TEST_USER=$TEST_DB_USER
+ export MYSQL_TEST_HOST=$TEST_DB_HOST
+ export MYSQL_TEST_PASSWD=$TEST_DB_PASSWORD
+ export MYSQL_TEST_PORT=$TEST_DB_PORT
+ export MYSQL_TEST_DB=testc
+ export MYSQL_TEST_TLS=$TEST_REQUIRE_TLS
+ export SSLCERT=$TEST_DB_SERVER_CERT
+ export MARIADB_PLUGIN_DIR=$PWD
+
+ echo "MYSQL_TEST_PLUGINDIR=$MYSQL_TEST_PLUGINDIR"
+ if [ -n "$MYSQL_TEST_SSL_PORT" ] ; then
+ export MYSQL_TEST_SSL_PORT=$MYSQL_TEST_SSL_PORT
+ fi
+ export MYSQL_TEST_TLS=$TEST_REQUIRE_TLS
+ export SSLCERT=$TEST_DB_SERVER_CERT
+ if [ -n "$MYSQL_TEST_SSL_PORT" ] ; then
+ export MYSQL_TEST_SSL_PORT=$MYSQL_TEST_SSL_PORT
+ fi
+ make
+ fi
+
+ ls -lrt
+
+ openssl ciphers -v
+ cd unittest/libmariadb
+ ctest -V
+fi