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
The mc and minio binaries are requirements for running all the S3-related unit tests. If they aren't discovered in the $PATH, we should download them (probably with FetchContent?) from the relevant locations:
The logic should be something along the lines of "find the mc command using find_program; if that fails, download mc and use that".
This should be added to the CMakeLists.txt in the tests subdirectory.
The CMake documentation for simple downloads (with checksum verification) is here; make sure you download into the CMAKE_CURRENT_BINARY_DIR, set things as executable, and point the variable to the newly-downloaded file. I think the file command may be closer to what we want than the FetchContent link I originally shared.
Once we've resolved the mc command to use at configure time, we would specify it to the tests via an environment variable (as is done here).
Rinse and repeat for minio.
Now, above, I include a few different sample URLs for the different clients.
CMAKE_SYSTEM_PROCESSOR should return x86_64 or arm64 (output of uname -m, I think). Probably have to do some conditionals to translate to the right URL (e.g., x86_64 -> amd64).
CMAKE_SYSTEM_NAME should return the OS name (many variants of "Linux" exist; may be best to detect if it's Darwin and otherwise use Linux).
Input from @rw2 from Slack: if minio/mc are not available (for example, if this code exists but the container doesn't have network connectivity), we should completely skip the S3 tests at the CMake level. That'll avoid quite a bit of noise for cases where the test has no chance of success.
The
mc
andminio
binaries are requirements for running all the S3-related unit tests. If they aren't discovered in the$PATH
, we should download them (probably with FetchContent?) from the relevant locations:and then put them in the build directory.
This will help simplify setting up the environment for running tests.
The text was updated successfully, but these errors were encountered: