diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-07-15 13:51:19 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-07-15 13:51:19 +0100 |
| commit | bbd20953701383dddc4c45d2ab317d55845d8b89 (patch) | |
| tree | 24dd18fa75c8d9096e5763bd631bea6b5e78b950 | |
| parent | c73f2429ce94d29f06214143f1ecee96b7c62ae6 (diff) | |
Use wait_for_jobs more.
| -rw-r--r-- | test/black_fill_test.cc | 2 | ||||
| -rw-r--r-- | test/ffmpeg_dcp_test.cc | 13 | ||||
| -rw-r--r-- | test/scaling_test.cc | 7 |
3 files changed, 6 insertions, 16 deletions
diff --git a/test/black_fill_test.cc b/test/black_fill_test.cc index 60b215ffb..51ce605f8 100644 --- a/test/black_fill_test.cc +++ b/test/black_fill_test.cc @@ -39,7 +39,7 @@ BOOST_AUTO_TEST_CASE (black_fill_test) film->examine_and_add_content (contentA); film->examine_and_add_content (contentB); - while (JobManager::instance()->work_to_do ()) {} + wait_for_jobs (); contentA->set_video_length (3); contentA->set_start (film->video_frames_to_time (2)); diff --git a/test/ffmpeg_dcp_test.cc b/test/ffmpeg_dcp_test.cc index 06cb56e7d..946bccbb8 100644 --- a/test/ffmpeg_dcp_test.cc +++ b/test/ffmpeg_dcp_test.cc @@ -29,23 +29,14 @@ BOOST_AUTO_TEST_CASE (ffmpeg_dcp_test) c->set_ratio (Ratio::from_id ("185")); film->examine_and_add_content (c); - /* Wait for the examine to finish */ - while (JobManager::instance()->work_to_do ()) { - dcpomatic_sleep (1); - } - - BOOST_CHECK_EQUAL (JobManager::instance()->errors(), false); + wait_for_jobs (); film->set_container (Ratio::from_id ("185")); film->set_dcp_content_type (DCPContentType::from_pretty_name ("Test")); film->make_dcp (); film->write_metadata (); - while (JobManager::instance()->work_to_do ()) { - dcpomatic_sleep (1); - } - - BOOST_CHECK_EQUAL (JobManager::instance()->errors(), false); + wait_for_jobs (); } /** Test Film::have_dcp(). Requires the output from ffmpeg_dcp_test above */ diff --git a/test/scaling_test.cc b/test/scaling_test.cc index ab64928ce..fd700fbb9 100644 --- a/test/scaling_test.cc +++ b/test/scaling_test.cc @@ -31,9 +31,7 @@ static void scaling_test_for (shared_ptr<Film> film, shared_ptr<VideoContent> co film->set_container (Ratio::from_id (container)); film->make_dcp (); - while (JobManager::instance()->work_to_do ()) {} - - BOOST_CHECK (!JobManager::instance()->errors()); + wait_for_jobs (); boost::filesystem::path ref; ref = "test"; @@ -57,7 +55,8 @@ BOOST_AUTO_TEST_CASE (scaling_test) shared_ptr<ImageMagickContent> imc (new ImageMagickContent (film, "test/data/simple_testcard_640x480.png")); film->examine_and_add_content (imc); - while (JobManager::instance()->work_to_do ()) {} + + wait_for_jobs (); imc->set_video_length (1); |
