Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: skip tests that crash with OpenEXR 3.3.2 #11352

Merged
merged 1 commit into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions autotest/gdrivers/exr.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@
pytestmark = pytest.mark.require_driver("EXR")


def exr_is_gte(x, y):
drv = gdal.GetDriverByName("EXR")
if drv is None:
return False
return [
int(i) for i in drv.GetMetadataItem("OPENEXR_VERSION", "EXR").split(".")[0:2]
] >= [x, y]


def test_exr_byte_createcopy():
tst = gdaltest.GDALTest("EXR", "byte.tif", 1, 4672)
tst.testCreateCopy(vsimem=1)
Expand Down Expand Up @@ -114,6 +123,7 @@ def test_exr_compression_create():
gdal.Unlink(tmpfilename)


@pytest.mark.skipif(exr_is_gte(3, 3), reason="test crashes with OpenEXR 3.3.2")
def test_exr_compression_dwa_compression_level():
src_ds = gdal.Open("data/small_world.tif")
tmpfilename = "/vsimem/temp.exr"
Expand Down Expand Up @@ -157,6 +167,7 @@ def test_exr_tiling_custom_tile_size():
gdal.Unlink(tmpfilename)


@pytest.mark.skipif(exr_is_gte(3, 3), reason="test crashes with OpenEXR 3.3.2")
def test_exr_rgb_byte_tiled():
src_ds = gdal.Open("data/small_world.tif")
tmpfilename = "/vsimem/temp.exr"
Expand All @@ -170,6 +181,7 @@ def test_exr_rgb_byte_tiled():
gdal.Unlink(tmpfilename)


@pytest.mark.skipif(exr_is_gte(3, 3), reason="test crashes with OpenEXR 3.3.2")
def test_exr_rgb_byte_strip_no_auto_rescale():
src_ds = gdal.Open("data/small_world.tif")
tmpfilename = "/vsimem/temp.exr"
Expand All @@ -183,6 +195,7 @@ def test_exr_rgb_byte_strip_no_auto_rescale():
gdal.Unlink(tmpfilename)


@pytest.mark.skipif(exr_is_gte(3, 3), reason="test crashes with OpenEXR 3.3.2")
def test_exr_overviews():
src_ds = gdal.Open("data/small_world.tif")
tmpfilename = "/vsimem/temp.exr"
Expand Down
2 changes: 2 additions & 0 deletions frmts/exr/exrdataset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2039,5 +2039,7 @@ void GDALRegister_EXR()
poDriver->pfnCreateCopy = GDALEXRDataset::CreateCopy;
poDriver->pfnCreate = GDALEXRDataset::Create;

poDriver->SetMetadataItem("OPENEXR_VERSION", OPENEXR_VERSION_STRING, "EXR");

GetGDALDriverManager()->RegisterDriver(poDriver);
}
Loading