Move private_data into TestPaths
authorCarl Hetherington <cth@carlh.net>
Mon, 9 Mar 2020 15:45:26 +0000 (16:45 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 11 Mar 2020 21:24:28 +0000 (22:24 +0100)
21 files changed:
test/audio_analysis_test.cc
test/content_test.cc
test/dcp_playback_test.cc
test/dcp_subtitle_test.cc
test/ffmpeg_audio_test.cc
test/ffmpeg_decoder_seek_test.cc
test/ffmpeg_decoder_sequential_test.cc
test/ffmpeg_encoder_test.cc
test/ffmpeg_examiner_test.cc
test/image_test.cc
test/interrupt_encoder_test.cc
test/j2k_bandwidth_test.cc
test/player_test.cc
test/remake_with_subtitle_test.cc
test/silence_padding_test.cc
test/srt_subtitle_test.cc
test/ssa_subtitle_test.cc
test/subtitle_charset_test.cc
test/test.cc
test/test.h
test/threed_test.cc

index 5d65ab693c5f6cbd7394e123cb0aaf2b9f057637..562039d930c24f3ac88b5beea00922b7574ea751 100644 (file)
@@ -111,7 +111,7 @@ BOOST_AUTO_TEST_CASE (audio_analysis_test)
        film->set_dcp_content_type (DCPContentType::from_isdcf_name ("FTR"));
        film->set_container (Ratio::from_id ("185"));
        film->set_name ("audio_analysis_test");
-       boost::filesystem::path p = private_data / "betty_L.wav";
+       boost::filesystem::path p = TestPaths::private_data / "betty_L.wav";
 
        shared_ptr<FFmpegContent> c (new FFmpegContent(p));
        film->examine_and_add_content (c);
@@ -128,7 +128,7 @@ BOOST_AUTO_TEST_CASE (audio_analysis_negative_delay_test)
 {
        shared_ptr<Film> film = new_test_film ("audio_analysis_negative_delay_test");
        film->set_name ("audio_analysis_negative_delay_test");
-       shared_ptr<FFmpegContent> c (new FFmpegContent(private_data / "boon_telly.mkv"));
+       shared_ptr<FFmpegContent> c (new FFmpegContent(TestPaths::private_data / "boon_telly.mkv"));
        film->examine_and_add_content (c);
        BOOST_REQUIRE (!wait_for_jobs());
 
@@ -145,7 +145,7 @@ BOOST_AUTO_TEST_CASE (audio_analysis_test2)
 {
        shared_ptr<Film> film = new_test_film ("audio_analysis_test2");
        film->set_name ("audio_analysis_test2");
-       shared_ptr<FFmpegContent> c (new FFmpegContent(private_data / "3d_thx_broadway_2010_lossless.m2ts"));
+       shared_ptr<FFmpegContent> c (new FFmpegContent(TestPaths::private_data / "3d_thx_broadway_2010_lossless.m2ts"));
        film->examine_and_add_content (c);
        BOOST_REQUIRE (!wait_for_jobs());
 
@@ -192,7 +192,7 @@ BOOST_AUTO_TEST_CASE (analyse_audio_test4)
        film->set_container (Ratio::from_id ("185"));
        film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TLR"));
        film->set_name ("frobozz");
-       shared_ptr<Content> content = content_factory(private_data / "20 The Wedding Convoy Song.m4a").front();
+       shared_ptr<Content> content = content_factory(TestPaths::private_data / "20 The Wedding Convoy Song.m4a").front();
        film->examine_and_add_content (content);
        BOOST_REQUIRE (!wait_for_jobs());
 
index 2f8963f5bfed20afee24b899aa638685ee3c60c2..fb66b2e082df537c715f0dd3693d8c07f98979cd 100644 (file)
@@ -42,7 +42,7 @@ BOOST_AUTO_TEST_CASE (content_test1)
        film->set_name ("content_test1");
        film->set_container (Ratio::from_id ("185"));
 
-       shared_ptr<Content> content = content_factory(private_data / "demo_sound_bug.mkv").front ();
+       shared_ptr<Content> content = content_factory(TestPaths::private_data / "demo_sound_bug.mkv").front ();
        film->examine_and_add_content (content);
        BOOST_REQUIRE (!wait_for_jobs ());
        film->make_dcp ();
index 1dda667a08ab825bac698cb9e2fe6ca83a7bbf53..78785737548db4536da3e5ae5a2c1012de36bd39 100644 (file)
@@ -34,7 +34,7 @@ using namespace dcpomatic;
 BOOST_AUTO_TEST_CASE (dcp_playback_test)
 {
        shared_ptr<Film> film = new_test_film ("dcp_playback_test");
-       shared_ptr<DCPContent> content (new DCPContent(private_data / "JourneyToJah_TLR-1_F_EN-DE-FR_CH_51_2K_LOK_20140225_DGL_SMPTE_OV"));
+       shared_ptr<DCPContent> content (new DCPContent(TestPaths::private_data / "JourneyToJah_TLR-1_F_EN-DE-FR_CH_51_2K_LOK_20140225_DGL_SMPTE_OV"));
        film->examine_and_add_content (content);
        BOOST_REQUIRE (!wait_for_jobs());
 
index 64800c100e00df70ca427ae29e49eb24be172157..80dacbb473dc161fa43a6096e83c351e3ccd1a70 100644 (file)
@@ -87,7 +87,7 @@ BOOST_AUTO_TEST_CASE (dcp_subtitle_within_dcp_test)
        film->set_container (Ratio::from_id ("185"));
        film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TLR"));
        film->set_name ("frobozz");
-       shared_ptr<DCPContent> content (new DCPContent(private_data / "JourneyToJah_TLR-1_F_EN-DE-FR_CH_51_2K_LOK_20140225_DGL_SMPTE_OV"));
+       shared_ptr<DCPContent> content (new DCPContent(TestPaths::private_data / "JourneyToJah_TLR-1_F_EN-DE-FR_CH_51_2K_LOK_20140225_DGL_SMPTE_OV"));
        film->examine_and_add_content (content);
        BOOST_REQUIRE (!wait_for_jobs ());
 
index 067075d254a2650809c447a6639caf6f2d31cfa2..8e0fd92801d3b695ae96021954796f9f48621c38 100644 (file)
@@ -130,7 +130,7 @@ BOOST_AUTO_TEST_CASE (ffmpeg_audio_test)
 BOOST_AUTO_TEST_CASE (ffmpeg_audio_test2)
 {
        shared_ptr<Film> film = new_test_film2 ("ffmpeg_audio_test2");
-       shared_ptr<Content> content = content_factory(private_data / "wayne.mkv").front();
+       shared_ptr<Content> content = content_factory(TestPaths::private_data / "wayne.mkv").front();
        film->examine_and_add_content (content);
        BOOST_REQUIRE (!wait_for_jobs ());
 
@@ -142,7 +142,7 @@ BOOST_AUTO_TEST_CASE (ffmpeg_audio_test2)
 BOOST_AUTO_TEST_CASE (ffmpeg_audio_test3)
 {
        shared_ptr<Film> film = new_test_film2 ("ffmpeg_audio_test2");
-       shared_ptr<Content> content = content_factory(private_data / "wayne.mkv").front();
+       shared_ptr<Content> content = content_factory(TestPaths::private_data / "wayne.mkv").front();
        film->examine_and_add_content (content);
        BOOST_REQUIRE (!wait_for_jobs ());
 
index 3e825e4433383f455469ae2a52d3011fba47042a..8adcbf8b8c901c061d982b9e8b8ebb9017d84855 100644 (file)
@@ -67,7 +67,7 @@ check (shared_ptr<FFmpegDecoder> decoder, int frame)
 static void
 test (boost::filesystem::path file, vector<int> frames)
 {
-       boost::filesystem::path path = private_data / file;
+       boost::filesystem::path path = TestPaths::private_data / file;
        BOOST_REQUIRE (boost::filesystem::exists (path));
 
        shared_ptr<Film> film = new_test_film ("ffmpeg_decoder_seek_test_" + file.string());
index e523a7b7683bf1195e20adbd73feb88a1491dbd7..cf841bcabcbd8d6343ee3334f0845fea2543fac4 100644 (file)
@@ -57,7 +57,7 @@ check (shared_ptr<PlayerVideo>, DCPTime time)
 void
 ffmpeg_decoder_sequential_test_one (boost::filesystem::path file, float fps, int video_length)
 {
-       boost::filesystem::path path = private_data / file;
+       boost::filesystem::path path = TestPaths::private_data / file;
        BOOST_REQUIRE (boost::filesystem::exists (path));
 
        shared_ptr<Film> film = new_test_film ("ffmpeg_decoder_sequential_test_" + file.string());
index 1acfa96df773c4d7c1830033d6543691fc1d429f..10186abcc92aa247dd423ed7619ab0f7cd47e909 100644 (file)
@@ -85,19 +85,19 @@ BOOST_AUTO_TEST_CASE (ffmpeg_encoder_prores_test1)
 /** Dolby Aurora trailer VOB -> Prores */
 BOOST_AUTO_TEST_CASE (ffmpeg_encoder_prores_test2)
 {
-       ffmpeg_content_test (2, private_data / "dolby_aurora.vob", EXPORT_FORMAT_PRORES);
+       ffmpeg_content_test (2, TestPaths::private_data / "dolby_aurora.vob", EXPORT_FORMAT_PRORES);
 }
 
 /** Sintel trailer -> Prores */
 BOOST_AUTO_TEST_CASE (ffmpeg_encoder_prores_test3)
 {
-       ffmpeg_content_test (3, private_data / "Sintel_Trailer1.480p.DivX_Plus_HD.mkv", EXPORT_FORMAT_PRORES);
+       ffmpeg_content_test (3, TestPaths::private_data / "Sintel_Trailer1.480p.DivX_Plus_HD.mkv", EXPORT_FORMAT_PRORES);
 }
 
 /** Big Buck Bunny trailer -> Prores */
 BOOST_AUTO_TEST_CASE (ffmpeg_encoder_prores_test4)
 {
-       ffmpeg_content_test (4, private_data / "big_buck_bunny_trailer_480p.mov", EXPORT_FORMAT_PRORES);
+       ffmpeg_content_test (4, TestPaths::private_data / "big_buck_bunny_trailer_480p.mov", EXPORT_FORMAT_PRORES);
 }
 
 /** Still image -> Prores */
@@ -105,7 +105,7 @@ BOOST_AUTO_TEST_CASE (ffmpeg_encoder_prores_test5)
 {
        shared_ptr<Film> film = new_test_film ("ffmpeg_encoder_prores_test5");
        film->set_name ("ffmpeg_encoder_prores_test5");
-       shared_ptr<ImageContent> c (new ImageContent(private_data / "bbc405.png"));
+       shared_ptr<ImageContent> c (new ImageContent(TestPaths::private_data / "bbc405.png"));
        film->set_container (Ratio::from_id ("185"));
        film->set_audio_channels (6);
 
@@ -319,7 +319,7 @@ BOOST_AUTO_TEST_CASE (ffmpeg_encoder_h264_test5)
 BOOST_AUTO_TEST_CASE (ffmpeg_encoder_h264_test6)
 {
        shared_ptr<Film> film = new_test_film2 ("ffmpeg_encoder_h264_test6_ov");
-       film->examine_and_add_content (shared_ptr<ImageContent>(new ImageContent(private_data / "bbc405.png")));
+       film->examine_and_add_content (shared_ptr<ImageContent>(new ImageContent(TestPaths::private_data / "bbc405.png")));
        BOOST_REQUIRE (!wait_for_jobs());
        film->make_dcp ();
        BOOST_REQUIRE (!wait_for_jobs());
@@ -349,9 +349,9 @@ BOOST_AUTO_TEST_CASE (ffmpeg_encoder_h264_test6)
 BOOST_AUTO_TEST_CASE (ffmpeg_encoder_h264_test7)
 {
        shared_ptr<Film> film = new_test_film2 ("ffmpeg_encoder_h264_test7_data");
-       shared_ptr<Content> L (shared_ptr<ImageContent>(new ImageContent(private_data / "bbc405.png")));
+       shared_ptr<Content> L (shared_ptr<ImageContent>(new ImageContent(TestPaths::private_data / "bbc405.png")));
        film->examine_and_add_content (L);
-       shared_ptr<Content> R (shared_ptr<ImageContent>(new ImageContent(private_data / "bbc405.png")));
+       shared_ptr<Content> R (shared_ptr<ImageContent>(new ImageContent(TestPaths::private_data / "bbc405.png")));
        film->examine_and_add_content (R);
        BOOST_REQUIRE (!wait_for_jobs());
        L->video->set_frame_type (VIDEO_FRAME_TYPE_3D_LEFT);
index f8453ddb57b68197d335587a3149c2f64883c14a..e83b20c543aef114cd77f415bbf65545aad8ccad 100644 (file)
@@ -52,7 +52,7 @@ BOOST_AUTO_TEST_CASE (ffmpeg_examiner_test)
  */
 BOOST_AUTO_TEST_CASE (ffmpeg_examiner_probesize_test)
 {
-       shared_ptr<FFmpegContent> content (new FFmpegContent(private_data / "RockyTop10 Playlist Flat.m4v"));
+       shared_ptr<FFmpegContent> content (new FFmpegContent(TestPaths::private_data / "RockyTop10 Playlist Flat.m4v"));
        shared_ptr<FFmpegExaminer> examiner (new FFmpegExaminer(content));
 
        BOOST_CHECK_EQUAL (examiner->audio_streams().size(), 2U);
index 4eb2f0486811a09ab31a1c58f3d99c5e5a648a5d..e021322e095d9f81d407c020aa40e429f7d014a8 100644 (file)
@@ -137,7 +137,7 @@ BOOST_AUTO_TEST_CASE (compact_image_test)
 void
 alpha_blend_test_one (AVPixelFormat format, string suffix)
 {
-       shared_ptr<FFmpegImageProxy> proxy (new FFmpegImageProxy (private_data / "prophet_frame.tiff"));
+       shared_ptr<FFmpegImageProxy> proxy (new FFmpegImageProxy (TestPaths::private_data / "prophet_frame.tiff"));
        shared_ptr<Image> raw = proxy->image().first;
        shared_ptr<Image> background = raw->convert_pixel_format (dcp::YUV_TO_RGB_REC709, format, true, false);
 
@@ -173,7 +173,7 @@ alpha_blend_test_one (AVPixelFormat format, string suffix)
        shared_ptr<Image> save = background->convert_pixel_format (dcp::YUV_TO_RGB_REC709, AV_PIX_FMT_RGB24, false, false);
 
        write_image (save, "build/test/image_test_" + suffix + ".png", "RGB");
-       check_image ("build/test/image_test_" + suffix + ".png", private_data / ("image_test_" + suffix + ".png"));
+       check_image ("build/test/image_test_" + suffix + ".png", TestPaths::private_data / ("image_test_" + suffix + ".png"));
 }
 
 /** Test Image::alpha_blend */
index ed988a65b44b15fdfedd2164267dcdb7da916cde..ddad2ee77baf3e45d79d7082b37e7dc6f0c38c6f 100644 (file)
@@ -45,7 +45,7 @@ BOOST_AUTO_TEST_CASE (interrupt_encoder_test)
        film->set_container (Ratio::from_id ("185"));
        film->set_name ("interrupt_encoder_test");
 
-       shared_ptr<FFmpegContent> content (new FFmpegContent(private_data / "prophet_long_clip.mkv"));
+       shared_ptr<FFmpegContent> content (new FFmpegContent(TestPaths::private_data / "prophet_long_clip.mkv"));
        film->examine_and_add_content (content);
        BOOST_REQUIRE (!wait_for_jobs());
 
index 40309df87b5aa6709c374ddf4a4d1c542973a847..e66cf1829c3ead1659897c12fd5b5c57b06f84ad 100644 (file)
@@ -45,7 +45,7 @@ check (int target_bits_per_second)
        film->set_name (name);
        film->set_dcp_content_type (DCPContentType::from_isdcf_name ("FTR"));
        film->set_j2k_bandwidth (target_bits_per_second);
-       shared_ptr<ImageContent> content (new ImageContent(private_data / "prophet_frame.tiff"));
+       shared_ptr<ImageContent> content (new ImageContent(TestPaths::private_data / "prophet_frame.tiff"));
        film->examine_and_add_content (content);
        BOOST_REQUIRE (!wait_for_jobs());
        content->video->set_length (24 * duration);
index b2b32ba2b160ac08dcd0e82441cfe6b63c4b7d00..a242d620bbe35bf97f73d3f4f7dff6d5bed8ab83 100644 (file)
@@ -205,7 +205,7 @@ BOOST_AUTO_TEST_CASE (player_interleave_test)
 BOOST_AUTO_TEST_CASE (player_seek_test)
 {
        shared_ptr<Film> film (new Film (optional<boost::filesystem::path>()));
-       shared_ptr<DCPContent> dcp (new DCPContent(private_data / "awkward_subs"));
+       shared_ptr<DCPContent> dcp (new DCPContent(TestPaths::private_data / "awkward_subs"));
        film->examine_and_add_content (dcp, true);
        BOOST_REQUIRE (!wait_for_jobs ());
        dcp->only_text()->set_use (true);
@@ -236,7 +236,7 @@ BOOST_AUTO_TEST_CASE (player_seek_test)
 BOOST_AUTO_TEST_CASE (player_seek_test2)
 {
        shared_ptr<Film> film (new Film (optional<boost::filesystem::path>()));
-       shared_ptr<DCPContent> dcp (new DCPContent(private_data / "awkward_subs2"));
+       shared_ptr<DCPContent> dcp (new DCPContent(TestPaths::private_data / "awkward_subs2"));
        film->examine_and_add_content (dcp, true);
        BOOST_REQUIRE (!wait_for_jobs ());
        dcp->only_text()->set_use (true);
@@ -302,7 +302,7 @@ store (list<Sub>* out, PlayerText text, TextType type, optional<DCPTextTrack> tr
 BOOST_AUTO_TEST_CASE (player_ignore_video_and_audio_test)
 {
        shared_ptr<Film> film = new_test_film2 ("player_ignore_video_and_audio_test");
-       shared_ptr<Content> ff = content_factory(private_data / "boon_telly.mkv").front();
+       shared_ptr<Content> ff = content_factory(TestPaths::private_data / "boon_telly.mkv").front();
        film->examine_and_add_content (ff);
        shared_ptr<Content> text = content_factory("test/data/subrip.srt").front();
        film->examine_and_add_content (text);
@@ -325,7 +325,7 @@ BOOST_AUTO_TEST_CASE (player_ignore_video_and_audio_test)
 BOOST_AUTO_TEST_CASE (player_trim_crash)
 {
        shared_ptr<Film> film = new_test_film2 ("player_trim_crash");
-       shared_ptr<Content> boon = content_factory(private_data / "boon_telly.mkv").front();
+       shared_ptr<Content> boon = content_factory(TestPaths::private_data / "boon_telly.mkv").front();
        film->examine_and_add_content (boon);
        BOOST_REQUIRE (!wait_for_jobs());
 
index 399796698dc646c0dc2a1d60e92717d83e2a5f73..2321653d9a19c77ade7ca3764ad022c12fd65253 100644 (file)
@@ -34,7 +34,7 @@ using boost::dynamic_pointer_cast;
 BOOST_AUTO_TEST_CASE (remake_with_subtitle_test)
 {
        shared_ptr<Film> film = new_test_film2 ("remake_with_subtitle_test");
-       shared_ptr<FFmpegContent> content = dynamic_pointer_cast<FFmpegContent>(content_factory(private_data / "prophet_short_clip.mkv").front());
+       shared_ptr<FFmpegContent> content = dynamic_pointer_cast<FFmpegContent>(content_factory(TestPaths::private_data / "prophet_short_clip.mkv").front());
        film->examine_and_add_content (content);
        BOOST_REQUIRE (!wait_for_jobs ());
        content->only_text()->set_burn (true);
@@ -48,5 +48,5 @@ BOOST_AUTO_TEST_CASE (remake_with_subtitle_test)
        film->make_dcp ();
        BOOST_REQUIRE (!wait_for_jobs ());
 
-       check_one_frame (film->dir(film->dcp_name()), 325, private_data / "prophet_frame_325_no_subs.j2c");
+       check_one_frame (film->dir(film->dcp_name()), 325, TestPaths::private_data / "prophet_frame_325_no_subs.j2c");
 }
index b15f4691b1cccf3a22ae4d6930af29020ee1021e..dcabf29555f69f0614bcac15145d2f81cd3b327c 100644 (file)
@@ -136,7 +136,7 @@ BOOST_AUTO_TEST_CASE (silence_padding_test)
 BOOST_AUTO_TEST_CASE (silence_padding_test2)
 {
        shared_ptr<Film> film = new_test_film2 ("silence_padding_test2");
-       shared_ptr<FFmpegContent> content (new FFmpegContent(private_data / "cars.mov"));
+       shared_ptr<FFmpegContent> content (new FFmpegContent(TestPaths::private_data / "cars.mov"));
        film->examine_and_add_content (content);
        BOOST_REQUIRE (!wait_for_jobs());
 
index eefdb4122ceb4bd6cc62b908ffd911693234c975..a84c27c8233a2a9bf4f1b2392dbed604fba72ac6 100644 (file)
@@ -105,7 +105,7 @@ BOOST_AUTO_TEST_CASE (srt_subtitle_test3)
        film->set_name ("frobozz");
        film->set_interop (true);
        film->set_audio_channels (6);
-       shared_ptr<StringTextFileContent> content (new StringTextFileContent(private_data / "Ankoemmling_short.srt"));
+       shared_ptr<StringTextFileContent> content (new StringTextFileContent(TestPaths::private_data / "Ankoemmling_short.srt"));
        film->examine_and_add_content (content);
        BOOST_REQUIRE (!wait_for_jobs());
 
@@ -115,7 +115,7 @@ BOOST_AUTO_TEST_CASE (srt_subtitle_test3)
        film->make_dcp ();
        BOOST_REQUIRE (!wait_for_jobs());
 
-       check_subtitle_file (film, private_data / "Ankoemmling_short.xml");
+       check_subtitle_file (film, TestPaths::private_data / "Ankoemmling_short.xml");
 }
 
 /** Build a small DCP with no picture and a single subtitle overlaid onto it */
index c61d34b7149f2c7cbd44054fd87b62752ed1345c..a7b27e2f30c8f19e1e4f332802e5e1634ee5a5eb 100644 (file)
@@ -47,7 +47,7 @@ BOOST_AUTO_TEST_CASE (ssa_subtitle_test1)
        film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TLR"));
        film->set_name ("frobozz");
        film->set_interop (true);
-       shared_ptr<StringTextFileContent> content (new StringTextFileContent(private_data / "DKH_UT_EN20160601def.ssa"));
+       shared_ptr<StringTextFileContent> content (new StringTextFileContent(TestPaths::private_data / "DKH_UT_EN20160601def.ssa"));
        film->examine_and_add_content (content);
        BOOST_REQUIRE (!wait_for_jobs());
 
@@ -60,5 +60,5 @@ BOOST_AUTO_TEST_CASE (ssa_subtitle_test1)
        /* Find the subtitle file and check it */
        list<string> ignore;
        ignore.push_back ("SubtitleID");
-       check_xml (subtitle_file(film), private_data / "DKH_UT_EN20160601def.xml", ignore);
+       check_xml (subtitle_file(film), TestPaths::private_data / "DKH_UT_EN20160601def.xml", ignore);
 }
index 29dabe4bb5802a6f6ae105e1c746bf6f3d750cff..9247aec4a828150410694c0f1d57ecdd55861b67 100644 (file)
@@ -33,7 +33,7 @@ using boost::dynamic_pointer_cast;
 BOOST_AUTO_TEST_CASE (subtitle_charset_test1)
 {
        shared_ptr<Film> film = new_test_film2 ("subtitle_charset_test1");
-       shared_ptr<Content> content = content_factory (private_data / "PADDINGTON soustitresVFdef.srt").front();
+       shared_ptr<Content> content = content_factory (TestPaths::private_data / "PADDINGTON soustitresVFdef.srt").front();
        film->examine_and_add_content (content);
        BOOST_REQUIRE (!wait_for_jobs ());
 }
index b111a3b6b85a62dfe591e81aac2c78c2aae822b1..8f92024fc546cce119436aa1359f8cecbb6ed6a0 100644 (file)
@@ -71,7 +71,7 @@ using boost::shared_ptr;
 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
@@ -114,7 +114,7 @@ struct TestConfig
 
                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"));
index c94bad595de4f9b3581bcb1869bbe772b369daab..8ccebb5feb8c5bed0f56ce3c6d539e0b23ead499 100644 (file)
 class Film;
 class Image;
 
-extern boost::filesystem::path private_data;
 
 class TestPaths
 {
 public:
+       static boost::filesystem::path private_data;
        static boost::filesystem::path xsd;
 };
 
index c8735617184d52fb116845190f80ce31b83743b9..473cc00d310df716601daf77b3255d92fef5818c 100644 (file)
@@ -110,9 +110,9 @@ BOOST_AUTO_TEST_CASE (threed_test4)
        Config::instance()->set_master_encoding_threads (8);
 
        shared_ptr<Film> film = new_test_film2 ("threed_test4");
-       shared_ptr<FFmpegContent> L (new FFmpegContent(private_data / "LEFT_TEST_DCP3D4K.mov"));
+       shared_ptr<FFmpegContent> L (new FFmpegContent(TestPaths::private_data / "LEFT_TEST_DCP3D4K.mov"));
        film->examine_and_add_content (L);
-       shared_ptr<FFmpegContent> R (new FFmpegContent(private_data / "RIGHT_TEST_DCP3D4K.mov"));
+       shared_ptr<FFmpegContent> R (new FFmpegContent(TestPaths::private_data / "RIGHT_TEST_DCP3D4K.mov"));
        film->examine_and_add_content (R);
        BOOST_REQUIRE (!wait_for_jobs());
 
@@ -133,9 +133,9 @@ BOOST_AUTO_TEST_CASE (threed_test5)
        Config::instance()->set_master_encoding_threads (8);
 
        shared_ptr<Film> film = new_test_film2 ("threed_test5");
-       shared_ptr<FFmpegContent> L (new FFmpegContent(private_data / "boon_telly.mkv"));
+       shared_ptr<FFmpegContent> L (new FFmpegContent(TestPaths::private_data / "boon_telly.mkv"));
        film->examine_and_add_content (L);
-       shared_ptr<FFmpegContent> R (new FFmpegContent(private_data / "boon_telly.mkv"));
+       shared_ptr<FFmpegContent> R (new FFmpegContent(TestPaths::private_data / "boon_telly.mkv"));
        film->examine_and_add_content (R);
        BOOST_REQUIRE (!wait_for_jobs());