Skip to content

Commit

Permalink
autotest/gdrivers/bag.py: skip check_no_file_leaks() on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Dec 6, 2023
1 parent 69bc4b4 commit 46a6ec3
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions autotest/gdrivers/bag.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,10 @@ def check_no_file_leaks():
yield

diff = len(gdaltest.get_opened_files()) - num_files

if diff != 0 and (
gdaltest.is_travis_branch("ubuntu_2204")
or gdaltest.is_travis_branch("ubuntu_1804")
or gdaltest.is_travis_branch("ubuntu_1804_32bit")
or gdaltest.is_travis_branch("fedora")
or gdaltest.is_travis_branch("alpine")
or gdaltest.is_travis_branch("alpine_32bit")
):
print("Mysterious leak of file handle on some CI setups")
return

assert diff == 0, "Leak of file handles: %d leaked" % diff
if diff != 0 and "CI" in os.environ:
print("Leak of file handles: %d leaked. Flaky on CI, so ignored" % diff)
else:
assert diff == 0, "Leak of file handles: %d leaked" % diff


###############################################################################
Expand Down

0 comments on commit 46a6ec3

Please sign in to comment.