Merge.
[dcpomatic.git] / test / test.cc
index e636b7b525118ebd7bdc6a9f27d44ffeaf2e550a..5dd591ddcc7ab2ad10d3ec8d47f46ced0c30d89b 100644 (file)
@@ -143,7 +143,7 @@ check_audio_file (boost::filesystem::path ref, boost::filesystem::path check)
                BOOST_CHECK_EQUAL (r, this_time);
 
                for (sf_count_t i = 0; i < this_time; ++i) {
-                       BOOST_CHECK (fabs (ref_buffer[i] - check_buffer[i]) <= 65536);
+                       BOOST_REQUIRE (fabs (ref_buffer[i] - check_buffer[i]) <= 65536);
                }
 
                N -= this_time;
@@ -210,7 +210,6 @@ check_dcp (boost::filesystem::path ref, boost::filesystem::path check)
        options.max_std_dev_pixel_error = 5;
        options.max_audio_sample_error = 255;
        options.cpl_annotation_texts_can_differ = true;
-       options.mxf_filenames_can_differ = true;
        options.reel_annotation_texts_can_differ = true;
        options.reel_hashes_can_differ = true;
        
@@ -288,6 +287,9 @@ wait_for_jobs ()
        while (jm->work_to_do ()) {
                signal_manager->ui_idle ();
        }
+
+       cout << "Waiting for jobs: all finished; errors=" << jm->errors() << ".\n";
+       
        if (jm->errors ()) {
                int N = 0;
                for (list<shared_ptr<Job> >::iterator i = jm->_jobs.begin(); i != jm->_jobs.end(); ++i) {
@@ -308,8 +310,12 @@ wait_for_jobs ()
 
        signal_manager->ui_idle ();
 
-       /* Discard all jobs so we lose any we just reported an error in */
-       JobManager::drop ();
+       if (jm->errors ()) {
+               cout << "Dropping JobManager\n";
+               JobManager::drop ();
+       } else {
+               cout << "Not dropping JobManager\n";
+       }
 }
 
 void