From 2c469cec1d4f7741dd0960274be0247bb5147007 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Wed, 6 Dec 2023 11:11:33 +0100 Subject: [PATCH] autotest/gdrivers/bag.py: skip check_no_file_leaks() on CI --- autotest/gdrivers/bag.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/autotest/gdrivers/bag.py b/autotest/gdrivers/bag.py index 4f93ae8434d1..3eb85a067db1 100755 --- a/autotest/gdrivers/bag.py +++ b/autotest/gdrivers/bag.py @@ -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