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);
}
auto decryption = make_shared<dcp::CertificateChain>(dcp::file_to_string("test/data/decryption_chain"));
decryption->set_key(dcp::file_to_string("test/data/decryption_key"));
Config::instance()->set_decryption_chain (decryption);
+ Config::instance()->set_dcp_asset_filename_format(dcp::NameFormat("%t"));
}
void
-make_and_verify_dcp (shared_ptr<Film> film, vector<dcp::VerificationNote::Code> ignore)
+verify_dcp(boost::filesystem::path dir, vector<dcp::VerificationNote::Code> 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()) {
}
+void
+make_and_verify_dcp (shared_ptr<Film> film, vector<dcp::VerificationNote::Code> 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)
{