2020-11-19 09:50:16 -05:00
|
|
|
#! /bin/bash
|
|
|
|
|
|
|
|
goal=
|
2023-08-17 10:44:35 -04:00
|
|
|
if [ "$RDBMS" == "h2" ]; then
|
2022-10-11 08:35:57 -04:00
|
|
|
# This is the default.
|
|
|
|
goal=""
|
2022-11-03 10:15:01 -04:00
|
|
|
elif [ "$RDBMS" == "hsqldb" ] || [ "$RDBMS" == "hsqldb_2_6" ]; then
|
|
|
|
goal="-Pdb=hsqldb"
|
2022-10-11 08:35:57 -04:00
|
|
|
elif [ "$RDBMS" == "derby" ]; then
|
2020-11-19 09:50:16 -05:00
|
|
|
goal="-Pdb=derby"
|
2022-11-03 10:15:01 -04:00
|
|
|
elif [ "$RDBMS" == "mysql" ] || [ "$RDBMS" == "mysql_5_7" ]; then
|
2021-10-04 04:10:48 -04:00
|
|
|
goal="-Pdb=mysql_ci"
|
2022-11-03 10:15:01 -04:00
|
|
|
elif [ "$RDBMS" == "mariadb" ] || [ "$RDBMS" == "mariadb_10_3" ]; then
|
2021-02-03 04:55:07 -05:00
|
|
|
goal="-Pdb=mariadb_ci"
|
2022-11-03 10:15:01 -04:00
|
|
|
elif [ "$RDBMS" == "postgresql" ] || [ "$RDBMS" == "postgresql_10" ]; then
|
2021-02-03 04:55:07 -05:00
|
|
|
goal="-Pdb=pgsql_ci"
|
2022-11-03 10:15:01 -04:00
|
|
|
elif [ "$RDBMS" == "edb" ] || [ "$RDBMS" == "edb_10" ]; then
|
|
|
|
goal="-Pdb=edb_ci -DdbHost=localhost:5444"
|
2023-01-04 05:15:43 -05:00
|
|
|
elif [ "$RDBMS" == "oracle" ]; then
|
2022-11-03 10:15:01 -04:00
|
|
|
# I have no idea why, but these tests don't seem to work on CI...
|
2021-04-06 08:24:13 -04:00
|
|
|
goal="-Pdb=oracle_ci -PexcludeTests=**.LockTest.testQueryTimeout*"
|
2023-01-04 05:15:43 -05:00
|
|
|
elif [ "$RDBMS" == "oracle_11_2" ]; then
|
|
|
|
# I have no idea why, but these tests don't seem to work on CI...
|
|
|
|
goal="-Pdb=oracle_legacy_ci -PexcludeTests=**.LockTest.testQueryTimeout*"
|
2020-11-19 09:50:16 -05:00
|
|
|
elif [ "$RDBMS" == "db2" ]; then
|
2021-02-03 04:55:07 -05:00
|
|
|
goal="-Pdb=db2_ci"
|
2022-11-03 10:15:01 -04:00
|
|
|
elif [ "$RDBMS" == "db2_10_5" ]; then
|
|
|
|
goal="-Pdb=db2"
|
|
|
|
elif [ "$RDBMS" == "mssql" ] || [ "$RDBMS" == "mssql_2017" ]; then
|
2021-02-03 04:55:07 -05:00
|
|
|
goal="-Pdb=mssql_ci"
|
2021-06-23 08:56:57 -04:00
|
|
|
elif [ "$RDBMS" == "sybase" ]; then
|
|
|
|
goal="-Pdb=sybase_ci"
|
2023-08-07 09:54:44 -04:00
|
|
|
elif [ "$RDBMS" == "sybase_jconn" ]; then
|
|
|
|
goal="-Pdb=sybase_jconn_ci"
|
2022-10-11 08:35:57 -04:00
|
|
|
elif [ "$RDBMS" == "tidb" ]; then
|
|
|
|
goal="-Pdb=tidb"
|
2022-11-03 10:15:01 -04:00
|
|
|
elif [ "$RDBMS" == "hana_cloud" ]; then
|
|
|
|
goal="-Pdb=hana_cloud"
|
|
|
|
elif [ "$RDBMS" == "cockroachdb" ] || [ "$RDBMS" == "cockroachdb_21_2" ]; then
|
2022-09-23 11:43:11 -04:00
|
|
|
goal="-Pdb=cockroachdb"
|
2020-11-19 09:50:16 -05:00
|
|
|
fi
|
|
|
|
|
2022-10-11 08:50:18 -04:00
|
|
|
# Only run checkstyle in the H2 build,
|
|
|
|
# so that CI jobs give a more complete report
|
|
|
|
# and developers can fix code style and non-H2 DB tests in parallel.
|
|
|
|
if [ -n "$goal" ]; then
|
|
|
|
goal="$goal -x checkstyleMain"
|
|
|
|
fi
|
|
|
|
|
2022-10-12 02:29:22 -04:00
|
|
|
function logAndExec() {
|
|
|
|
echo 1>&2 "Executing:" "${@}"
|
|
|
|
exec "${@}"
|
|
|
|
}
|
|
|
|
|
2022-10-11 08:35:57 -04:00
|
|
|
# Clean by default otherwise the PackagedEntityManager tests fail on a node that previously ran a different DB
|
2022-10-12 02:29:22 -04:00
|
|
|
logAndExec ./gradlew clean check ${goal} "${@}" -Plog-test-progress=true --stacktrace
|