X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=test%2Ftest.cc;h=b111a3b6b85a62dfe591e81aac2c78c2aae822b1;hb=ffe35585f08d0a5aeccf3e32f9c4cd2a5a6f43f5;hp=c5bc417f3865df4d084b29dd01bb9ced1251149b;hpb=f37e6b5a0f320d4352b87b97f78afae762512b93;p=dcpomatic.git diff --git a/test/test.cc b/test/test.cc index c5bc417f3..b111a3b6b 100644 --- a/test/test.cc +++ b/test/test.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2018 Carl Hetherington + Copyright (C) 2012-2019 Carl Hetherington This file is part of DCP-o-matic. @@ -35,6 +35,8 @@ #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 #include @@ -70,6 +72,7 @@ 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::xsd = boost::filesystem::canonical(boost::filesystem::path("..") / boost::filesystem::path("libdcp") / boost::filesystem::path("xsd")); void setup_test_config () @@ -113,6 +116,8 @@ struct TestConfig if (env_private) { private_data = env_private; } + + dcpomatic_log.reset (new FileLog("build/test/log")); } ~TestConfig () @@ -417,11 +422,11 @@ wait_for_jobs () } void -write_image (shared_ptr image, boost::filesystem::path file, string format) +write_image (shared_ptr 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 ()); }