Write logs during tests to a file.
authorCarl Hetherington <cth@carlh.net>
Tue, 18 Feb 2020 19:17:39 +0000 (20:17 +0100)
committerCarl Hetherington <cth@carlh.net>
Tue, 18 Feb 2020 19:17:39 +0000 (20:17 +0100)
test/test.cc

index a9d3ed1c797e132dc317ea47dddae8038123045b..bf27c0cf162a674a16af305f6d052e635b900f38 100644 (file)
@@ -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 <dcp/dcp.h>
 #include <dcp/cpl.h>
@@ -113,6 +115,8 @@ struct TestConfig
                if (env_private) {
                        private_data = env_private;
                }
+
+               dcpomatic_log.reset (new FileLog("build/test/log"));
        }
 
        ~TestConfig ()