Move some test references into test-private.
authorCarl Hetherington <cth@carlh.net>
Sun, 29 Nov 2020 21:49:05 +0000 (22:49 +0100)
committerCarl Hetherington <cth@carlh.net>
Sun, 29 Nov 2020 21:49:05 +0000 (22:49 +0100)
test/content_test.cc
test/data
test/image_proxy_test.cc
test/image_test.cc
test/no_use_video_test.cc
test/player_test.cc

index 5409ec37ddbfdbf7c766e2b9c74d35e18a4fa1f6..23fb23865bfe71da1f8f0022bc53e1ba348b30ef 100644 (file)
@@ -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
index b5863343b9157102144f70aa4269ec03922692fe..1458a693f163e82ffb8d2b81b9abdad1fb8acb1e 160000 (submodule)
--- a/test/data
+++ b/test/data
@@ -1 +1 @@
-Subproject commit b5863343b9157102144f70aa4269ec03922692fe
+Subproject commit 1458a693f163e82ffb8d2b81b9abdad1fb8acb1e
index 0999d4b1064a164e4a1c82623a00336ecede2e3a..73ab8cb4c426869f181290850e5675294a162109 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "lib/ffmpeg_image_proxy.h"
 #include "lib/j2k_image_proxy.h"
+#include "test.h"
 #include <boost/shared_ptr.hpp>
 #include <boost/test/unit_test.hpp>
 
@@ -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)
index 9c1c7457e774974073e1abe85b2b9b26018d35b1..3d599b82de84405adfd5136f6b3a188115baae9c 100644 (file)
@@ -284,7 +284,7 @@ BOOST_AUTO_TEST_CASE (crop_scale_window_test2)
 
 BOOST_AUTO_TEST_CASE (crop_scale_window_test3)
 {
-       shared_ptr<FFmpegImageProxy> proxy(new FFmpegImageProxy("test/data/player_seek_test_0.png", VIDEO_RANGE_FULL));
+       shared_ptr<FFmpegImageProxy> proxy(new FFmpegImageProxy(TestPaths::private_data() / "player_seek_test_0.png", VIDEO_RANGE_FULL));
        shared_ptr<Image> xyz = proxy->image().image->convert_pixel_format(dcp::YUV_TO_RGB_REC709, AV_PIX_FMT_RGB24, true, false);
        shared_ptr<Image> 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<FFmpegImageProxy> proxy(new FFmpegImageProxy("test/data/player_seek_test_0.png", VIDEO_RANGE_FULL));
+       shared_ptr<FFmpegImageProxy> proxy(new FFmpegImageProxy(TestPaths::private_data() / "player_seek_test_0.png", VIDEO_RANGE_FULL));
        shared_ptr<Image> xyz = proxy->image().image->convert_pixel_format(dcp::YUV_TO_RGB_REC709, AV_PIX_FMT_RGB24, true, false);
        shared_ptr<Image> 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<FFmpegImageProxy> proxy(new FFmpegImageProxy("test/data/player_seek_test_0.png", VIDEO_RANGE_FULL));
+       shared_ptr<FFmpegImageProxy> proxy(new FFmpegImageProxy(TestPaths::private_data() / "player_seek_test_0.png", VIDEO_RANGE_FULL));
        shared_ptr<Image> xyz = proxy->image().image->convert_pixel_format(dcp::YUV_TO_RGB_REC709, AV_PIX_FMT_XYZ12LE, true, false);
        shared_ptr<Image> 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<FFmpegImageProxy> proxy(new FFmpegImageProxy("test/data/player_seek_test_0.png", VIDEO_RANGE_FULL));
+       shared_ptr<FFmpegImageProxy> proxy(new FFmpegImageProxy(TestPaths::private_data() / "player_seek_test_0.png", VIDEO_RANGE_FULL));
        shared_ptr<Image> xyz = proxy->image().image->convert_pixel_format(dcp::YUV_TO_RGB_REC709, AV_PIX_FMT_XYZ12LE, true, false);
        shared_ptr<Image> 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
index c5473ae7c559e40307874afb1792aee663b8f201..46b7e2aef8954f05147d4c0c593c149e4ef3d7cf 100644 (file)
@@ -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);
 }
 
 
index f44806d68e673ed9f501897d0e84761162039b99..15fb4161deb1b3fa7e9e34b784d14b42b59b89ef 100644 (file)
@@ -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);
        }
 }