Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add faketime tests #4843

Closed
wants to merge 27 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
2d289c2
Add faketime tests
dudoslav Apr 2, 2024
e758a63
Format using clang-format-17
dudoslav Apr 2, 2024
1babe1e
Remove timing tests for Windows builds
dudoslav Apr 3, 2024
eadb63b
Fix portfile issues
dudoslav Apr 3, 2024
7fc4610
Rename libfaketime port
dudoslav Apr 3, 2024
55692b4
Add librt to libfaketime dependencies
dudoslav Apr 3, 2024
208b68a
Only run on Linux (remove MacOS)
dudoslav Apr 3, 2024
124e9c1
Only link rt for Linux
dudoslav Apr 3, 2024
c0e8877
Update test/CMakeLists.txt
dudoslav Apr 3, 2024
1bf263a
Update ports/README.md
dudoslav Apr 3, 2024
04f3ef7
Unstatus compressors directory. (#4842)
KiterLuc Apr 2, 2024
89d35da
Document how to build a subset of dependencies with vcpkg. (#4844)
teo-tsirpanis Apr 2, 2024
f035f31
Update dev history with 2.21.0 and 2.21.1 content. (#4847)
KiterLuc Apr 3, 2024
474fdc6
Bump dev version to 2.23.0. (#4849)
KiterLuc Apr 3, 2024
84a4e05
Improve diagnostics when an Azure endpoint is not configured. (#4845)
teo-tsirpanis Apr 3, 2024
d638fd2
Always use vcpkg. (#4570)
teo-tsirpanis Apr 3, 2024
4d248da
Do not attempt Azure shared key authentication if no account name is …
teo-tsirpanis Apr 8, 2024
1ac0b4d
Port more tests to REST CI (#4838)
ypatia Apr 9, 2024
25c90e7
Fix build errors with CMake 3.29.1. (#4859)
teo-tsirpanis Apr 9, 2024
81794b7
Increase HDFS timeout in nightlies. (#4861)
KiterLuc Apr 10, 2024
9a5985d
Support GCS service account impersonation et. al. (#4799)
teo-tsirpanis Apr 10, 2024
c11bf06
Support specifying GCP account credentials as a config option. (#4855)
teo-tsirpanis Apr 11, 2024
fc97c63
Mark the newly introduced GCS configuration options as experimental. …
teo-tsirpanis Apr 11, 2024
3eb860e
Config serialization should take into account environment variables (…
ypatia Apr 12, 2024
22953a6
Add internal Config option 'sm.memory.tracker.reporter.wait_time_ms'.…
bekadavis9 Apr 16, 2024
2ca28a2
Stabilize REST CI (#4876)
ypatia Apr 16, 2024
bde1811
Add end-to-end cloud test workflow with Microsoft Entra ID. (#4841)
robertbindar Apr 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions ports/libfaketime/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
cmake_minimum_required(VERSION 3.12)

project(libfaketime VERSION 0.9.10)

add_library(
${PROJECT_NAME}
SHARED
dudoslav marked this conversation as resolved.
Show resolved Hide resolved
src/libfaketime.c
)

target_include_directories(${PROJECT_NAME}
PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>"
"$<INSTALL_INTERFACE:include>"
)

file(GLOB_RECURSE PUBLIC_HEADERS "src/*.h")

target_sources(
${PROJECT_NAME}
PUBLIC
FILE_SET HEADERS
BASE_DIRS src
FILES ${PUBLIC_HEADERS}
)

install(TARGETS ${PROJECT_NAME}
EXPORT ${PROJECT_NAME}
FILE_SET HEADERS
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)

install(EXPORT ${PROJECT_NAME}
FILE ${PROJECT_NAME}-targets.cmake
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
NAMESPACE libfaketime::
)

include(GNUInstallDirs)
include(CMakePackageConfigHelpers)

configure_package_config_file(
${PROJECT_NAME}-config.cmake.in
${PROJECT_NAME}-config.cmake
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})

write_basic_package_version_file(
${PROJECT_NAME}-config-version.cmake
VERSION ${CMAKE_PROJECT_VERSION}
COMPATIBILITY SameMajorVersion)

install(FILES
${CMAKE_BINARY_DIR}/${PROJECT_NAME}-config.cmake
${CMAKE_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})
8 changes: 8 additions & 0 deletions ports/libfaketime/libfaketime-config.cmake.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@PACKAGE_INIT@

include("${CMAKE_CURRENT_LIST_DIR}/libfaketime-targets.cmake")

set(libfaketime_VERSION @CMAKE_PROJECT_VERSION@)
set(libfaketime_FOUND true)

dudoslav marked this conversation as resolved.
Show resolved Hide resolved
check_required_components("libfaketime")
26 changes: 26 additions & 0 deletions ports/libfaketime/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
vcpkg_from_github(
dudoslav marked this conversation as resolved.
Show resolved Hide resolved
OUT_SOURCE_PATH SOURCE_PATH
REPO wolfcw/libfaketime
REF v0.9.10
dudoslav marked this conversation as resolved.
Show resolved Hide resolved
SHA512 07c431bee21e31343b680d1322dd529ea276e3cc4dbec61646c12bf5d0263163faf6186efeb36b199e24b655578a493c43e3b7a7acf8eba8b9ff84a1e94d618b
)

file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
file(COPY "${CMAKE_CURRENT_LIST_DIR}/libfaketime-config.cmake.in" DESTINATION "${SOURCE_PATH}")

vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
)

vcpkg_cmake_install()
vcpkg_copy_pdbs()
vcpkg_fixup_pkgconfig()
# vcpkg_copy_tools(TOOL_NAMES faketime AUTO_CLEAN)
vcpkg_cmake_config_fixup(
CONFIG_PATH lib/cmake/libfaketime
PACKAGE_NAME libfaketime)

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")

# Handle copyright and usage
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
16 changes: 16 additions & 0 deletions ports/libfaketime/vcpkg.json
dudoslav marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "libfaketime",
"version-string": "v0.9.10",
"description": "",
dudoslav marked this conversation as resolved.
Show resolved Hide resolved
"homepage": "https://github.com/wolfcw/libfaketime",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}
40 changes: 40 additions & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,46 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux" AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU
)
endif()

find_package(libfaketime REQUIRED)
dudoslav marked this conversation as resolved.
Show resolved Hide resolved

# unit test executable
add_executable(
tiledb_timing_unit EXCLUDE_FROM_ALL
$<TARGET_OBJECTS:TILEDB_CORE_OBJECTS>
"src/unit-capi-metadata.cc"
"src/unit.cc"
)

target_include_directories(
tiledb_timing_unit BEFORE PRIVATE
${TILEDB_CORE_INCLUDE_DIR}
${TILEDB_EXPORT_HEADER_DIR}
)

target_link_libraries(
tiledb_timing_unit
PUBLIC
libfaketime::libfaketime
dudoslav marked this conversation as resolved.
Show resolved Hide resolved
TILEDB_CORE_OBJECTS_ILIB
TILEDB_CORE_OBJECTS
Catch2::Catch2
tiledb_test_support_lib
)

# We want tests to continue as normal even as the API is changing,
# so don't warn for deprecations, since they'll be escalated to errors.
if (NOT MSVC)
target_compile_options(tiledb_timing_unit PRIVATE -Wno-deprecated-declarations)
endif()

add_test(
NAME "tiledb_timing_unit"
COMMAND tiledb_timing_unit --durations=yes
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)

set_property(TEST tiledb_timing_unit PROPERTY ENVIRONMENT_MODIFICATION "FAKETIME=set:2020-12-24 20:30:00")

add_test(
NAME "tiledb_unit"
COMMAND tiledb_unit --durations=yes
Expand Down
3 changes: 2 additions & 1 deletion vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@
"tests": {
"description": "Build tiledb tests",
"dependencies": [
"catch2"
"catch2",
"libfaketime"
dudoslav marked this conversation as resolved.
Show resolved Hide resolved
]
},
"tools": {
Expand Down
Loading