From a4c510f8e3730d918c5ba54b1b4aaf307d748e0f Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 18 Feb 2023 00:15:10 +0100 Subject: [PATCH] Add verify_dcp(). --- test/test.cc | 17 ++++++++++++----- test/test.h | 1 + 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/test/test.cc b/test/test.cc index c91701e55..354a79e26 100644 --- a/test/test.cc +++ b/test/test.cc @@ -937,12 +937,9 @@ void progress (float) {} void -make_and_verify_dcp (shared_ptr film, vector ignore) +verify_dcp(boost::filesystem::path dir, vector ignore) { - film->write_metadata (); - make_dcp (film, TranscodeJob::ChangedBehaviour::IGNORE); - BOOST_REQUIRE (!wait_for_jobs()); - auto notes = dcp::verify({film->dir(film->dcp_name())}, &stage, &progress, {}, TestPaths::xsd()); + auto notes = dcp::verify({dir}, &stage, &progress, {}, TestPaths::xsd()); bool ok = true; for (auto i: notes) { if (find(ignore.begin(), ignore.end(), i.code()) == ignore.end()) { @@ -954,6 +951,16 @@ make_and_verify_dcp (shared_ptr film, vector } +void +make_and_verify_dcp (shared_ptr film, vector ignore) +{ + film->write_metadata (); + make_dcp (film, TranscodeJob::ChangedBehaviour::IGNORE); + BOOST_REQUIRE (!wait_for_jobs()); + verify_dcp({film->dir(film->dcp_name())}, ignore); +} + + void check_int_close (int a, int b, int d) { diff --git a/test/test.h b/test/test.h index 8399abf9a..01ddb1987 100644 --- a/test/test.h +++ b/test/test.h @@ -75,6 +75,7 @@ boost::filesystem::path dcp_file (std::shared_ptr film, std::string void check_one_frame (boost::filesystem::path dcp, int64_t index, boost::filesystem::path ref); 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 = {}); extern void check_int_close (int a, int b, int d); extern void check_int_close (std::pair, std::pair, int d); -- 2.30.2