Fix use of DCPOMATIC_TEST_PRIVATE variable to specify where
authorCarl Hetherington <cth@carlh.net>
Sun, 4 Oct 2020 20:04:40 +0000 (22:04 +0200)
committerCarl Hetherington <cth@carlh.net>
Tue, 13 Oct 2020 16:51:11 +0000 (18:51 +0200)
test private data is.

25 files changed:
test/atmos_test.cc
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/no_use_video_test.cc
test/player_test.cc
test/pulldown_detect_test.cc
test/reels_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 e5846f20e5f3927dd723914c01f710ea0de1d124..fe64ed6a92d856ae4bc54d650dd8e85fc1305fea 100644 (file)
@@ -38,8 +38,8 @@ using boost::shared_ptr;
 BOOST_AUTO_TEST_CASE (atmos_passthrough_test)
 {
        shared_ptr<Film> film = new_test_film2 ("atmos_passthrough_test");
-       boost::filesystem::path ref = TestPaths::private_data / "atmos_asset.mxf";
-       shared_ptr<Content> content = content_factory (TestPaths::private_data / "atmos_asset.mxf").front();
+       boost::filesystem::path ref = TestPaths::private_data() / "atmos_asset.mxf";
+       shared_ptr<Content> content = content_factory (TestPaths::private_data() / "atmos_asset.mxf").front();
        film->examine_and_add_content (content);
        BOOST_REQUIRE (!wait_for_jobs());
 
@@ -53,8 +53,8 @@ BOOST_AUTO_TEST_CASE (atmos_passthrough_test)
 BOOST_AUTO_TEST_CASE (atmos_encrypted_passthrough_test)
 {
        shared_ptr<Film> film = new_test_film2 ("atmos_encrypted_passthrough_test");
-       boost::filesystem::path ref = TestPaths::private_data / "atmos_asset.mxf";
-       shared_ptr<Content> content = content_factory (TestPaths::private_data / "atmos_asset.mxf").front();
+       boost::filesystem::path ref = TestPaths::private_data() / "atmos_asset.mxf";
+       shared_ptr<Content> content = content_factory (TestPaths::private_data() / "atmos_asset.mxf").front();
        film->examine_and_add_content (content);
        BOOST_REQUIRE (!wait_for_jobs());
 
index 4613f4aead464f40b8d5f5b9fbc190f31633d81d..5cf8c02713a7eba7960f0ec6652113e3bd6af73b 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 = TestPaths::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(TestPaths::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(TestPaths::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(TestPaths::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());
 
@@ -207,7 +207,7 @@ BOOST_AUTO_TEST_CASE (analyse_audio_leqm_test)
 {
        shared_ptr<Film> film = new_test_film2 ("analyse_audio_leqm_test");
        film->set_audio_channels (2);
-       shared_ptr<Content> content = content_factory(TestPaths::private_data / "betty_stereo_48k.wav").front();
+       shared_ptr<Content> content = content_factory(TestPaths::private_data() / "betty_stereo_48k.wav").front();
        film->examine_and_add_content (content);
        BOOST_REQUIRE (!wait_for_jobs());
 
index 1e143f8e4db2317773a251addf1a17955402459b..5409ec37ddbfdbf7c766e2b9c74d35e18a4fa1f6 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(TestPaths::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 0f639587bd45232f0e94dcca322ec8ec08b39f36..2cabd0a0b266cc7dac24a309ebeab64d05e89297 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(TestPaths::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 17b997fbc4b5526822322bc8865b6131301ded73..e94990798efff4fd0442bb438799d6edb5ff3c6b 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(TestPaths::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 e9b0c70394b2ecf62d10f24284032b50f2f40fea..6499887e752e1f4fda3a12cc630ab08211ede5a4 100644 (file)
@@ -128,7 +128,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(TestPaths::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 ());
 
@@ -140,7 +140,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(TestPaths::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 8adcbf8b8c901c061d982b9e8b8ebb9017d84855..7ee225d510943e3bf56998ad46a1608a052b1e5e 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 = TestPaths::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 d761d946556291db329d92d297cee36edc80b206..d8293b6fe3df69a0216f0d29e7fbdf387a9379a0 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 = TestPaths::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 178ed52969b8953baaa1a8f1a40ece592a7abdad..1b030ce8076765bce532825a4d9e66526a83ee8d 100644 (file)
@@ -88,19 +88,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, TestPaths::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, TestPaths::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, TestPaths::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 */
@@ -108,7 +108,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(TestPaths::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);
 
@@ -322,7 +322,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(TestPaths::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());
@@ -352,9 +352,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(TestPaths::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(TestPaths::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);
@@ -403,7 +403,7 @@ BOOST_AUTO_TEST_CASE (ffmpeg_encoder_h264_test9)
 {
        shared_ptr<Film> film = new_test_film ("ffmpeg_encoder_prores_test9");
        film->set_name ("ffmpeg_encoder_prores_test9");
-       shared_ptr<ImageContent> c (new ImageContent(TestPaths::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 (12);
 
index e83b20c543aef114cd77f415bbf65545aad8ccad..04e6f25356a53174e1c52f99fba3c83c6cd717aa 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(TestPaths::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 820a44e881b33290e9f0a27b847bdd677835a6f1..bdd34c665df657f458fe6f47ee44c49b1c4e072e 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 (TestPaths::private_data / "prophet_frame.tiff"));
+       shared_ptr<FFmpegImageProxy> proxy (new FFmpegImageProxy (TestPaths::private_data() / "prophet_frame.tiff"));
        shared_ptr<Image> raw = proxy->image().image;
        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");
-       check_image ("build/test/image_test_" + suffix + ".png", TestPaths::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 ddad2ee77baf3e45d79d7082b37e7dc6f0c38c6f..584f82987b4db09e6e4ee07936558d4b67155d37 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(TestPaths::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 e66cf1829c3ead1659897c12fd5b5c57b06f84ad..832f48c3f8cd6ac28a21068edc650d651a9db228 100644 (file)
@@ -18,7 +18,7 @@
 
 */
 
-/** @file  test/j2k_bandwidth_test.cc
+/** @file  test/bandwidth_test.cc
  *  @brief Test whether we output whatever J2K bandwidth is requested.
  *  @ingroup specific
  */
@@ -40,12 +40,12 @@ check (int target_bits_per_second)
 {
        int const duration = 10;
 
-       string const name = "j2k_bandwidth_test_" + dcp::raw_convert<string> (target_bits_per_second);
+       string const name = "bandwidth_test_" + dcp::raw_convert<string> (target_bits_per_second);
        shared_ptr<Film> film = new_test_film (name);
        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(TestPaths::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);
@@ -63,7 +63,7 @@ check (int target_bits_per_second)
        BOOST_CHECK ((actual_bits_per_second / target_bits_per_second) < 1.15);
 }
 
-BOOST_AUTO_TEST_CASE (j2k_bandwidth_test)
+BOOST_AUTO_TEST_CASE (bandwidth_test)
 {
        check (50000000);
        check (100000000);
index d2589d123944dffc1f02445df70102f4c37e4ea9..c5473ae7c559e40307874afb1792aee663b8f201 100644 (file)
@@ -72,8 +72,8 @@ BOOST_AUTO_TEST_CASE (no_use_video_test1)
 BOOST_AUTO_TEST_CASE (no_use_video_test2)
 {
        shared_ptr<Film> film = new_test_film2 ("no_use_video_test2");
-       shared_ptr<Content> A = content_factory (TestPaths::private_data / "dolby_aurora.vob").front();
-       shared_ptr<Content> B = content_factory (TestPaths::private_data / "big_buck_bunny_trailer_480p.mov").front();
+       shared_ptr<Content> A = content_factory (TestPaths::private_data() / "dolby_aurora.vob").front();
+       shared_ptr<Content> B = content_factory (TestPaths::private_data() / "big_buck_bunny_trailer_480p.mov").front();
        film->examine_and_add_content (A);
        film->examine_and_add_content (B);
        BOOST_REQUIRE (!wait_for_jobs());
index e52a73e5e8acc7efcea935123f22c253172c6f25..6dd78dbb298adaff8e3fc4110c99fe6202afc64d 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(TestPaths::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(TestPaths::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(TestPaths::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(TestPaths::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 e4f8aa711c085fda1b70e0a2509290bfd2b83424..e6adb288f8e8707e02353721fa459eb6f504e525 100644 (file)
@@ -32,7 +32,7 @@ using boost::shared_ptr;
 BOOST_AUTO_TEST_CASE (pulldown_detect_test1)
 {
        shared_ptr<Film> film = new_test_film2 ("pulldown_detect_test1");
-       shared_ptr<Content> content = content_factory(TestPaths::private_data / "greatbrain.mkv").front();
+       shared_ptr<Content> content = content_factory(TestPaths::private_data() / "greatbrain.mkv").front();
        film->examine_and_add_content (content);
        BOOST_REQUIRE (!wait_for_jobs());
        BOOST_REQUIRE (static_cast<bool>(content->video_frame_rate()));
index 41e206366d5469ecf208992bfec899b9688d074a..573289718117ac12cb096b77274a8fd624e12c6d 100644 (file)
@@ -526,7 +526,7 @@ BOOST_AUTO_TEST_CASE (reels_should_not_be_short1)
 
        vector<boost::filesystem::path> dirs;
        dirs.push_back (film->dir(film->dcp_name(false)));
-       list<dcp::VerificationNote> const notes = dcp::verify(dirs, boost::bind(&no_op), boost::bind(&no_op), TestPaths::xsd);
+       list<dcp::VerificationNote> const notes = dcp::verify(dirs, boost::bind(&no_op), boost::bind(&no_op), TestPaths::xsd());
        dump_notes (notes);
        BOOST_REQUIRE (notes.empty());
 }
@@ -556,7 +556,7 @@ BOOST_AUTO_TEST_CASE (reels_should_not_be_short2)
 
        vector<boost::filesystem::path> dirs;
        dirs.push_back (film->dir(film->dcp_name(false)));
-       list<dcp::VerificationNote> const notes = dcp::verify(dirs, boost::bind(&no_op), boost::bind(&no_op), TestPaths::xsd);
+       list<dcp::VerificationNote> const notes = dcp::verify(dirs, boost::bind(&no_op), boost::bind(&no_op), TestPaths::xsd());
        dump_notes (notes);
        BOOST_REQUIRE (notes.empty());
 }
@@ -580,7 +580,7 @@ BOOST_AUTO_TEST_CASE (reels_should_not_be_short3)
        BOOST_REQUIRE (!wait_for_jobs());
 
        vector<boost::filesystem::path> dirs;
-       list<dcp::VerificationNote> const notes = dcp::verify(dirs, boost::bind(&no_op), boost::bind(&no_op), TestPaths::xsd);
+       list<dcp::VerificationNote> const notes = dcp::verify(dirs, boost::bind(&no_op), boost::bind(&no_op), TestPaths::xsd());
        dump_notes (notes);
        BOOST_REQUIRE (notes.empty());
 }
@@ -610,7 +610,7 @@ BOOST_AUTO_TEST_CASE (reels_should_not_be_short4)
 
        vector<boost::filesystem::path> dirs;
        dirs.push_back (film->dir(film->dcp_name(false)));
-       list<dcp::VerificationNote> const notes = dcp::verify(dirs, boost::bind(&no_op), boost::bind(&no_op), TestPaths::xsd);
+       list<dcp::VerificationNote> const notes = dcp::verify(dirs, boost::bind(&no_op), boost::bind(&no_op), TestPaths::xsd());
        dump_notes (notes);
        BOOST_REQUIRE (notes.empty());
 }
index 2321653d9a19c77ade7ca3764ad022c12fd65253..27d76ed31b624a700870853e5248b2c57773f7ec 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(TestPaths::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, TestPaths::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 dcabf29555f69f0614bcac15145d2f81cd3b327c..75abd02845d97030b4c9faff1bd5fe4552edb81b 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(TestPaths::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 a84c27c8233a2a9bf4f1b2392dbed604fba72ac6..5fbe3058deb851f8966e0f81c97fce882fad8358 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(TestPaths::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, TestPaths::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 a7b27e2f30c8f19e1e4f332802e5e1634ee5a5eb..bb37358f1e4041ead825f2eeb198b451ab879a31 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(TestPaths::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), TestPaths::private_data / "DKH_UT_EN20160601def.xml", ignore);
+       check_xml (subtitle_file(film), TestPaths::private_data() / "DKH_UT_EN20160601def.xml", ignore);
 }
index 9247aec4a828150410694c0f1d57ecdd55861b67..67bde8927be39aded93288208a24f9552ad177a9 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 (TestPaths::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 5aee442309de2dc07a507f9cc4247a97204958e5..a576ee0c01219ce7950c90922d8e52103508602c 100644 (file)
@@ -72,8 +72,24 @@ using boost::shared_ptr;
 using boost::scoped_array;
 using boost::dynamic_pointer_cast;
 
-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"));
+
+boost::filesystem::path
+TestPaths::TestPaths::private_data ()
+{
+       char* env = getenv("DCPOMATIC_TEST_PRIVATE");
+       if (env) {
+               return boost::filesystem::path(env);
+       }
+
+       return boost::filesystem::canonical(boost::filesystem::path ("..") / boost::filesystem::path ("dcpomatic-test-private"));
+}
+
+
+boost::filesystem::path TestPaths::xsd ()
+{
+       return boost::filesystem::canonical(boost::filesystem::path("..") / boost::filesystem::path("libdcp") / boost::filesystem::path("xsd"));
+}
+
 
 void
 setup_test_config ()
@@ -118,11 +134,6 @@ struct TestConfig
 
                signal_manager = new TestSignalManager ();
 
-               char* env_private = getenv("DCPOMATIC_TEST_PRIVATE");
-               if (env_private) {
-                       TestPaths::TestPaths::private_data = env_private;
-               }
-
                dcpomatic_log.reset (new FileLog("build/test/log"));
        }
 
index aa58aac0993605b64c1a73a19e063806f8629f00..4968d330162eff74327dd8d1dc8722fec46ed314 100644 (file)
@@ -30,8 +30,8 @@ class Log;
 class TestPaths
 {
 public:
-       static boost::filesystem::path private_data;
-       static boost::filesystem::path xsd;
+       static boost::filesystem::path private_data();
+       static boost::filesystem::path xsd();
 };
 
 extern bool wait_for_jobs ();
index ce1df88e381ce32404e3420a7634f9c370682b1e..ed512e2984f0e682fa97d70b631a8cc4be8b92b9 100644 (file)
@@ -106,9 +106,9 @@ BOOST_AUTO_TEST_CASE (threed_test3)
 BOOST_AUTO_TEST_CASE (threed_test4)
 {
        shared_ptr<Film> film = new_test_film2 ("threed_test4");
-       shared_ptr<FFmpegContent> L (new FFmpegContent(TestPaths::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(TestPaths::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());
 
@@ -131,9 +131,9 @@ BOOST_AUTO_TEST_CASE (threed_test4)
 BOOST_AUTO_TEST_CASE (threed_test5)
 {
        shared_ptr<Film> film = new_test_film2 ("threed_test5");
-       shared_ptr<FFmpegContent> L (new FFmpegContent(TestPaths::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(TestPaths::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());