Skip to content

Commit 152a45d

Browse files
authored
CPP-856 - Remove Boost framework integration tests (#331)
1 parent 13a00c2 commit 152a45d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+16
-14254
lines changed

appveyor.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ environment:
3838
secure: h28bN22Py3CZPqrWoZWEjIFnpes+kslusCKP1mRYdUqBEf+OO1kFEQTZ9DGD7tuCSIIRDI3Mf9LX8zgUdmdlZA==
3939
APPVEYOR_IGNORE_COMMIT_FILTERING_ON_TAG: true
4040
DRIVER_TYPE: DSE
41-
BOOST_VERSION: 1.69.0
4241
LIBSSH2_VERSION: 1.9.0
4342
LIBUV_VERSION: 1.33.0
4443
OPENSSL_1_0_VERSION: 1.0.2s
@@ -89,12 +88,10 @@ environment:
8988
OPENSSL_MAJOR_MINOR: 1.0
9089
VISUAL_STUDIO_INTERNAL_VERSION: 142
9190
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
92-
BOOST_VERSION: 1.70.0
9391
# - CMAKE_GENERATOR: Visual Studio 16 2019
9492
# OPENSSL_MAJOR_MINOR: 1.1
9593
# VISUAL_STUDIO_INTERNAL_VERSION: 142
9694
# APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
97-
# BOOST_VERSION: 1.70.0
9895
#init:
9996
# - ps: iex ((New-Object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
10097
install:

cpp-driver/appveyor.ps1

Lines changed: 6 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ Function Build-Configuration-Information {
6363
$output = @"
6464
Visual Studio: $($Env:CMAKE_GENERATOR.Split(" ")[-2]) [$($Env:CMAKE_GENERATOR.Split(" ")[-1])]
6565
Architecture: $($Env:Platform)
66-
Boost: v$($Env:BOOST_VERSION)
6766
libssh2: v$($Env:LIBSSH2_VERSION)
6867
libuv: v$($Env:LIBUV_VERSION)
6968
OpenSSL: v$(Get-OpenSSL-Version)
@@ -112,7 +111,6 @@ Function Environment-Information {
112111

113112
Function Initialize-Build-Environment {
114113
# Get the versions for the third party dependencies
115-
$boost_version = $Env:BOOST_VERSION
116114
$libssh2_version = $Env:LIBSSH2_VERSION
117115
$libuv_version = $Env:LIBUV_VERSION
118116
$openssl_version = Get-OpenSSL-Version
@@ -179,17 +177,15 @@ Function Initialize-Build-Environment {
179177
}
180178

181179
# Generate default environment variables for per commit builds
182-
$boost_version_filename = "$($boost_version.Replace(".", "_"))"
180+
If ($Env:APPVEYOR_BUILD_WORKER_IMAGE -Like "Visual Studio 2019") {
181+
$boost_version_directory_suffix = "1_71_0"
182+
} Else {
183+
$boost_version_directory_suffix = "1_69_0"
184+
}
183185
$visual_studio_version = "$($Env:VISUAL_STUDIO_INTERNAL_VERSION.Insert(2, "."))"
184186

185187
# Generate the default Boost environment variables
186-
$Env:BOOST_ROOT = "C:/Libraries/boost_$($boost_version_filename)"
187-
$Env:BOOST_LIBRARYDIR = "$($Env:BOOST_ROOT)/$($lib_architecture)-msvc-$($visual_studio_version)"
188-
If (-Not (Test-Path -Path "$($Env:BOOST_LIBRARYDIR)")) {
189-
# Update the Boost environment variables for CMake to find installation
190-
$Env:BOOST_ROOT = "$($libs_location_prefix)/boost-$($boost_version)"
191-
$Env:BOOST_LIBRARYDIR = "$($Env:BOOST_ROOT)/$($lib_architecture)-msvc-$($visual_studio_version)"
192-
}
188+
$Env:BOOST_ROOT = "C:/Libraries/boost_$($boost_version_directory_suffix)"
193189
$Env:BOOST_INCLUDEDIR = "$($Env:BOOST_ROOT)/include"
194190

195191
# Generate the default libssh2 environment variables
@@ -509,55 +505,6 @@ add_dependencies(`${PROJECT_NAME} `${ZLIB_LIBRARY_NAME})
509505
}
510506
}
511507

512-
# Handle installation of the per commit dependencies (e.g. Test builds)
513-
# Determine if Boost should be installed (pre-installed or cached)
514-
If (-Not (Test-Path -Path "$($Env:BOOST_LIBRARYDIR)")) {
515-
New-Item -ItemType Directory -Force -Path "$($dependencies_build_location_prefix)/boost" | Out-Null
516-
Push-Location -Path "$($dependencies_build_location_prefix)/boost"
517-
518-
$cmakelists_contents = @"
519-
cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
520-
project(Boost)
521-
set(PROJECT_DISPLAY_NAME "AppVeyor CI Build for Boost")
522-
set(PROJECT_MODULE_DIR $cmake_modules_dir)
523-
set(CMAKE_MODULE_PATH `${CMAKE_MODULE_PATH} `${PROJECT_MODULE_DIR})
524-
include(ExternalProject-boost)
525-
set(GENERATED_SOURCE_FILE `${CMAKE_CURRENT_BINARY_DIR}/main.cpp)
526-
file(REMOVE `${GENERATED_SOURCE_FILE})
527-
file(WRITE `${GENERATED_SOURCE_FILE} "int main () { return 0; }")
528-
add_executable(`${PROJECT_NAME} `${GENERATED_SOURCE_FILE})
529-
add_dependencies(`${PROJECT_NAME} `${BOOST_LIBRARY_NAME})
530-
"@
531-
$cmakelists_contents | Out-File -FilePath "CMakeLists.txt" -Encoding Utf8 -Force
532-
533-
Write-Host "Configuring Boost"
534-
cmake -G "$($Env:CMAKE_GENERATOR)" -A $Env:CMAKE_PLATFORM "-DBOOST_VERSION=$($Env:BOOST_VERSION)" "-DBOOST_INSTALL_PREFIX=$($Env:BOOST_ROOT)" .
535-
If ($LastExitCode -ne 0) {
536-
If (Test-Path -Path "build/CMakeFiles/CMakeOutput.log") {
537-
Push-AppveyorArtifact "build/CMakeFiles/CMakeOutput.log" -DeploymentName "Boost Output Log"
538-
}
539-
If (Test-Path -Path "build/CMakeFiles/CMakeError.log") {
540-
Push-AppveyorArtifact "build/CMakeFiles/CMakeError.log" -DeploymentName "Boost Error Log"
541-
}
542-
Pop-Location
543-
Throw "Failed to configure Boost for MSVC $($Env:VISUAL_STUDIO_INTERNAL_VERSION)-$($Env:Platform)"
544-
}
545-
Write-Host "Building and Installing Boost"
546-
cmake --build . --config RelWithDebInfo
547-
If ($LastExitCode -ne 0) {
548-
If (Test-Path -Path "build/CMakeFiles/CMakeOutput.log") {
549-
Push-AppveyorArtifact "build/CMakeFiles/CMakeOutput.log" -DeploymentName "Boost Output Log"
550-
}
551-
If (Test-Path -Path "build/CMakeFiles/CMakeError.log") {
552-
Push-AppveyorArtifact "build/CMakeFiles/CMakeError.log" -DeploymentName "Boost Error Log"
553-
}
554-
Pop-Location
555-
Throw "Failed to build Boost for MSVC $($Env:VISUAL_STUDIO_INTERNAL_VERSION)-$($Env:Platform)"
556-
}
557-
558-
Pop-Location
559-
}
560-
561508
# Determine if libssh2 should be installed (cached)
562509
If (-Not (Test-Path -Path "$($Env:LIBSSH2_ROOT_DIR)/lib")) { # lib directory checked due to external project being CMake (automatically creates root directory)
563510
New-Item -ItemType Directory -Force -Path "$($dependencies_build_location_prefix)/libssh2" | Out-Null

cpp-driver/appveyor.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ environment:
3737
secure: h28bN22Py3CZPqrWoZWEjIFnpes+kslusCKP1mRYdUqBEf+OO1kFEQTZ9DGD7tuCSIIRDI3Mf9LX8zgUdmdlZA==
3838
APPVEYOR_IGNORE_COMMIT_FILTERING_ON_TAG: true
3939
DRIVER_TYPE: CASS
40-
BOOST_VERSION: 1.69.0
4140
LIBSSH2_VERSION: 1.9.0
4241
LIBUV_VERSION: 1.33.0
4342
OPENSSL_1_0_VERSION: 1.0.2s
@@ -88,12 +87,10 @@ environment:
8887
OPENSSL_MAJOR_MINOR: 1.0
8988
VISUAL_STUDIO_INTERNAL_VERSION: 142
9089
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
91-
BOOST_VERSION: 1.70.0
9290
# - CMAKE_GENERATOR: Visual Studio 16 2019
9391
# OPENSSL_MAJOR_MINOR: 1.1
9492
# VISUAL_STUDIO_INTERNAL_VERSION: 142
9593
# APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
96-
# BOOST_VERSION: 1.70.0
9794
#init:
9895
# - ps: iex ((New-Object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
9996
install:

cpp-driver/cmake/modules/CppDriver.cmake

Lines changed: 10 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,13 @@ endmacro()
8888
# CassOptionalDependencies
8989
#
9090
# Configure enabled optional dependencies if found or if Windows use an
91-
# external project to build Boost, OpenSSL, zlib.
91+
# external project to build OpenSSL and zlib.
9292
#
9393
# Output: CASS_INCLUDES and CASS_LIBS
9494
#------------------------
9595
macro(CassOptionalDependencies)
9696
# Boost
97-
if(CASS_USE_BOOST_ATOMIC OR CASS_BUILD_INTEGRATION_TESTS)
97+
if(CASS_USE_BOOST_ATOMIC)
9898
CassUseBoost()
9999
endif()
100100

@@ -387,7 +387,6 @@ macro(CassConfigureTests)
387387
# Add CCM bridge as a dependency for integration tests
388388
set(CCM_BRIDGE_INCLUDES "${CASS_ROOT_DIR}/test/ccm_bridge/src")
389389
add_subdirectory(${CASS_ROOT_DIR}/test/ccm_bridge)
390-
add_subdirectory(${CASS_ROOT_DIR}/test/integration_tests)
391390
endif()
392391

393392
if (CASS_BUILD_INTEGRATION_TESTS OR CASS_BUILD_UNIT_TESTS)
@@ -524,11 +523,10 @@ endmacro()
524523
#------------------------
525524
# CassUseBoost
526525
#
527-
# Add includes, libraries, define flags required for using Boost if found or if
528-
# Windows use an external project to build Boost.
526+
# Add includes and define flags required for using Boost if found.
529527
#
530-
# Input: CASS_USE_STATIC_LIBS, CASS_USE_BOOST_ATOMIC, CASS_INCLUDES, CASS_LIBS
531-
# Output: CASS_INCLUDES and CASS_LIBS
528+
# Input: CASS_USE_BOOST_ATOMIC, CASS_INCLUDES
529+
# Output: CASS_INCLUDES
532530
#------------------------
533531
macro(CassUseBoost)
534532
# Allow for boost directory to be specified on the command line
@@ -550,64 +548,15 @@ macro(CassUseBoost)
550548
add_definitions(-DBOOST_ALL_NO_LIB)
551549
endif()
552550

553-
# Determine if shared or static boost libraries should be used
554-
if(CASS_USE_STATIC_LIBS OR
555-
(WIN32 AND CASS_BUILD_INTEGRATION_TESTS)) # Force the use of Boost static libraries for Windows (e.g. executables)
556-
set(Boost_USE_STATIC_LIBS ON)
557-
else()
558-
set(Boost_USE_STATIC_LIBS OFF)
559-
add_definitions(-DBOOST_ALL_DYN_LINK)
560-
endif()
561-
set(Boost_USE_STATIC_RUNTIME OFF)
562-
set(Boost_USE_MULTITHREADED ON)
563-
add_definitions(-DBOOST_THREAD_USES_MOVE)
564-
565551
# Check for general Boost availability
566552
find_package(Boost ${CASS_MINIMUM_BOOST_VERSION} QUIET)
567-
if ((WIN32 AND NOT Boost_FOUND) AND
568-
(CASS_USE_BOOST_ATOMIC OR CASS_BUILD_INTEGRATION_TESTS))
569-
message(STATUS "Unable to Locate Boost: Third party build step will be performed")
570-
include(ExternalProject-Boost)
571-
else()
572-
message(STATUS "Boost version: v${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}")
573-
# Ensure the driver components exist (optional)
574-
if(CASS_USE_BOOST_ATOMIC)
575-
if(NOT Boost_INCLUDE_DIRS)
576-
message(FATAL_ERROR "Boost headers required to build driver because of -DCASS_USE_BOOST_ATOMIC=On")
577-
endif()
578-
579-
# Assign Boost include for atomics
580-
set(CASS_INCLUDES ${CASS_INCLUDES} ${Boost_INCLUDE_DIRS})
553+
if(CASS_USE_BOOST_ATOMIC)
554+
if(NOT Boost_INCLUDE_DIRS)
555+
message(FATAL_ERROR "Boost headers required to build driver because of -DCASS_USE_BOOST_ATOMIC=On")
581556
endif()
582557

583-
# Determine if Boost components are available for test executables
584-
if(CASS_BUILD_INTEGRATION_TESTS)
585-
# Handle new required version of CMake for Boost v1.66.0 (Windows only)
586-
if(WIN32)
587-
if(Boost_FOUND)
588-
if(Boost_VERSION GREATER 106600 OR Boost_VERSION EQUAL 106600)
589-
# Ensure CMake version is v3.11.0+
590-
if(CMAKE_VERSION VERSION_LESS 3.11.0)
591-
message(FATAL_ERROR "Boost v${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION} requires CMake v3.11.0+."
592-
"Updgrade CMake or downgrade Boost to v${CASS_MINIMUM_BOOST_VERSION} - v1.65.1.")
593-
endif()
594-
endif()
595-
endif()
596-
endif()
597-
598-
# Ensure Boost components are available
599-
find_package(Boost ${CASS_MINIMUM_BOOST_VERSION} COMPONENTS chrono system thread unit_test_framework)
600-
if(NOT Boost_FOUND)
601-
# Ensure Boost was not found due to minimum version requirement
602-
set(CASS_FOUND_BOOST_VERSION "${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}")
603-
if((CASS_FOUND_BOOST_VERSION VERSION_GREATER "${CASS_MINIMUM_BOOST_VERSION}")
604-
OR (CASS_FOUND_BOOST_VERSION VERSION_EQUAL "${CASS_MINIMUM_BOOST_VERSION}"))
605-
message(FATAL_ERROR "Boost [chrono, system, thread, and unit_test_framework] are required to build tests")
606-
else()
607-
message(FATAL_ERROR "Boost v${CASS_FOUND_BOOST_VERSION} Found: v${CASS_MINIMUM_BOOST_VERSION} or greater required")
608-
endif()
609-
endif()
610-
endif()
558+
# Assign Boost include for atomics
559+
set(CASS_INCLUDES ${CASS_INCLUDES} ${Boost_INCLUDE_DIRS})
611560
endif()
612561

613562
# Determine if additional Boost definitions are required for driver/executables

0 commit comments

Comments
 (0)