From: Carl Hetherington Date: Sun, 29 Nov 2020 21:49:05 +0000 (+0100) Subject: Move some test references into test-private. X-Git-Tag: v2.15.108~1 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=64bd18216738052c150770561f8f78e13ca792b8 Move some test references into test-private. --- diff --git a/test/content_test.cc b/test/content_test.cc index 5409ec37d..23fb23865 100644 --- a/test/content_test.cc +++ b/test/content_test.cc @@ -60,7 +60,7 @@ BOOST_AUTO_TEST_CASE (content_test1) } } - check_mxf_audio_file ("test/data/content_test1.mxf", check); + check_mxf_audio_file (TestPaths::private_data() / "content_test1.mxf", check); } /** Taking some 23.976fps content and trimming 0.5s (in content time) from the start diff --git a/test/data b/test/data index b5863343b..1458a693f 160000 --- a/test/data +++ b/test/data @@ -1 +1 @@ -Subproject commit b5863343b9157102144f70aa4269ec03922692fe +Subproject commit 1458a693f163e82ffb8d2b81b9abdad1fb8acb1e diff --git a/test/image_proxy_test.cc b/test/image_proxy_test.cc index 0999d4b10..73ab8cb4c 100644 --- a/test/image_proxy_test.cc +++ b/test/image_proxy_test.cc @@ -21,6 +21,7 @@ #include "lib/ffmpeg_image_proxy.h" #include "lib/j2k_image_proxy.h" +#include "test.h" #include #include @@ -28,8 +29,8 @@ using boost::shared_ptr; -static const char data_file0[] = "test/data/player_seek_test_0.png"; -static const char data_file1[] = "test/data/player_seek_test_1.png"; +static const boost::filesystem::path data_file0 = TestPaths::private_data() / "player_seek_test_0.png"; +static const boost::filesystem::path data_file1 = TestPaths::private_data9) / "player_seek_test_1.png"; BOOST_AUTO_TEST_CASE (j2k_image_proxy_same_test) diff --git a/test/image_test.cc b/test/image_test.cc index 9c1c7457e..3d599b82d 100644 --- a/test/image_test.cc +++ b/test/image_test.cc @@ -284,7 +284,7 @@ BOOST_AUTO_TEST_CASE (crop_scale_window_test2) BOOST_AUTO_TEST_CASE (crop_scale_window_test3) { - shared_ptr proxy(new FFmpegImageProxy("test/data/player_seek_test_0.png", VIDEO_RANGE_FULL)); + shared_ptr proxy(new FFmpegImageProxy(TestPaths::private_data() / "player_seek_test_0.png", VIDEO_RANGE_FULL)); shared_ptr xyz = proxy->image().image->convert_pixel_format(dcp::YUV_TO_RGB_REC709, AV_PIX_FMT_RGB24, true, false); shared_ptr cropped = xyz->crop_scale_window( Crop(512, 0, 0, 0), dcp::Size(1486, 1080), dcp::Size(1998, 1080), dcp::YUV_TO_RGB_REC709, VIDEO_RANGE_FULL, AV_PIX_FMT_RGB24, VIDEO_RANGE_FULL, false, false @@ -295,7 +295,7 @@ BOOST_AUTO_TEST_CASE (crop_scale_window_test3) BOOST_AUTO_TEST_CASE (crop_scale_window_test4) { - shared_ptr proxy(new FFmpegImageProxy("test/data/player_seek_test_0.png", VIDEO_RANGE_FULL)); + shared_ptr proxy(new FFmpegImageProxy(TestPaths::private_data() / "player_seek_test_0.png", VIDEO_RANGE_FULL)); shared_ptr xyz = proxy->image().image->convert_pixel_format(dcp::YUV_TO_RGB_REC709, AV_PIX_FMT_RGB24, true, false); shared_ptr cropped = xyz->crop_scale_window( Crop(512, 0, 0, 0), dcp::Size(1486, 1080), dcp::Size(1998, 1080), dcp::YUV_TO_RGB_REC709, VIDEO_RANGE_FULL, AV_PIX_FMT_XYZ12LE, VIDEO_RANGE_FULL, false, false @@ -306,7 +306,7 @@ BOOST_AUTO_TEST_CASE (crop_scale_window_test4) BOOST_AUTO_TEST_CASE (crop_scale_window_test5) { - shared_ptr proxy(new FFmpegImageProxy("test/data/player_seek_test_0.png", VIDEO_RANGE_FULL)); + shared_ptr proxy(new FFmpegImageProxy(TestPaths::private_data() / "player_seek_test_0.png", VIDEO_RANGE_FULL)); shared_ptr xyz = proxy->image().image->convert_pixel_format(dcp::YUV_TO_RGB_REC709, AV_PIX_FMT_XYZ12LE, true, false); shared_ptr cropped = xyz->crop_scale_window( Crop(512, 0, 0, 0), dcp::Size(1486, 1080), dcp::Size(1998, 1080), dcp::YUV_TO_RGB_REC709, VIDEO_RANGE_FULL, AV_PIX_FMT_RGB24, VIDEO_RANGE_FULL, false, false @@ -317,7 +317,7 @@ BOOST_AUTO_TEST_CASE (crop_scale_window_test5) BOOST_AUTO_TEST_CASE (crop_scale_window_test6) { - shared_ptr proxy(new FFmpegImageProxy("test/data/player_seek_test_0.png", VIDEO_RANGE_FULL)); + shared_ptr proxy(new FFmpegImageProxy(TestPaths::private_data() / "player_seek_test_0.png", VIDEO_RANGE_FULL)); shared_ptr xyz = proxy->image().image->convert_pixel_format(dcp::YUV_TO_RGB_REC709, AV_PIX_FMT_XYZ12LE, true, false); shared_ptr cropped = xyz->crop_scale_window( Crop(512, 0, 0, 0), dcp::Size(1486, 1080), dcp::Size(1998, 1080), dcp::YUV_TO_RGB_REC709, VIDEO_RANGE_FULL, AV_PIX_FMT_XYZ12LE, VIDEO_RANGE_FULL, false, false diff --git a/test/no_use_video_test.cc b/test/no_use_video_test.cc index c5473ae7c..46b7e2aef 100644 --- a/test/no_use_video_test.cc +++ b/test/no_use_video_test.cc @@ -85,7 +85,7 @@ BOOST_AUTO_TEST_CASE (no_use_video_test2) film->make_dcp (); BOOST_REQUIRE (!wait_for_jobs()); - check_dcp ("test/data/no_use_video_test2", film); + check_dcp (TestPaths::private_data() / "no_use_video_test2", film); } diff --git a/test/player_test.cc b/test/player_test.cc index f44806d68..15fb4161d 100644 --- a/test/player_test.cc +++ b/test/player_test.cc @@ -231,7 +231,7 @@ BOOST_AUTO_TEST_CASE (player_seek_test) (17.10 and 16.04 seem to anti-alias a little differently) but to reject gross errors e.g. missing fonts or missing text altogether. */ - check_image(String::compose("test/data/player_seek_test_%1.png", i), String::compose("build/test/player_seek_test_%1.png", i), 14.08); + check_image(TestPaths::private_data() / String::compose("player_seek_test_%1.png", i), String::compose("build/test/player_seek_test_%1.png", i), 14.08); } } @@ -262,7 +262,7 @@ BOOST_AUTO_TEST_CASE (player_seek_test2) write_image( video.first->image(bind(PlayerVideo::force, _1, AV_PIX_FMT_RGB24), VIDEO_RANGE_FULL, false, true), String::compose("build/test/player_seek_test2_%1.png", i) ); - check_image(String::compose("test/data/player_seek_test2_%1.png", i), String::compose("build/test/player_seek_test2_%1.png", i), 14.08); + check_image(TestPaths::private_data() / String::compose("player_seek_test2_%1.png", i), String::compose("build/test/player_seek_test2_%1.png", i), 14.08); } }