From 08a6abd881c2abb274843c4de7692bd1cdbd18a7 Mon Sep 17 00:00:00 2001 From: Daniel Zaoui Date: Thu, 7 Jun 2018 12:46:32 +0300 Subject: [PATCH] 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. --- src/bin/exactness.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/bin/exactness.c b/src/bin/exactness.c index b557a4e..c8ac444 100644 --- a/src/bin/exactness.c +++ b/src/bin/exactness.c @@ -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); } - ecore_job_add(_job_compare, ent); - _running_jobs--; - - _job_consume(); - - /* If all jobs are done. */ - if (!_running_jobs) return ECORE_CALLBACK_DONE; + if (_mode == RUN_PLAY) + { + ecore_job_add(_job_compare, ent); + } + else + { + _running_jobs--; + _job_consume(); + if (!_running_jobs) ecore_main_loop_quit(); + } return ECORE_CALLBACK_RENEW; }