You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[ML] Add tzdata as test target requirement for Linux and MacOS #2771
In our instructions to build a dev environment, we mention that tzdata is required to run some unit tests that do data conversion. However, this instruction is easy to overlook, which leaves developers with failed test without an obvious reason or error message.
I suggest to add tzdata as a CMake requirement for building test targets that perform corresponding data time transformations (ml::core?). Unfortunately, tzdata is not a library or binary, but a system package. Nonetheless, we could check if the timezone databases exist in the typical system paths and output a meaningful error message if not.
For example:
find_file(TZDATA_FILENAMES"UTC"PATHS"/usr/share/zoneinfo""/usr/lib/zoneinfo")
if(NOT TZDATA_FILE)
message(FATAL_ERROR"tzdata is not installed or not found. Please install tzdata on your system.")
else()
message(STATUS"tzdata found.")
endif()
Activity
valeriy42 commentedon Oct 24, 2024
@edsavage, @jan-elastic WDYT?
jan-elastic commentedon Oct 24, 2024
sounds like a big improvement to me!