Skip to content

Commit b5c8a04

Browse files
committed
CONCPP-58 Making tests run in both CSPS and SSPS as default
So far that is done in github actions.
1 parent 0c0fd88 commit b5c8a04

File tree

3 files changed

+14
-11
lines changed

3 files changed

+14
-11
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
---
1+
---`/test
2+
23
name: Run CI Tests
34
45
on:
@@ -20,6 +21,7 @@ env:
2021
MYSQL_TEST_USER: root
2122
MYSQL_TEST_PASSWD: "heyPassw+-_20oRd"
2223
MYSQL_TEST_DB: testcpp
24+
BASE_TEST_HOST: jdbc:mariadb://${{ env.MYSQL_TEST_HOST }}:${{ env.MYSQL_TEST_PORT }}
2325
2426
jobs:
2527
setup:
@@ -67,7 +69,7 @@ jobs:
6769
if: ${{ startsWith(matrix.os, 'ubuntu') }}
6870
run: |
6971
sudo apt install unixodbc-dev
70-
cmake -DCONC_WITH_MSI=OFF -DCONC_WITH_UNIT_TESTS=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_SSL=OPENSSL -DTEST_HOST="jdbc:mariadb://${{ env.MYSQL_TEST_HOST }}:${{ env.MYSQL_TEST_PORT }}" .
72+
cmake -DCONC_WITH_MSI=OFF -DCONC_WITH_UNIT_TESTS=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_SSL=OPENSSL -DTEST_HOST="${{ env.BASE_TEST_HOST }}" .
7173
cmake --build . --config RelWithDebInfo
7274
env:
7375
MARIADB_PLUGIN_DIR: ${{ github.workspace }}
@@ -78,16 +80,14 @@ jobs:
7880
brew install libiodbc openssl
7981
ls -lrt /opt/homebrew/opt/libiodbc/lib
8082
81-
TEST_DRIVER=${{ github.workspace }}/RelWithDebInfo/libmaodbc.dylib
82-
echo "TEST_DRIVER=${{ github.workspace }}/RelWithDebInfo/libmaodbc.dylib" >> $GITHUB_ENV
83-
cmake -G Xcode -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY="" -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED=NO -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED=NO -DWITH_SIGNCODE=OFF -DODBC_LIB_DIR=/opt/homebrew/opt/libiodbc/lib -DODBC_INCLUDE_DIR=/opt/homebrew/opt/libiodbc/include -DCONC_WITH_MSI=OFF -DCONC_WITH_UNIT_TESTS=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_SSL=OPENSSL -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOPENSSL_LIBRARIES=/usr/local/opt/openssl/lib -DWITH_EXTERNAL_ZLIB=On -DTEST_HOST="jdbc:mariadb://${{ env.MYSQL_TEST_HOST }}:${{ env.MYSQL_TEST_PORT }}" .
83+
cmake -G Xcode -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY="" -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED=NO -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED=NO -DWITH_SIGNCODE=OFF -DODBC_LIB_DIR=/opt/homebrew/opt/libiodbc/lib -DODBC_INCLUDE_DIR=/opt/homebrew/opt/libiodbc/include -DCONC_WITH_MSI=OFF -DCONC_WITH_UNIT_TESTS=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_SSL=OPENSSL -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOPENSSL_LIBRARIES=/usr/local/opt/openssl/lib -DWITH_EXTERNAL_ZLIB=On -DTEST_HOST="${{ env.BASE_TEST_HOST }}" .
8484
cmake --build . --config RelWithDebInfo
8585
8686
- name: make windows
8787
if: ${{ startsWith(matrix.os, 'windows') }}
8888
shell: powershell
8989
run: |
90-
cmake -DCONC_WITH_MSI=OFF -DCONC_WITH_UNIT_TESTS=OFF -DWITH_MSI=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_SSL=SCHANNEL -DTEST_HOST="jdbc:mariadb://${{ env.MYSQL_TEST_HOST }}:${{ env.MYSQL_TEST_PORT }}" .
90+
cmake -DCONC_WITH_MSI=OFF -DCONC_WITH_UNIT_TESTS=OFF -DWITH_MSI=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_SSL=SCHANNEL -DTEST_HOST="${{ env.BASE_TEST_HOST }}" .
9191
cmake --build . --config RelWithDebInfo
9292
9393
- name: Run test suite
@@ -98,6 +98,9 @@ jobs:
9898
cp ../libmariadb/caching_sha2_password.* ../
9999
fi
100100
ctest --output-on-failure
101+
export TEST_HOST=$BASE_TEST_HOST/$TEST_SCHEMA?useServerPrepStmts=true
102+
ctest --output-on-failure
103+
101104
env:
102105
DB_TYPE: ${{ matrix.db-type }}
103106
LOCAL_DB: ${{ steps.setup-env.outputs.database-type }}
@@ -109,4 +112,4 @@ jobs:
109112
TEST_SCHEMA: ${{ env.MYSQL_TEST_DB }}
110113
TEST_VERBOSE: true
111114
SSLCERT: ${{ matrix.db-type == 'container' && format('{0}/.github/workflows/certs/server.crt', github.workspace) || '' }}
112-
MARIADB_PLUGIN_DIR: ${{ github.workspace }}
115+
MARIADB_PLUGIN_DIR: ${{ github.workspace }}

test/framework/start_options.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,13 @@ class StartOptions
6666

6767
StartOptions();
6868

69-
StartOptions( const TestList & orderedParams
70-
, const TestProperties * defStrVals = NULL
69+
StartOptions( const TestList & orderedParams
70+
, const TestProperties * defStrVals = NULL
7171
, const std::map<String, bool> * defBoolVals = NULL );
7272

7373
/* Last array member must be NULL */
7474
StartOptions( const String::value_type * orderedParams[]
75-
, const TestProperties * defStrVals = NULL
75+
, const TestProperties * defStrVals = NULL
7676
, const std::map<String, bool> * defBoolVals = NULL );
7777

7878
bool parseParams(int paramsNumber, char** paramsValues);

test/unit/unit_fixture.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ void unit_fixture::dropTable(String table_name)
438438
sql::Connection *
439439
unit_fixture::getConnection(sql::ConnectOptionsMap *additional_options)
440440
{
441-
if (driver == NULL)
441+
if (driver == nullptr)
442442
{
443443
driver=sql::mariadb::get_driver_instance();
444444
}

0 commit comments

Comments
 (0)