mirror of
https://github.com/libgit2/libgit2.git
synced 2026-06-22 06:26:26 +00:00
tests: Fix stat tests on 32bit systems.
On 32bit systems the git_fs_path_lstat from libgit2 by default uses 32bit stat structs while the tests are being compiled with struct stat64 via _FILE_OFFSET_BITS=64. This discrepancy causes the "flaky" stat failures in tests. The solution is to use the same _FILE_OFFSET_BITS as the library by setting _FILE_OFFSET_BITS globally Co-authored-by: Edward Thomson <ethomson@edwardthomson.com>
This commit is contained in:
@@ -19,7 +19,6 @@ add_definitions(-DCLAR_FIXTURE_PATH=\"${CLAR_FIXTURES}\")
|
||||
add_definitions(-DCLAR_TMPDIR=\"libgit2_tests\")
|
||||
add_definitions(-DCLAR_WIN32_LONGPATHS)
|
||||
add_definitions(-DCLAR_HAS_REALPATH)
|
||||
add_definitions(-D_FILE_OFFSET_BITS=64)
|
||||
|
||||
# Ensure that we do not use deprecated functions internally
|
||||
add_definitions(-DGIT_DEPRECATE_HARD)
|
||||
|
||||
@@ -19,7 +19,6 @@ add_definitions(-DCLAR_FIXTURE_PATH=\"${CLAR_FIXTURES}\")
|
||||
add_definitions(-DCLAR_TMPDIR=\"libgit2_tests\")
|
||||
add_definitions(-DCLAR_WIN32_LONGPATHS)
|
||||
add_definitions(-DCLAR_HAS_REALPATH)
|
||||
add_definitions(-D_FILE_OFFSET_BITS=64)
|
||||
|
||||
# Ensure that we do not use deprecated functions internally
|
||||
add_definitions(-DGIT_DEPRECATE_HARD)
|
||||
|
||||
Reference in New Issue
Block a user