CXX-3180 add mingw-w64 GCC task coverage#1536
Conversation
| if [[ "${SKIP_INSTALL_LIBMONGOCRYPT:-}" != "1" ]]; then | ||
| { | ||
| echo "Installing libmongocrypt into ${mongoc_dir}..." 1>&2 | ||
| echo "Installing libmongocrypt into ${mongoc_dir}..." |
There was a problem hiding this comment.
Minor: but suggest using variable used for install path (which currently appears to have the same as ${mongoc_dir})
| echo "Installing libmongocrypt into ${mongoc_dir}..." | |
| echo "Installing libmongocrypt into ${mongoc_install_dir}..." |
| # Windows x86_64: 4.2+. | ||
| ('windows-vsCurrent', 'vs2022x64', ['Debug'], ['shared'], [11, 17], [None], ['plain', 'csfle'], ['4.2', '8.0', 'latest'], ['single', 'replica', 'sharded']), | ||
| ('windows-vsCurrent', 'vs2022x64', ['Debug'], ['shared'], [11, 17], [None], ['plain', 'csfle'], ['4.2', '8.0', 'latest'], ['single', 'replica', 'sharded']), | ||
| ('windows-2022-latest', 'gcc', ['Debug'], ['shared'], [11, 17], [None], ['plain', 'csfle'], ['4.2', '8.0', 'latest'], ['single', 'replica', 'sharded']), |
There was a problem hiding this comment.
Finally, there is a consistent and ongoing EVG task failure for CSFLE tests with server 4.2 with mingw-w64 GCC
The "connection refused" makes me think this is a failure to connect over TCP. Idea: this may be from mongocryptd failing to spawn (maybe related to the form of MONGOCRYPTD_PATH?). But I am not sure why that would be specific to version 4.2.
Regardless: I think csfle on MinGW test coverage can be added in the future (I expect it may be more valuable testing in the C driver, since the platform specific CSFLE code is likely limited to the C driver + libmongocrypt).
Resolves CXX-3180 following DEVPROD-20813 and #1512. Verified by this patch.
This PR implements mingw-w64 GCC task coverage on Windows. This is in preparation for the followup resolution of CXX-2973 for
pkg-configtask coverage.Most of the changes in this PR deal with consistently communicating the different CMake generators and toolchains to use when configuring and building example projects:
example_projects_(cc|cxx): reuseCC(cc_compiler) andCXX(cxx_compiler) instead.example_projects_cxx_standard: reuseREQUIRED_CXX_STANDARDinstead (default to minimum of11when unset).CMAKE_GENERATOR(_PLATFORM): reusegeneratorandplatforminstead (same as compile task).Compile and link flags specific to example projects are still specified by
example_projects_(cxxflags|ldflags).The
build.shscripts are simplified to work regardless of CMake generator or toolchain. However, special-casing by single (non-Windows) vs. multi-config (Windows) generators is still necessary to avoid "unused by this project" warnings when specifying-DCMAKE_BUILD_TYPE=<config>.Additional notes:
compile-libmongocrypt.sh) due to hardcoded flags which assume MSVC on Windows.test_driver.exeexecutable alone can take up to 6 minutes (30% of task execution time)...! Unsure how to improve/avoid this behavior yet.-Wa,-mbig-objas the mingw-w64 GCC equivalent to MSVC/bigobj(followup to Split collection_mocked.cpp test case into smaller functions #1509). Applied to all test executables.vs_verproperty for EVG distro definitions.Finally, there is a consistent and ongoing EVG task failure for CSFLE tests with server 4.2 with mingw-w64 GCC due to errors of the following form (output is edited for readability):
It is yet unclear to me why this error manifests only with mingw-w64 GCC on Windows. Perhaps there may be a cipher suite compatibility issue similar to CDRIVER-5998 or CDRIVER-4530?