/*
- Copyright (C) 2012-2018 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2019 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
#include "lib/dcp_content_type.h"
#include "lib/log_entry.h"
#include "lib/compose.hpp"
+#include "lib/file_log.h"
+#include "lib/dcpomatic_log.h"
#include "test.h"
#include <dcp/dcp.h>
#include <dcp/cpl.h>
using boost::scoped_array;
using boost::dynamic_pointer_cast;
-boost::filesystem::path private_data = boost::filesystem::canonical(boost::filesystem::path ("..") / boost::filesystem::path ("dcpomatic-test-private"));
+boost::filesystem::path TestPaths::TestPaths::private_data = boost::filesystem::canonical(boost::filesystem::path ("..") / boost::filesystem::path ("dcpomatic-test-private"));
+boost::filesystem::path TestPaths::xsd = boost::filesystem::canonical(boost::filesystem::path("..") / boost::filesystem::path("libdcp") / boost::filesystem::path("xsd"));
void
setup_test_config ()
char* env_private = getenv("DCPOMATIC_TEST_PRIVATE");
if (env_private) {
- private_data = env_private;
+ TestPaths::TestPaths::private_data = env_private;
}
+
+ dcpomatic_log.reset (new FileLog("build/test/log"));
}
~TestConfig ()
}
}
+
+void
+check_dcp (boost::filesystem::path ref, shared_ptr<const Film> film)
+{
+ check_dcp (ref, film->dir(film->dcp_name()));
+}
+
+
void
check_dcp (boost::filesystem::path ref, boost::filesystem::path check)
{
}
void
-write_image (shared_ptr<const Image> image, boost::filesystem::path file, string format)
+write_image (shared_ptr<const Image> image, boost::filesystem::path file, string format, MagickCore::StorageType pixel_type)
{
using namespace MagickCore;
- Magick::Image m (image->size().width, image->size().height, format.c_str(), CharPixel, (void *) image->data()[0]);
+ Magick::Image m (image->size().width, image->size().height, format.c_str(), pixel_type, (void *) image->data()[0]);
m.write (file.string ());
}