Skip to content
Snippets Groups Projects
Commit bbcde439 authored by Dmitry Ivanov's avatar Dmitry Ivanov
Browse files

fix(cmake): Don't download GLAuth for LDAP tests by default

NO_DOC=picodata internal patch
NO_CHANGELOG=picodata internal patch
NO_TEST=picodata internal patch
parent 51669ff9
No related branches found
No related tags found
No related merge requests found
...@@ -262,6 +262,40 @@ test-jepsen: CMAKE_PARAMS = -DCMAKE_BUILD_TYPE=RelWithDebInfo \ ...@@ -262,6 +262,40 @@ test-jepsen: CMAKE_PARAMS = -DCMAKE_BUILD_TYPE=RelWithDebInfo \
test-jepsen: configure prebuild-jepsen test-jepsen: configure prebuild-jepsen
${CMAKE_BUILD} --target run-jepsen ${CMAKE_BUILD} --target run-jepsen
##############################
# Coverity testing #
##############################
.PHONY: build-coverity
build-coverity: CMAKE_PARAMS = -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DENABLE_WERROR=ON \
-DTEST_BUILD=ON
build-coverity: CMAKE_BUILD_ENV = PATH=${PATH}:/cov-analysis/bin cov-build --dir ${COVERITY_DIR}
build-coverity: configure
${CMAKE_BUILD}
.PHONY: test-coverity
test-coverity: build-coverity
tar czvf tarantool.tgz ${COVERITY_DIR}
if [ -n "$${COVERITY_TOKEN}" ]; then \
echo "Exporting code coverity information to scan.coverity.com"; \
curl --location \
--fail \
--silent \
--show-error \
--retry 5 \
--retry-delay 5 \
--form token=$${COVERITY_TOKEN} \
--form email=tarantool@tarantool.org \
--form file=@tarantool.tgz \
--form version=$(shell git describe HEAD) \
--form description="Tarantool Coverity" \
${COVERITY_URL}; \
else \
echo "Coverity token is not provided"; \
exit 1; \
fi
############################## ##############################
# LuaJIT integration testing # # LuaJIT integration testing #
############################## ##############################
......
...@@ -521,33 +521,37 @@ else() ...@@ -521,33 +521,37 @@ else()
endif() endif()
# Download GLAuth, a LDAP server used in tests # Download GLAuth, a LDAP server used in tests
message(STATUS "Downloading GLAuth for tests") option(ENABLE_GLAUTH_DOWNLOAD "Download GLAuth for ldap tests" OFF)
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") if(ENABLE_GLAUTH_DOWNLOAD)
if(${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "x86_64") message(STATUS "Downloading GLAuth for tests")
set(GLAUTH_URL https://github.com/glauth/glauth/releases/download/v2.2.0/glauth-linux-amd64) set(GLAUTH_URL_PREFIX https://github.com/glauth/glauth/releases/download/v2.2.0)
set(GLAUTH_HASH 823b4403b87e0294ca921651694b57ca) if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
elseif(${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "aarch64") if(${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "x86_64")
set(GLAUTH_URL https://github.com/glauth/glauth/releases/download/v2.2.0/glauth-linux-arm64) set(GLAUTH_URL ${GLAUTH_URL_PREFIX}/glauth-linux-amd64)
set(GLAUTH_HASH c3e749a34f54e82597e7b4cd7efeae42) set(GLAUTH_HASH 823b4403b87e0294ca921651694b57ca)
else() elseif(${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "aarch64")
message(WARNING "Failed to download GLAuth: unsupported platform ${CMAKE_HOST_SYSTEM_PROCESSOR}") set(GLAUTH_URL ${GLAUTH_URL_PREFIX}/glauth-linux-arm64)
endif() set(GLAUTH_HASH c3e749a34f54e82597e7b4cd7efeae42)
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") else()
if(${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "x86_64") message(WARNING "Failed to download GLAuth: unsupported platform ${CMAKE_HOST_SYSTEM_PROCESSOR}")
set(GLAUTH_URL https://github.com/glauth/glauth/releases/download/v2.2.0/glauth-darwin-amd64) endif()
set(GLAUTH_HASH 19b3a8d83d6b258508df626cd1ff3f46) elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
elseif(${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "arm64") if(${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "x86_64")
set(GLAUTH_URL https://github.com/glauth/glauth/releases/download/v2.2.0/glauth-darwin-arm64) set(GLAUTH_URL ${GLAUTH_URL_PREFIX}/glauth-darwin-amd64)
set(GLAUTH_HASH 45b9f2ff7a27ca1cc2b53910f0c89c67) set(GLAUTH_HASH 19b3a8d83d6b258508df626cd1ff3f46)
elseif(${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "arm64")
set(GLAUTH_URL ${GLAUTH_URL_PREFIX}/glauth-darwin-arm64)
set(GLAUTH_HASH 45b9f2ff7a27ca1cc2b53910f0c89c67)
else()
message(WARNING "Failed to download GLAuth: unsupported platform ${CMAKE_HOST_SYSTEM_PROCESSOR}")
endif()
else() else()
message(WARNING "Failed to download GLAuth: unsupported platform ${CMAKE_HOST_SYSTEM_PROCESSOR}") message(WARNING "Failed to download GLAuth: unsupported OS ${CMAKE_SYSTEM_NAME}")
endif() endif()
else() set(GLAUTH_BIN ${CMAKE_BINARY_DIR}/glauth)
message(WARNING "Failed to download GLAuth: unsupported OS") file(DOWNLOAD ${GLAUTH_URL} ${GLAUTH_BIN} EXPECTED_MD5 ${GLAUTH_HASH} SHOW_PROGRESS)
execute_process(COMMAND chmod 770 ${GLAUTH_BIN})
endif() endif()
set(GLAUTH_BIN ${CMAKE_BINARY_DIR}/glauth)
file(DOWNLOAD ${GLAUTH_URL} ${GLAUTH_BIN} EXPECTED_MD5 ${GLAUTH_HASH} SHOW_PROGRESS)
execute_process(COMMAND chmod 770 ${GLAUTH_BIN})
# #
# Curl # Curl
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment