From: Carl Hetherington Date: Sat, 29 Jul 2023 00:26:33 +0000 (+0200) Subject: Don't check sound assets in some tests. X-Git-Tag: v2.16.61~26 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=430825272e1a6cf266a184afe5acc0fa9811fff8 Don't check sound assets in some tests. When fiddling with MXF channel counts it makes a lot of tests fail that probably don't need to. --- diff --git a/cscript b/cscript index 0f5daa308..d4fe2b106 100644 --- a/cscript +++ b/cscript @@ -506,7 +506,7 @@ def dependencies(target, options): # Use distro-provided FFmpeg on Arch deps = [] - deps.append(('libdcp', '9f7980e15f14c0d5f6b59e53b9bf939e62df20c9')) + deps.append(('libdcp', '03609704034192ae157f6328024989eec58ac1c3')) deps.append(('libsub', 'v1.6.44')) deps.append(('leqm-nrt', '4560105773c66ac9216b62313a24093bb0a027ae')) deps.append(('rtaudio', 'f619b76')) diff --git a/test/4k_test.cc b/test/4k_test.cc index 86cb0275b..9e80a6e27 100644 --- a/test/4k_test.cc +++ b/test/4k_test.cc @@ -64,5 +64,9 @@ BOOST_AUTO_TEST_CASE (fourk_test) boost::filesystem::path p (test_film_dir("4k_test")); p /= film->dcp_name (); - check_dcp ("test/data/4k_test", p.string()); + /* This test is concerned with the image and its metadata, so we'll + * ignore any differences in sound between the DCP and the reference to + * avoid test failures for unrelated reasons. + */ + check_dcp("test/data/4k_test", p.string(), true); } diff --git a/test/dcp_subtitle_test.cc b/test/dcp_subtitle_test.cc index 6798cf678..9b7b77279 100644 --- a/test/dcp_subtitle_test.cc +++ b/test/dcp_subtitle_test.cc @@ -96,7 +96,11 @@ BOOST_AUTO_TEST_CASE (dcp_subtitle_test) dcp::VerificationNote::Code::MISSING_CPL_METADATA }); - check_dcp ("test/data/dcp_subtitle_test", film->dir(film->dcp_name())); + /* This test is concerned with the subtitles, so we'll ignore any + * differences in sound between the DCP and the reference to avoid test + * failures for unrelated reasons. + */ + check_dcp("test/data/dcp_subtitle_test", film->dir(film->dcp_name()), true); } diff --git a/test/image_content_fade_test.cc b/test/image_content_fade_test.cc index 39cdfe602..d7f03ad51 100644 --- a/test/image_content_fade_test.cc +++ b/test/image_content_fade_test.cc @@ -41,5 +41,9 @@ BOOST_AUTO_TEST_CASE (image_content_fade_test) content->video->set_fade_in (1); make_and_verify_dcp (film); - check_dcp ("test/data/image_content_fade_test", film->dir(film->dcp_name())); + /* This test is concerned with the image, so we'll ignore any + * differences in sound between the DCP and the reference to avoid test + * failures for unrelated reasons. + */ + check_dcp("test/data/image_content_fade_test", film->dir(film->dcp_name()), true); } diff --git a/test/player_test.cc b/test/player_test.cc index a72e5fc17..a6e7cd2de 100644 --- a/test/player_test.cc +++ b/test/player_test.cc @@ -142,7 +142,11 @@ BOOST_AUTO_TEST_CASE (player_black_fill_test) check /= "black_fill_test"; check /= film->dcp_name(); - check_dcp (ref.string(), check.string()); + /* This test is concerned with the image, so we'll ignore any + * differences in sound between the DCP and the reference to avoid test + * failures for unrelated reasons. + */ + check_dcp(ref.string(), check.string(), true); } diff --git a/test/repeat_frame_test.cc b/test/repeat_frame_test.cc index afdaf48a6..0d0f38616 100644 --- a/test/repeat_frame_test.cc +++ b/test/repeat_frame_test.cc @@ -50,6 +50,8 @@ BOOST_AUTO_TEST_CASE (repeat_frame_test) film->set_video_frame_rate (48); make_and_verify_dcp (film); - /* Should be 32 frames of red followed by 16 frames of black to fill the DCP up to 1 second */ - check_dcp ("test/data/repeat_frame_test", film->dir (film->dcp_name ())); + /* Should be 32 frames of red followed by 16 frames of black to fill the DCP up to 1 second; + * no need to check sound. + */ + check_dcp("test/data/repeat_frame_test", film->dir(film->dcp_name()), true); } diff --git a/test/scaling_test.cc b/test/scaling_test.cc index 11b8ae1b7..2d453600e 100644 --- a/test/scaling_test.cc +++ b/test/scaling_test.cc @@ -63,7 +63,11 @@ static void scaling_test_for (shared_ptr film, shared_ptr content check /= "scaling_test"; check /= film->dcp_name(); - check_dcp (ref.string(), check.string()); + /* This test is concerned with the image, so we'll ignore any + * differences in sound between the DCP and the reference to avoid test + * failures for unrelated reasons. + */ + check_dcp(ref.string(), check.string(), true); } diff --git a/test/skip_frame_test.cc b/test/skip_frame_test.cc index 4c4098c2a..8df2fa1d5 100644 --- a/test/skip_frame_test.cc +++ b/test/skip_frame_test.cc @@ -58,7 +58,7 @@ BOOST_AUTO_TEST_CASE (skip_frame_test) make_and_verify_dcp (film); /* Should be white numbers on a black background counting up from 2 in steps of 2 - up to 300. - */ - check_dcp ("test/data/skip_frame_test", film->dir (film->dcp_name ())); + * up to 300. The sound is irrelevant here. + */ + check_dcp("test/data/skip_frame_test", film->dir(film->dcp_name()), true); } diff --git a/test/srt_subtitle_test.cc b/test/srt_subtitle_test.cc index 63d508b76..3863ebf9f 100644 --- a/test/srt_subtitle_test.cc +++ b/test/srt_subtitle_test.cc @@ -101,8 +101,8 @@ BOOST_AUTO_TEST_CASE (srt_subtitle_test2) dcp::VerificationNote::Code::MISSING_CPL_METADATA }); - /* Should be blank video with a subtitle MXF */ - check_dcp ("test/data/srt_subtitle_test2", film->dir (film->dcp_name ())); + /* Should be blank video with a subtitle MXF; sound is irrelevant */ + check_dcp("test/data/srt_subtitle_test2", film->dir(film->dcp_name()), true); } @@ -158,8 +158,8 @@ BOOST_AUTO_TEST_CASE (srt_subtitle_test4) dcp::VerificationNote::Code::MISSING_CPL_METADATA }); - /* Should be blank video with MXF subtitles */ - check_dcp ("test/data/xml_subtitle_test", film->dir (film->dcp_name ())); + /* Should be blank video with MXF subtitles; sound is irrelevant */ + check_dcp("test/data/xml_subtitle_test", film->dir(film->dcp_name()), true); } @@ -203,7 +203,11 @@ BOOST_AUTO_TEST_CASE (srt_subtitle_test6) dcp::VerificationNote::Code::INVALID_SUBTITLE_SPACING, }); - check_dcp ("test/data/srt_subtitle_test6", film->dir(film->dcp_name())); + /* This test is concerned with the subtitles, so we'll ignore any + * differences in sound between the DCP and the reference to avoid test + * failures for unrelated reasons. + */ + check_dcp("test/data/srt_subtitle_test6", film->dir(film->dcp_name()), true); } diff --git a/test/subtitle_language_test.cc b/test/subtitle_language_test.cc index 5b7a261fd..ad9d6bde2 100644 --- a/test/subtitle_language_test.cc +++ b/test/subtitle_language_test.cc @@ -78,7 +78,11 @@ BOOST_AUTO_TEST_CASE (subtitle_language_smpte_test) dcp::VerificationNote::Code::MISSING_CPL_METADATA }); - check_dcp (String::compose("test/data/%1", name), String::compose("build/test/%1/%2", name, film->dcp_name())); + /* This test is concerned with the subtitles, so we'll ignore any + * differences in sound between the DCP and the reference to avoid test + * failures for unrelated reasons. + */ + check_dcp(String::compose("test/data/%1", name), String::compose("build/test/%1/%2", name, film->dcp_name()), true); } diff --git a/test/test.cc b/test/test.cc index bd23f7522..dae026100 100644 --- a/test/test.cc +++ b/test/test.cc @@ -544,7 +544,7 @@ check_dcp (boost::filesystem::path ref, shared_ptr film) void -check_dcp (boost::filesystem::path ref, boost::filesystem::path check) +check_dcp(boost::filesystem::path ref, boost::filesystem::path check, bool sound_can_differ) { dcp::DCP ref_dcp (ref); ref_dcp.read (); @@ -561,6 +561,7 @@ check_dcp (boost::filesystem::path ref, boost::filesystem::path check) options.asset_hashes_can_differ = true; options.issue_dates_can_differ = true; options.max_subtitle_vertical_position_error = 0.001; + options.sound_assets_can_differ = sound_can_differ; BOOST_CHECK (ref_dcp.equals (check_dcp, options, boost::bind (note, _1, _2))); } diff --git a/test/test.h b/test/test.h index 01ddb1987..c586b1ac0 100644 --- a/test/test.h +++ b/test/test.h @@ -59,7 +59,7 @@ private: extern bool wait_for_jobs (); extern std::shared_ptr new_test_film (std::string); extern std::shared_ptr new_test_film2 (std::string, std::vector> content = {}, Cleanup* cleanup = nullptr); -extern void check_dcp (boost::filesystem::path, boost::filesystem::path); +extern void check_dcp(boost::filesystem::path, boost::filesystem::path, bool sound_can_differ = false); extern void check_dcp (boost::filesystem::path, std::shared_ptr); extern void check_file (boost::filesystem::path ref, boost::filesystem::path check); extern void check_text_file (boost::filesystem::path ref, boost::filesystem::path check);