summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-05-20 17:05:16 +0200
committerCarl Hetherington <cth@carlh.net>2024-05-20 17:05:16 +0200
commit2d5c461cbc1ebef67d0afdcb1dd2272dad58c22b (patch)
tree7ff699aaa61a5970b06dabd8e245cfb3abc767bc /test
parent8366fcb9b393563a44255a445b5784e468016077 (diff)
Clean up some more tests.
Diffstat (limited to 'test')
-rw-r--r--test/content_test.cc6
-rw-r--r--test/ffmpeg_encoder_test.cc24
-rw-r--r--test/film_metadata_test.cc6
3 files changed, 31 insertions, 5 deletions
diff --git a/test/content_test.cc b/test/content_test.cc
index d5a13885d..3df2df470 100644
--- a/test/content_test.cc
+++ b/test/content_test.cc
@@ -157,10 +157,14 @@ BOOST_AUTO_TEST_CASE (content_test6)
/** Reel length error when making the test for #1833 */
BOOST_AUTO_TEST_CASE (content_test7)
{
+ Cleanup cl;
+
auto content = content_factory(TestPaths::private_data() / "clapperboard.mp4");
- auto film = new_test_film2 ("content_test7", content);
+ auto film = new_test_film2("content_test7", content, &cl);
content[0]->audio->set_delay(-1000);
make_and_verify_dcp (film, { dcp::VerificationNote::Code::INVALID_PICTURE_FRAME_RATE_FOR_2K });
+
+ cl.run();
}
diff --git a/test/ffmpeg_encoder_test.cc b/test/ffmpeg_encoder_test.cc
index 67bc0ce1e..3690bc3fc 100644
--- a/test/ffmpeg_encoder_test.cc
+++ b/test/ffmpeg_encoder_test.cc
@@ -122,6 +122,10 @@ BOOST_AUTO_TEST_CASE (ffmpeg_encoder_prores_test4)
/** Still image -> Prores */
BOOST_AUTO_TEST_CASE (ffmpeg_encoder_prores_test5)
{
+ boost::filesystem::path const output = "build/test/ffmpeg_encoder_prores_test5.mov";
+ Cleanup cl;
+ cl.add(output);
+
auto film = new_test_film ("ffmpeg_encoder_prores_test5");
film->set_name ("ffmpeg_encoder_prores_test5");
auto c = make_shared<ImageContent>(TestPaths::private_data() / "bbc405.png");
@@ -135,8 +139,10 @@ BOOST_AUTO_TEST_CASE (ffmpeg_encoder_prores_test5)
film->write_metadata ();
auto job = make_shared<TranscodeJob>(film, TranscodeJob::ChangedBehaviour::IGNORE);
- FFmpegFilmEncoder encoder(film, job, "build/test/ffmpeg_encoder_prores_test5.mov", ExportFormat::PRORES_HQ, false, false, false, 23);
+ FFmpegFilmEncoder encoder(film, job, output, ExportFormat::PRORES_HQ, false, false, false, 23);
encoder.go ();
+
+ cl.run();
}
@@ -165,6 +171,10 @@ BOOST_AUTO_TEST_CASE (ffmpeg_encoder_prores_test6)
/** Video + subs -> Prores */
BOOST_AUTO_TEST_CASE (ffmpeg_encoder_prores_test7)
{
+ boost::filesystem::path const output = "build/test/ffmpeg_encoder_prores_test7.mov";
+ Cleanup cl;
+ cl.add(output);
+
auto film = new_test_film ("ffmpeg_encoder_prores_test7");
film->set_name ("ffmpeg_encoder_prores_test7");
film->set_container (Ratio::from_id ("185"));
@@ -182,8 +192,10 @@ BOOST_AUTO_TEST_CASE (ffmpeg_encoder_prores_test7)
s->only_text()->set_effect_colour (dcp::Colour (0, 255, 255));
auto job = make_shared<TranscodeJob>(film, TranscodeJob::ChangedBehaviour::IGNORE);
- FFmpegFilmEncoder encoder(film, job, "build/test/ffmpeg_encoder_prores_test7.mov", ExportFormat::PRORES_HQ, false, false, false, 23);
+ FFmpegFilmEncoder encoder(film, job, output, ExportFormat::PRORES_HQ, false, false, false, 23);
encoder.go ();
+
+ cl.run();
}
@@ -342,12 +354,18 @@ BOOST_AUTO_TEST_CASE (ffmpeg_encoder_h264_test6)
/** Test export of a 3D DCP in a 2D project */
BOOST_AUTO_TEST_CASE (ffmpeg_encoder_3d_dcp_to_h264)
{
+ boost::filesystem::path const output = "build/test/ffmpeg_encoder_3d_dcp_to_h264.mp4";
+ Cleanup cl;
+ cl.add(output);
+
auto dcp = make_shared<DCPContent>(TestPaths::private_data() / "xm");
auto film2 = new_test_film2 ("ffmpeg_encoder_3d_dcp_to_h264_export", {dcp});
auto job = make_shared<TranscodeJob>(film2, TranscodeJob::ChangedBehaviour::IGNORE);
- FFmpegFilmEncoder encoder(film2, job, "build/test/ffmpeg_encoder_3d_dcp_to_h264.mp4", ExportFormat::H264_AAC, true, false, false, 23);
+ FFmpegFilmEncoder encoder(film2, job, output, ExportFormat::H264_AAC, true, false, false, 23);
encoder.go ();
+
+ cl.run();
}
diff --git a/test/film_metadata_test.cc b/test/film_metadata_test.cc
index c52df6d72..0a522fbee 100644
--- a/test/film_metadata_test.cc
+++ b/test/film_metadata_test.cc
@@ -84,9 +84,11 @@ BOOST_AUTO_TEST_CASE (film_metadata_test)
/** Check a bug where <Content> tags with multiple <Text>s would fail to load */
BOOST_AUTO_TEST_CASE (multiple_text_nodes_are_allowed)
{
+ Cleanup cl;
+
auto subs = content_factory("test/data/15s.srt")[0];
auto caps = content_factory("test/data/15s.srt")[0];
- auto film = new_test_film2("multiple_text_nodes_are_allowed1", { subs, caps });
+ auto film = new_test_film2("multiple_text_nodes_are_allowed1", { subs, caps }, &cl);
caps->only_text()->set_type(TextType::CLOSED_CAPTION);
make_and_verify_dcp (
film,
@@ -102,6 +104,8 @@ BOOST_AUTO_TEST_CASE (multiple_text_nodes_are_allowed)
auto test = make_shared<Film>(boost::filesystem::path("build/test/multiple_text_nodes_are_allowed2"));
test->read_metadata();
+
+ cl.run();
}