From ce860ea3fc65c488b9ea5e93efbf521dae9dc7dd Mon Sep 17 00:00:00 2001 From: Yuheng Long Date: Wed, 14 Aug 2013 10:17:25 -0700 Subject: Fixed the problems in task and steering. BUG=None TEST=unit testings for the pipeline stage, pipeline workers, generation, steering, task, flag, hill climbing and genetic algorithm. Change-Id: Ib34ef05518124b6ffa03f0c35795109e22581b89 Reviewed-on: https://gerrit-int.chromium.org/43002 Reviewed-by: Luis Lozano Commit-Queue: Yuheng Long Tested-by: Yuheng Long --- bestflags/pipeline_process_test.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'bestflags/pipeline_process_test.py') diff --git a/bestflags/pipeline_process_test.py b/bestflags/pipeline_process_test.py index 989fd742..77d72db5 100644 --- a/bestflags/pipeline_process_test.py +++ b/bestflags/pipeline_process_test.py @@ -21,8 +21,10 @@ ERROR = -334 TEST_STAGE = -8 -def MockHelper(done_dict, helper_queue, _, result_queue): +def MockHelper(stage, done_dict, helper_queue, _, result_queue): """This method echos input to the output.""" + + assert stage == TEST_STAGE while True: if not helper_queue.empty(): task = helper_queue.get() @@ -37,7 +39,8 @@ def MockHelper(done_dict, helper_queue, _, result_queue): result_queue.put(('helper', task.GetIdentifier(TEST_STAGE))) -def MockWorker(task, _, result_queue): +def MockWorker(stage, task, _, result_queue): + assert stage == TEST_STAGE result_queue.put(('worker', task.GetIdentifier(TEST_STAGE))) -- cgit v1.2.3