diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-07-11 23:17:06 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-07-14 17:54:42 +0200 |
| commit | 96662de49cdc00780800fcc914e6dd7b949d9340 (patch) | |
| tree | 4268100a193cbca2da585fdd733112833424ac03 /test/burnt_subtitle_test.cc | |
| parent | c2b7422b8f0ad9fdf1e6e174a90486fb9e6346f4 (diff) | |
Fix tests on Ubuntu 24.04.
Diffstat (limited to 'test/burnt_subtitle_test.cc')
| -rw-r--r-- | test/burnt_subtitle_test.cc | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/test/burnt_subtitle_test.cc b/test/burnt_subtitle_test.cc index 2be712262..185f69839 100644 --- a/test/burnt_subtitle_test.cc +++ b/test/burnt_subtitle_test.cc @@ -45,6 +45,7 @@ #include <dcp/openjpeg_image.h> #include <dcp/reel_picture_asset.h> #include <dcp/reel_mono_picture_asset.h> +#include <pango/pango-utils.h> #include <boost/test/unit_test.hpp> @@ -55,6 +56,15 @@ using std::string; using namespace dcpomatic; +/* Some of these tests produce slightly different outputs on different platforms / OS versions. + * I'm not sure of the cause of these differences, but as it happens the tests on Ubuntu 24.04 + * produce the same results as on macOS, while the Ubuntu 22.04 results are slightly different. + * Hence the hacks in this file to check for DCPOMATIC_OSX or the Ubuntu 24.04 version of Pango + * (22.04 uses Pango 1.52.1, 24.04 is 1.50.6, macOS is 1.51.0). Maybe it has nothing to do + * with Pango, of course... + */ + + /** Build a small DCP with no picture and a single subtitle overlaid onto it from a SubRip file */ BOOST_AUTO_TEST_CASE (burnt_subtitle_test_subrip) { @@ -70,7 +80,7 @@ BOOST_AUTO_TEST_CASE (burnt_subtitle_test_subrip) #if defined(DCPOMATIC_WINDOWS) check_dcp("test/data/windows/burnt_subtitle_test_subrip", film); -#elif defined(DCPOMATIC_OSX) +#elif defined(DCPOMATIC_OSX) || PANGO_VERSION_CHECK(1, 52, 1) check_dcp("test/data/mac/burnt_subtitle_test_subrip", film); #else check_dcp("test/data/burnt_subtitle_test_subrip", film); @@ -133,7 +143,7 @@ BOOST_AUTO_TEST_CASE (burnt_subtitle_test_onto_dcp) #if defined(DCPOMATIC_WINDOWS) check_dcp("test/data/windows/burnt_subtitle_test_onto_dcp2", film2); -#elif defined(DCPOMATIC_OSX) +#elif defined(DCPOMATIC_OSX) || PANGO_VERSION_CHECK(1, 52, 1) check_dcp("test/data/mac/burnt_subtitle_test_onto_dcp2", film2); #else check_dcp("test/data/burnt_subtitle_test_onto_dcp2", film2); @@ -162,7 +172,7 @@ BOOST_AUTO_TEST_CASE(burnt_subtitle_test_position) #if defined(DCPOMATIC_WINDOWS) check_dcp(String::compose("test/data/windows/%1", name), film); -#elif defined(DCPOMATIC_OSX) +#elif defined(DCPOMATIC_OSX) || PANGO_VERSION_CHECK(1, 52, 1) check_dcp(String::compose("test/data/mac/%1", name), film); #else check_dcp(String::compose("test/data/%1", name), film); |
