Skip to content

Commit 71855dd

Browse files
author
Michael Fero
committed
test: CPP-787 - CI run for DBaaS integration test
1 parent 166979f commit 71855dd

3 files changed

Lines changed: 25 additions & 7 deletions

File tree

build.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,15 @@ build:
3535
build/cassandra-unit-tests --gtest_output=xml:cassandra-unit-test-results.xml
3636
build/dse-unit-tests --gtest_output=xml:dse-unit-test-results.xml
3737
38+
if [ -f build/cassandra-integration-tests ]; then
39+
build/cassandra-integration-tests --category=cassandra --keep-clusters --verbose --gtest_filter=DbaasTests* --gtest_output=xml:dbaas-integration-test-results.xml
40+
fi
41+
3842
install_driver
3943
test_installed_driver 'dse'
4044
4145
- xunit:
42-
- "*unit-test-results.xml"
46+
- "*test-results.xml"
4347
package:
4448
allow_empty: true
4549
include: # list of files and glob paths to include in the artifact, relative to the current working directory

cpp-driver/.build.sh

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ else
3535
fi
3636

3737
get_driver_version() {
38-
local header_file=$1
39-
local driver_prefix=$2
38+
local header_file=${1}
39+
local driver_prefix=${2}
4040
local driver_version=$(grep "#define[ \t]\+${driver_prefix}_VERSION_\(MAJOR\|MINOR\|PATCH\|SUFFIX\)" ${header_file} | awk '
4141
BEGIN { major="?"; minor="?"; patch="?" }
4242
/_VERSION_MAJOR/ { major=$3 }
@@ -65,23 +65,33 @@ install_dependencies() {
6565
}
6666

6767
build_driver() {
68-
local driver_prefix=$1
68+
local driver_prefix=${1}
6969

7070
# Ensure build directory is cleaned (static nodes are not cleaned)
7171
[[ -d build ]] && rm -rf build
7272
mkdir build
7373

7474
(
7575
cd build
76-
cmake -DCMAKE_BUILD_TYPE=Release -D${driver_prefix}_BUILD_SHARED=On -D${driver_prefix}_BUILD_STATIC=On -D${driver_prefix}_BUILD_EXAMPLES=On -D${driver_prefix}_BUILD_UNIT_TESTS=On ..
76+
BUILD_INTEGRATION_TESTS=Off
77+
if [ "${RELEASE}" = "bionic64" ]; then
78+
BUILD_INTEGRATION_TESTS=On
79+
fi
80+
cmake -DCMAKE_BUILD_TYPE=Release \
81+
-D${driver_prefix}_BUILD_SHARED=On \
82+
-D${driver_prefix}_BUILD_STATIC=On \
83+
-D${driver_prefix}_BUILD_EXAMPLES=On \
84+
-D${driver_prefix}_BUILD_UNIT_TESTS=On \
85+
-D${driver_prefix}_BUILD_INTEGRATION_TESTS=${BUILD_INTEGRATION_TESTS} \
86+
..
7787
[[ -x $(which clang-format) ]] && make format-check
7888
make -j${PROCS}
7989
)
8090
}
8191

8292
check_driver_exports() {(
8393
set +e #Disable fail fast for this subshell
84-
local driver_library=$1
94+
local driver_library=${1}
8595
if [ -f ${driver_library} ]; then
8696
declare -a MISSING_FUNCTIONS
8797
for function in "${@:2}"; do

cpp-driver/build.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,15 @@ build:
3333
3434
build/cassandra-unit-tests --gtest_output=xml:cassandra-unit-test-results.xml
3535
36+
if [ -f build/cassandra-integration-tests ]; then
37+
build/cassandra-integration-tests --category=cassandra --keep-clusters --verbose --gtest_filter=DbaasTests* --gtest_output=xml:dbaas-integration-test-results.xml
38+
fi
39+
3640
install_driver
3741
test_installed_driver 'cassandra'
3842
3943
- xunit:
40-
- "*unit-test-results.xml"
44+
- "*test-results.xml"
4145
package:
4246
allow_empty: true
4347
include: # list of files and glob paths to include in the artifact, relative to the current working directory

0 commit comments

Comments
 (0)