+void
+#ifdef DCPOMATIC_LINUX
+make_and_verify_dcp(shared_ptr<Film> film, vector<dcp::VerificationNote::Code> ignore, bool dcp_inspect, bool clairmeta)
+#else
+make_and_verify_dcp(shared_ptr<Film> film, vector<dcp::VerificationNote::Code> ignore, bool, bool)
+#endif
+{
+ film->write_metadata ();
+ make_dcp (film, TranscodeJob::ChangedBehaviour::IGNORE);
+ BOOST_REQUIRE (!wait_for_jobs());
+ verify_dcp({film->dir(film->dcp_name())}, ignore);
+
+#ifdef DCPOMATIC_LINUX
+ auto test_tools_path_env = getenv("DCPOMATIC_TEST_TOOLS_PATH");
+ string test_tools_path;
+ if (test_tools_path_env) {
+ test_tools_path = test_tools_path_env;
+ }
+
+ auto old_path_env = getenv("PATH");
+ string old_path;
+ if (old_path_env) {
+ old_path = old_path_env;
+ }
+
+ dcp::ScopeGuard sg = [old_path]() { setenv("PATH", old_path.c_str(), 1); };
+ string new_path = old_path;
+ if (!new_path.empty()) {
+ new_path += ":";
+ }
+ new_path += test_tools_path;
+ setenv("PATH", new_path.c_str(), 1);
+
+ auto dcp_inspect_env = getenv("DCPOMATIC_DCP_INSPECT");
+ if (dcp_inspect && dcp_inspect_env) {
+ boost::filesystem::path dcp_inspect(dcp_inspect_env);
+ auto cmd = String::compose("%1 %2 > %3 2>&1", dcp_inspect, film->dir(film->dcp_name()), film->file("dcp_inspect.log"));
+ 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
+}
+
+