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 2c469ce
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions autotest/gdrivers/bag.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,24 +51,13 @@ def module_disable_exceptions():


@pytest.fixture(autouse=True, scope="module")
@pytest.mark.skipif("CI" in os.environ, reason="flaky on CI")
def check_no_file_leaks():
num_files = len(gdaltest.get_opened_files())

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


Expand Down

0 comments on commit 2c469ce

Please sign in to comment.