Fix how the jobs are consumed

In init mode, we don't need to compare. So we have to check the mode and
then decide if a comparison or the next test execution is needed.
This commit is contained in:
Daniel Zaoui 2018-06-07 12:46:32 +03:00
parent 4d0579aa15
commit 08a6abd881
1 changed files with 12 additions and 7 deletions

View File

@ -290,6 +290,8 @@ _job_compare(void *data)
{
_run_test_compare(data);
_running_jobs--;
_job_consume();
/* If all jobs are done. */
if (!_running_jobs) ecore_main_loop_quit();
}
@ -305,13 +307,16 @@ _job_deleted_cb(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
_errors = eina_list_append(_errors, ent);
}
if (_mode == RUN_PLAY)
{
ecore_job_add(_job_compare, ent);
}
else
{
_running_jobs--;
_job_consume();
/* If all jobs are done. */
if (!_running_jobs) return ECORE_CALLBACK_DONE;
if (!_running_jobs) ecore_main_loop_quit();
}
return ECORE_CALLBACK_RENEW;
}