X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=test%2Ftest.cc;h=354a79e26cb60a8dc9df1ee4ba4043feed9cb487;hb=a4c510f8e3730d918c5ba54b1b4aaf307d748e0f;hp=90b40ed25b1b925af82d857beccb81022d3e00e3;hpb=e21a8bc77f80374a78085c492e4dd14315457e5f;p=dcpomatic.git diff --git a/test/test.cc b/test/test.cc index 90b40ed25..354a79e26 100644 --- a/test/test.cc +++ b/test/test.cc @@ -94,7 +94,13 @@ TestPaths::TestPaths::private_data () return boost::filesystem::path(env); } - return boost::filesystem::canonical(boost::filesystem::path ("..") / boost::filesystem::path ("dcpomatic-test-private")); + auto relative = boost::filesystem::path ("..") / boost::filesystem::path ("dcpomatic-test-private"); + if (!boost::filesystem::exists(relative)) { + std::cerr << "No private test data found! Tests may fail.\n"; + return relative; + } + + return boost::filesystem::canonical(relative); } @@ -931,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()) { @@ -948,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) {