From: Carl Hetherington Date: Fri, 12 Jan 2024 14:29:12 +0000 (+0100) Subject: Inspect most DCPs made during tests with ClairMeta (#76). X-Git-Tag: v2.16.72~17 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=de1b4a967e6854782e88e83d48af74289977c8c3 Inspect most DCPs made during tests with ClairMeta (#76). --- diff --git a/run/tests b/run/tests index 7f8126fa3..12d59346d 100755 --- a/run/tests +++ b/run/tests @@ -3,7 +3,7 @@ # e.g. --run_tests=foo set -e -PRIVATE_GIT="b6277c54428e0abe2003c27868fe8f02119ef869" +PRIVATE_GIT="59b62615a48a1f3a70e9c028b92dfba75c1719ba" if [ "$1" == "--check" ]; then shift 1 @@ -23,6 +23,12 @@ if [ "$(uname)" == "Linux" ]; then if [ -f /src/backports/dcp_inspect ]; then export DCPOMATIC_DCP_INSPECT=/src/backports/dcp_inspect fi + set +e + python3 -m clairmeta.cli --help > /dev/null 2>&1 + if [ "$?" == "0" ]; then + export DCPOMATIC_CLAIRMETA=1 + fi + set -e fi if [ "$(uname)" == "Darwin" ]; then diff --git a/test/2536_regression_test.cc b/test/2536_regression_test.cc index 5d2bc3bbb..7233839ae 100644 --- a/test/2536_regression_test.cc +++ b/test/2536_regression_test.cc @@ -53,6 +53,7 @@ BOOST_AUTO_TEST_CASE(crash_rendering_vf_interop_subs_test) vf->set_reel_type(ReelType::BY_VIDEO_CONTENT); ov_dcp->set_reference_video(true); ov_dcp->set_reference_audio(true); + subtitles[0]->text[0]->set_language(dcp::LanguageTag("de")); make_and_verify_dcp( vf, diff --git a/test/closed_caption_test.cc b/test/closed_caption_test.cc index 80effc9a0..313e2a8d3 100644 --- a/test/closed_caption_test.cc +++ b/test/closed_caption_test.cc @@ -90,7 +90,12 @@ BOOST_AUTO_TEST_CASE (closed_caption_test2) dcp::VerificationNote::Code::INVALID_CLOSED_CAPTION_LINE_LENGTH, dcp::VerificationNote::Code::MISSING_CPL_METADATA, dcp::VerificationNote::Code::INVALID_SUBTITLE_FIRST_TEXT_TIME, - } + }, + true, + /* Clairmeta gives an error about having duplicate ClosedCaption entries, + * which seems wrong. + */ + false ); dcp::DCP check (film->dir(film->dcp_name())); diff --git a/test/data b/test/data index 314e09cba..a81d5737e 160000 --- a/test/data +++ b/test/data @@ -1 +1 @@ -Subproject commit 314e09cbac2e023a7acb61e1b32db76fe6dd775e +Subproject commit a81d5737e54105f95d3d0cbf602dd355b8814244 diff --git a/test/dcp_subtitle_test.cc b/test/dcp_subtitle_test.cc index 4928d92c1..837362e84 100644 --- a/test/dcp_subtitle_test.cc +++ b/test/dcp_subtitle_test.cc @@ -161,6 +161,7 @@ BOOST_AUTO_TEST_CASE (dcp_subtitle_test3) film->set_interop (true); auto content = make_shared("test/data/dcp_sub3.xml"); film->examine_and_add_content (content); + content->only_text()->set_language(dcp::LanguageTag("de")); BOOST_REQUIRE (!wait_for_jobs ()); make_and_verify_dcp (film, { dcp::VerificationNote::Code::INVALID_STANDARD }); @@ -196,6 +197,8 @@ BOOST_AUTO_TEST_CASE (dcp_subtitle_test4) content->only_text()->add_font(make_shared("font1")); content2->only_text()->add_font(make_shared("font2")); + content->only_text()->set_language(dcp::LanguageTag("de")); + content2->only_text()->set_language(dcp::LanguageTag("de")); make_and_verify_dcp (film, { dcp::VerificationNote::Code::INVALID_STANDARD }); @@ -226,6 +229,7 @@ BOOST_AUTO_TEST_CASE (dcp_subtitle_test5) auto content = make_shared("test/data/dcp_sub6.xml"); auto film = new_test_film2 ("dcp_subtitle_test5", {content}); film->set_interop (true); + content->only_text()->set_language(dcp::LanguageTag("de")); make_and_verify_dcp (film, { dcp::VerificationNote::Code::INVALID_STANDARD }); @@ -244,6 +248,7 @@ BOOST_AUTO_TEST_CASE (test_font_override) auto content = make_shared("test/data/dcp_sub4.xml"); auto film = new_test_film2("test_font_override", {content}); film->set_interop(true); + content->only_text()->set_language(dcp::LanguageTag("de")); BOOST_REQUIRE_EQUAL(content->text.size(), 1U); auto font = content->text.front()->get_font("0_theFontId"); diff --git a/test/empty_caption_test.cc b/test/empty_caption_test.cc index 3673cce5d..3138c4af2 100644 --- a/test/empty_caption_test.cc +++ b/test/empty_caption_test.cc @@ -35,7 +35,7 @@ BOOST_AUTO_TEST_CASE (check_for_no_empty_text_nodes_in_failure_case) auto film = new_test_film2("check_for_no_empty_text_nodes_in_failure_case", content, &cl); auto text = content[0]->text.front(); text->set_type (TextType::CLOSED_CAPTION); - text->set_dcp_track({"English", dcp::LanguageTag("en-GB")}); + text->set_dcp_track({"English", dcp::LanguageTag("en")}); make_and_verify_dcp (film, { dcp::VerificationNote::Code::MISSING_CPL_METADATA diff --git a/test/file_extension_test.cc b/test/file_extension_test.cc index 676dc10ca..87b55114a 100644 --- a/test/file_extension_test.cc +++ b/test/file_extension_test.cc @@ -19,8 +19,10 @@ */ +#include "lib/content.h" #include "lib/content_factory.h" #include "lib/film.h" +#include "lib/text_content.h" #include "test.h" #include @@ -36,6 +38,7 @@ BOOST_AUTO_TEST_CASE (interop_file_extension_test) auto sub = content_factory("test/data/15s.srt")[0]; auto film = new_test_film2("interop_file_extension_test", { video, audio, sub }); film->set_interop(true); + sub->only_text()->set_language(dcp::LanguageTag("de")); make_and_verify_dcp( film, { diff --git a/test/j2k_bandwidth_test.cc b/test/j2k_bandwidth_test.cc index 03163d8ea..f9e47c4b9 100644 --- a/test/j2k_bandwidth_test.cc +++ b/test/j2k_bandwidth_test.cc @@ -61,6 +61,7 @@ check (int target_bits_per_second) dcp::VerificationNote::Code::INVALID_PICTURE_FRAME_SIZE_IN_BYTES, dcp::VerificationNote::Code::INVALID_JPEG2000_TILE_PART_SIZE, }, + target_bits_per_second <= 250000000, target_bits_per_second <= 250000000 ); diff --git a/test/map_cli_test.cc b/test/map_cli_test.cc index ca75ed520..ed2a7e5ec 100644 --- a/test/map_cli_test.cc +++ b/test/map_cli_test.cc @@ -223,6 +223,7 @@ BOOST_AUTO_TEST_CASE(map_simple_interop_dcp_with_subs) auto subs = content_factory("test/data/15s.srt").front(); auto film = new_test_film2(name + "_in", { picture, subs }); film->set_interop(true); + subs->only_text()->set_language(dcp::LanguageTag("de")); make_and_verify_dcp(film, {dcp::VerificationNote::Code::INVALID_STANDARD}); vector const args = { @@ -410,6 +411,7 @@ test_two_cpls_each_with_subs(string name, bool interop) auto subs = content_factory("test/data/15s.srt").front(); films[i] = new_test_film2(String::compose("%1_%2_in", name, i), { picture, subs }); films[i]->set_interop(interop); + subs->only_text()->set_language(dcp::LanguageTag("de")); make_and_verify_dcp(films[i], acceptable_errors); } @@ -582,6 +584,7 @@ BOOST_AUTO_TEST_CASE(map_handles_interop_png_subs) film->set_interop(true); arrietty->set_trim_end(dcpomatic::ContentTime::from_seconds(110)); arrietty->text[0]->set_use(true); + arrietty->text[0]->set_language(dcp::LanguageTag("de")); make_and_verify_dcp( film, { diff --git a/test/recover_test.cc b/test/recover_test.cc index 728d98941..63c611831 100644 --- a/test/recover_test.cc +++ b/test/recover_test.cc @@ -83,7 +83,16 @@ BOOST_AUTO_TEST_CASE (recover_test_2d) boost::filesystem::resize_file (video, 2 * 1024 * 1024); - make_and_verify_dcp (film, { dcp::VerificationNote::Code::MISSING_FFEC_IN_FEATURE, dcp::VerificationNote::Code::MISSING_FFMC_IN_FEATURE }); + make_and_verify_dcp( + film, + { + dcp::VerificationNote::Code::MISSING_FFEC_IN_FEATURE, + dcp::VerificationNote::Code::MISSING_FFMC_IN_FEATURE + }, + true, + /* We end up with two CPLs in this directory, which Clairmeta gives an error for */ + false + ); auto A = make_shared("build/test/recover_test_2d/original.mxf"); auto B = make_shared(video); @@ -118,7 +127,15 @@ BOOST_AUTO_TEST_CASE (recover_test_3d, * boost::unit_test::depends_on("recover_t boost::filesystem::resize_file (video, 2 * 1024 * 1024); - make_and_verify_dcp (film, { dcp::VerificationNote::Code::MISSING_FFEC_IN_FEATURE, dcp::VerificationNote::Code::MISSING_FFMC_IN_FEATURE }); + make_and_verify_dcp( + film, + { + dcp::VerificationNote::Code::MISSING_FFEC_IN_FEATURE, dcp::VerificationNote::Code::MISSING_FFMC_IN_FEATURE + }, + true, + /* We end up with two CPLs in this directory, which Clairmeta gives an error for */ + false + ); auto A = make_shared("build/test/recover_test_3d/original.mxf"); auto B = make_shared(video); @@ -154,7 +171,15 @@ BOOST_AUTO_TEST_CASE (recover_test_2d_encrypted, * boost::unit_test::depends_on( boost::filesystem::resize_file (video, 2 * 1024 * 1024); - make_and_verify_dcp (film, { dcp::VerificationNote::Code::MISSING_FFEC_IN_FEATURE, dcp::VerificationNote::Code::MISSING_FFMC_IN_FEATURE }); + make_and_verify_dcp( + film, + { + dcp::VerificationNote::Code::MISSING_FFEC_IN_FEATURE, dcp::VerificationNote::Code::MISSING_FFMC_IN_FEATURE + }, + true, + /* We end up with two CPLs in this directory, which Clairmeta gives an error for */ + false + ); auto A = make_shared("build/test/recover_test_2d_encrypted/original.mxf"); A->set_key (film->key ()); diff --git a/test/reel_writer_test.cc b/test/reel_writer_test.cc index e4e7c6c42..ec2469898 100644 --- a/test/reel_writer_test.cc +++ b/test/reel_writer_test.cc @@ -126,7 +126,8 @@ BOOST_AUTO_TEST_CASE (reel_reuse_video_test) /* Change the audio and re-make */ audio->audio->set_gain (-3); - make_and_verify_dcp (film); + /* >1 CPLs in the DCP raises an error in ClairMeta */ + make_and_verify_dcp(film, {}, true, false); /* Video ID should be the same, sound different */ dcp::DCP dcp2 (film->dir(film->dcp_name())); @@ -140,7 +141,8 @@ BOOST_AUTO_TEST_CASE (reel_reuse_video_test) /* Crop video and re-make */ video->video->set_left_crop (5); - make_and_verify_dcp (film); + /* >1 CPLs in the DCP raises an error in ClairMeta */ + make_and_verify_dcp(film, {}, true, false); /* Video and sound IDs should be different */ dcp::DCP dcp3 (film->dir(film->dcp_name())); diff --git a/test/reels_test.cc b/test/reels_test.cc index fe209a4fe..d4a783f91 100644 --- a/test/reels_test.cc +++ b/test/reels_test.cc @@ -306,14 +306,16 @@ BOOST_AUTO_TEST_CASE (reels_test6) film->set_reel_type (ReelType::BY_LENGTH); /* This is just over 2.5s at 100Mbit/s; should correspond to 60 frames */ film->set_reel_length (31253154); - /* dcp_inspect gives error about reel <1s in length */ + /* dcp_inspect and clairmeta both give errors about reel <1s in length */ make_and_verify_dcp ( film, { dcp::VerificationNote::Code::INVALID_INTRINSIC_DURATION, dcp::VerificationNote::Code::INVALID_DURATION, }, - false); + false, + false + ); } diff --git a/test/remake_video_test.cc b/test/remake_video_test.cc index b99f4380e..a07659844 100644 --- a/test/remake_video_test.cc +++ b/test/remake_video_test.cc @@ -49,7 +49,8 @@ BOOST_AUTO_TEST_CASE(remake_video_after_yub_rgb_matrix_changed) content->video->set_colour_conversion(*conversion); auto calculate_picture_hashes = [](shared_ptr film) { - make_and_verify_dcp(film); + /* >1 CPLs in the DCP raises an error in ClairMeta */ + make_and_verify_dcp(film, {}, true, false); dcp::DCP dcp(film->dir(film->dcp_name())); dcp.read(); BOOST_REQUIRE(!dcp.cpls().empty()); diff --git a/test/silence_padding_test.cc b/test/silence_padding_test.cc index a4a5dacc6..86db117c6 100644 --- a/test/silence_padding_test.cc +++ b/test/silence_padding_test.cc @@ -66,7 +66,9 @@ test_silence_padding(int channels, dcp::Standard standard) if (standard == dcp::Standard::INTEROP) { codes.push_back(dcp::VerificationNote::Code::INVALID_STANDARD); } - make_and_verify_dcp(film, codes, channels == 2 || channels == 6 || channels >= 8); + auto const dcp_inspect = channels == 2 || channels == 6 || channels >= 8; + auto const clairmeta = (channels % 2) == 0; + make_and_verify_dcp(film, codes, dcp_inspect, clairmeta); boost::filesystem::path path = "build/test"; path /= film_name; diff --git a/test/srt_subtitle_test.cc b/test/srt_subtitle_test.cc index 0ee9cb197..bac0bedec 100644 --- a/test/srt_subtitle_test.cc +++ b/test/srt_subtitle_test.cc @@ -100,7 +100,11 @@ BOOST_AUTO_TEST_CASE (srt_subtitle_test2) dcp::VerificationNote::Code::MISSING_SUBTITLE_LANGUAGE, dcp::VerificationNote::Code::INVALID_SUBTITLE_FIRST_TEXT_TIME, dcp::VerificationNote::Code::MISSING_CPL_METADATA - }); + }, + true, + /* ClairMeta tries to inspect the font file and fails because it isn't one */ + false + ); /* Should be blank video with a subtitle MXF; sound is irrelevant */ check_dcp("test/data/srt_subtitle_test2", film->dir(film->dcp_name()), true); @@ -129,6 +133,7 @@ BOOST_AUTO_TEST_CASE (srt_subtitle_test3) content->only_text()->set_use (true); content->only_text()->set_burn (false); + content->only_text()->set_language(dcp::LanguageTag("de")); make_and_verify_dcp (film, {dcp::VerificationNote::Code::INVALID_STANDARD}); @@ -178,6 +183,7 @@ BOOST_AUTO_TEST_CASE (srt_subtitle_test5) auto content = make_shared("test/data/subrip2.srt"); content->only_text()->set_use (true); content->only_text()->set_burn (false); + content->only_text()->set_language(dcp::LanguageTag("de")); film->examine_and_add_content (content); BOOST_REQUIRE (!wait_for_jobs()); content->set_position (film, DCPTime()); diff --git a/test/ssa_subtitle_test.cc b/test/ssa_subtitle_test.cc index 2d8102a07..2565fc035 100644 --- a/test/ssa_subtitle_test.cc +++ b/test/ssa_subtitle_test.cc @@ -59,6 +59,7 @@ BOOST_AUTO_TEST_CASE (ssa_subtitle_test1) content->only_text()->set_use (true); content->only_text()->set_burn (false); + content->only_text()->set_language(dcp::LanguageTag("de")); make_and_verify_dcp (film, { dcp::VerificationNote::Code::INVALID_STANDARD }); diff --git a/test/subtitle_font_id_change_test.cc b/test/subtitle_font_id_change_test.cc index 378803828..385dd1aae 100644 --- a/test/subtitle_font_id_change_test.cc +++ b/test/subtitle_font_id_change_test.cc @@ -50,6 +50,7 @@ BOOST_AUTO_TEST_CASE(subtitle_font_id_change_test1) BOOST_REQUIRE_EQUAL(content[0]->text.size(), 1U); content[0]->set_paths({"test/data/short.srt"}); + content[0]->only_text()->set_language(dcp::LanguageTag("de")); CheckContentJob check(film); check.run(); @@ -108,6 +109,7 @@ BOOST_AUTO_TEST_CASE(subtitle_font_id_change_test3) BOOST_REQUIRE_EQUAL(content[0]->text.size(), 1U); content[0]->set_paths({"test/data/fonts.ass"}); + content[0]->only_text()->set_language(dcp::LanguageTag("de")); CheckContentJob check(film); check.run(); diff --git a/test/subtitle_font_id_test.cc b/test/subtitle_font_id_test.cc index 56207bfcb..9575868a1 100644 --- a/test/subtitle_font_id_test.cc +++ b/test/subtitle_font_id_test.cc @@ -106,7 +106,7 @@ BOOST_AUTO_TEST_CASE(make_dcp_with_subs_from_mkv) auto subs = content_factory(TestPaths::private_data() / "clapperboard_with_subs.mkv"); auto film = new_test_film2("make_dcp_with_subs_from_mkv", subs); subs[0]->text.front()->set_use(true); - subs[0]->text.front()->set_language(dcp::LanguageTag("en-US")); + subs[0]->text.front()->set_language(dcp::LanguageTag("en")); make_and_verify_dcp(film, { dcp::VerificationNote::Code::INVALID_PICTURE_FRAME_RATE_FOR_2K }); } @@ -116,6 +116,7 @@ BOOST_AUTO_TEST_CASE(make_dcp_with_subs_without_font_tag) auto subs = content_factory("test/data/no_font.xml"); auto film = new_test_film2("make_dcp_with_subs_without_font_tag", { subs }); subs[0]->text.front()->set_use(true); + subs[0]->text.front()->set_language(dcp::LanguageTag("de")); make_and_verify_dcp( film, { @@ -139,6 +140,7 @@ BOOST_AUTO_TEST_CASE(make_dcp_with_subs_in_dcp_without_font_tag) auto source_subs = content_factory("test/data/short.srt"); auto source = new_test_film2("make_dcp_with_subs_in_dcp_without_font_tag_source", { source_subs }); source->set_interop(true); + source_subs[0]->only_text()->set_language(dcp::LanguageTag("de")); make_and_verify_dcp( source, { diff --git a/test/subtitle_language_test.cc b/test/subtitle_language_test.cc index cd4f6f4ca..6ae0647e9 100644 --- a/test/subtitle_language_test.cc +++ b/test/subtitle_language_test.cc @@ -44,7 +44,7 @@ BOOST_AUTO_TEST_CASE (subtitle_language_interop_test) auto fr = content_factory("test/data/frames.srt"); auto film = new_test_film2 (name, fr); - fr[0]->only_text()->set_language (dcp::LanguageTag("fr-FR")); + fr[0]->only_text()->set_language(dcp::LanguageTag("fr")); film->set_interop (true); film->set_audio_channels(6); @@ -54,9 +54,13 @@ BOOST_AUTO_TEST_CASE (subtitle_language_interop_test) dcp::VerificationNote::Code::INVALID_STANDARD, dcp::VerificationNote::Code::INVALID_SUBTITLE_SPACING, dcp::VerificationNote::Code::INVALID_SUBTITLE_DURATION - }); + }, + false, + /* clairmeta raises errors about subtitle spacing/duration */ + false + ); - check_dcp (String::compose("test/data/%1", name), String::compose("build/test/%1/%2", name, film->dcp_name())); + check_dcp(String::compose("test/data/%1", name), String::compose("build/test/%1/%2", name, film->dcp_name())); } @@ -66,7 +70,7 @@ BOOST_AUTO_TEST_CASE (subtitle_language_smpte_test) auto fr = content_factory("test/data/frames.srt"); auto film = new_test_film2 (name, fr); - fr[0]->only_text()->set_language (dcp::LanguageTag("fr-FR")); + fr[0]->only_text()->set_language(dcp::LanguageTag("fr")); film->set_interop (false); make_and_verify_dcp ( @@ -95,7 +99,7 @@ BOOST_AUTO_TEST_CASE(subtitle_language_in_cpl_test) auto film = new_test_film2(boost::unit_test::framework::current_test_unit().full_name(), { subs, video1, video2 }); video2->set_position(film, dcpomatic::DCPTime::from_seconds(5)); film->set_reel_type(ReelType::BY_VIDEO_CONTENT); - subs->only_text()->set_language(dcp::LanguageTag("fr-FR")); + subs->only_text()->set_language(dcp::LanguageTag("fr")); make_and_verify_dcp( film, diff --git a/test/subtitle_position_test.cc b/test/subtitle_position_test.cc index 94a06b7f8..d9dd0c61a 100644 --- a/test/subtitle_position_test.cc +++ b/test/subtitle_position_test.cc @@ -42,6 +42,7 @@ BOOST_AUTO_TEST_CASE(srt_correctly_placed_in_interop) string const name = "srt_in_interop_position_test"; auto fr = content_factory("test/data/short.srt"); auto film = new_test_film2(name, fr); + fr[0]->only_text()->set_language(dcp::LanguageTag("de")); film->set_interop(true); @@ -70,7 +71,7 @@ BOOST_AUTO_TEST_CASE(srt_correctly_placed_in_smpte) auto fr = content_factory("test/data/short.srt"); auto film = new_test_film2(name, fr); - fr[0]->text[0]->set_language(dcp::LanguageTag("en-GB")); + fr[0]->text[0]->set_language(dcp::LanguageTag("en")); film->set_interop(false); make_and_verify_dcp ( diff --git a/test/subtitle_reel_number_test.cc b/test/subtitle_reel_number_test.cc index 743d809dd..a48057577 100644 --- a/test/subtitle_reel_number_test.cc +++ b/test/subtitle_reel_number_test.cc @@ -51,6 +51,7 @@ BOOST_AUTO_TEST_CASE (subtitle_reel_number_test) BOOST_REQUIRE (!wait_for_jobs ()); content->only_text()->set_use (true); content->only_text()->set_burn (false); + content->only_text()->set_language(dcp::LanguageTag("de")); film->set_reel_type (ReelType::BY_LENGTH); film->set_interop (true); film->set_reel_length (1024 * 1024 * 512); diff --git a/test/subtitle_reel_test.cc b/test/subtitle_reel_test.cc index d7eb90d25..147f5c523 100644 --- a/test/subtitle_reel_test.cc +++ b/test/subtitle_reel_test.cc @@ -60,9 +60,11 @@ BOOST_AUTO_TEST_CASE (subtitle_reel_test) red_a->set_position (film, dcpomatic::DCPTime()); red_a->video->set_length (240); sub_a->set_position (film, dcpomatic::DCPTime()); + sub_a->only_text()->set_language(dcp::LanguageTag("de")); red_b->set_position (film, dcpomatic::DCPTime::from_seconds(10)); red_b->video->set_length (240); sub_b->set_position (film, dcpomatic::DCPTime::from_seconds(10)); + sub_b->only_text()->set_language(dcp::LanguageTag("de")); film->set_reel_type (ReelType::BY_VIDEO_CONTENT); @@ -169,7 +171,11 @@ BOOST_AUTO_TEST_CASE (closed_captions_in_all_reels_test) { dcp::VerificationNote::Code::INVALID_SUBTITLE_FIRST_TEXT_TIME, dcp::VerificationNote::Code::INVALID_SUBTITLE_SPACING - }); + }, + true, + /* ClairMeta gives an error with multiple ClosedCaption assets */ + false + ); dcp::DCP dcp ("build/test/closed_captions_in_all_reels_test/" + film->dcp_name()); dcp.read (); @@ -210,6 +216,7 @@ BOOST_AUTO_TEST_CASE (subtitles_split_at_reel_boundaries) auto subtitle = content_factory("test/data/45s.srt")[0]; film->examine_and_add_content (subtitle); BOOST_REQUIRE (!wait_for_jobs()); + subtitle->only_text()->set_language(dcp::LanguageTag("de")); make_and_verify_dcp (film, { dcp::VerificationNote::Code::INVALID_STANDARD }); diff --git a/test/subtitle_timing_test.cc b/test/subtitle_timing_test.cc index e5a4133ad..79cc68849 100644 --- a/test/subtitle_timing_test.cc +++ b/test/subtitle_timing_test.cc @@ -44,7 +44,7 @@ BOOST_AUTO_TEST_CASE (test_subtitle_timing_with_frame_rate_change) auto picture = content_factory("test/data/flat_red.png")[0]; auto sub = content_factory("test/data/hour.srt")[0]; - sub->text.front()->set_language(dcp::LanguageTag("en-GB")); + sub->text.front()->set_language(dcp::LanguageTag("en")); auto film = new_test_film2(name, { picture, sub }, &cl); picture->set_video_frame_rate(film, content_frame_rate); diff --git a/test/test.cc b/test/test.cc index 66e638dd5..fc5d9dc83 100644 --- a/test/test.cc +++ b/test/test.cc @@ -964,9 +964,9 @@ verify_dcp(boost::filesystem::path dir, vector igno void #ifdef DCPOMATIC_LINUX -make_and_verify_dcp(shared_ptr film, vector ignore, bool dcp_inspect) +make_and_verify_dcp(shared_ptr film, vector ignore, bool dcp_inspect, bool clairmeta) #else -make_and_verify_dcp(shared_ptr film, vector ignore, bool) +make_and_verify_dcp(shared_ptr film, vector ignore, bool, bool) #endif { film->write_metadata (); @@ -1002,6 +1002,12 @@ make_and_verify_dcp(shared_ptr film, vector i auto result = system(cmd.c_str()); BOOST_CHECK_EQUAL(WEXITSTATUS(result), 0); } + + if (clairmeta && getenv("DCPOMATIC_CLAIRMETA")) { + auto cmd = String::compose("python3 -m clairmeta.cli check -type dcp %1 > %2 2>&1", film->dir(film->dcp_name()), film->file("clairmeta.log")); + auto result = system(cmd.c_str()); + BOOST_CHECK_EQUAL(WEXITSTATUS(result), 0); + } #endif } diff --git a/test/test.h b/test/test.h index 1bcb43ea2..6687affea 100644 --- a/test/test.h +++ b/test/test.h @@ -76,7 +76,7 @@ void check_one_frame (boost::filesystem::path dcp, int64_t index, boost::filesys extern boost::filesystem::path subtitle_file (std::shared_ptr film); extern void make_random_file (boost::filesystem::path path, size_t size); extern void verify_dcp(boost::filesystem::path dir, std::vector ignore); -extern void make_and_verify_dcp(std::shared_ptr film, std::vector ignore = {}, bool dcp_inspect = true); +extern void make_and_verify_dcp(std::shared_ptr film, std::vector ignore = {}, bool dcp_inspect = true, bool clairmeta = true); extern void check_int_close (int a, int b, int d); extern void check_int_close (std::pair, std::pair, int d); extern boost::filesystem::path find_file (boost::filesystem::path dir, std::string filename_part); diff --git a/test/threed_test.cc b/test/threed_test.cc index 698fcba0b..78d74add4 100644 --- a/test/threed_test.cc +++ b/test/threed_test.cc @@ -135,7 +135,13 @@ BOOST_AUTO_TEST_CASE (threed_test4) R->set_trim_end (dcpomatic::ContentTime::from_seconds(22)); film->set_three_d (true); - make_and_verify_dcp (film, {dcp::VerificationNote::Code::INVALID_PICTURE_ASSET_RESOLUTION_FOR_3D}); + make_and_verify_dcp( + film, + {dcp::VerificationNote::Code::INVALID_PICTURE_ASSET_RESOLUTION_FOR_3D}, + true, + /* XXX: Clairmeta error about invalid edit rate 24 for 4K 3D */ + false + ); }