class TestJob : public Job
{
public:
- TestJob (shared_ptr<const FilmState> s, shared_ptr<const Options> o, Log* l, shared_ptr<Job> req)
- : Job (s, o, l, req)
+ TestJob (shared_ptr<const FilmState> s, Log* l, shared_ptr<Job> req)
+ : Job (s, l, req)
{
}
BOOST_AUTO_TEST_CASE (job_manager_test)
{
shared_ptr<const FilmState> s;
- shared_ptr<const Options> o;
FileLog log ("build/test/job_manager_test.log");
/* Single job, no dependency */
- shared_ptr<TestJob> a (new TestJob (s, o, &log, shared_ptr<Job> ()));
+ shared_ptr<TestJob> a (new TestJob (s, &log, shared_ptr<Job> ()));
JobManager::instance()->add (a);
dvdomatic_sleep (1);
BOOST_CHECK_EQUAL (a->finished_ok(), true);
/* Two jobs, dependency */
- a.reset (new TestJob (s, o, &log, shared_ptr<Job> ()));
- shared_ptr<TestJob> b (new TestJob (s, o, &log, a));
+ a.reset (new TestJob (s, &log, shared_ptr<Job> ()));
+ shared_ptr<TestJob> b (new TestJob (s, &log, a));
JobManager::instance()->add (a);
JobManager::instance()->add (b);
BOOST_CHECK_EQUAL (b->finished_ok(), true);
/* Two jobs, dependency, first fails */
- a.reset (new TestJob (s, o, &log, shared_ptr<Job> ()));
- b.reset (new TestJob (s, o, &log, a));
+ a.reset (new TestJob (s, &log, shared_ptr<Job> ()));
+ b.reset (new TestJob (s, &log, a));
JobManager::instance()->add (a);
JobManager::instance()->add (b);