X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=t%2Fmoe%2Ftasktypes%2Fdummy.py;h=b8fa942fe07db68e81bbe23231875dcc4f602f67;hb=ef64f1097b0b3d210ee24f08e91c352865cac59c;hp=c8b7c73b232b9b70cfc34f99e16a5283a470c13f;hpb=68ef17dd956952f2a559bf9250628aa366884521;p=moe.git diff --git a/t/moe/tasktypes/dummy.py b/t/moe/tasktypes/dummy.py index c8b7c73..b8fa942 100644 --- a/t/moe/tasktypes/dummy.py +++ b/t/moe/tasktypes/dummy.py @@ -6,30 +6,19 @@ Adds several info-printing hooks to both pipelines. Runs the test pipeline for each TEST """ +import moe.config +import moe.testutils + def init(e): def hook_m_50(e): e.log.info('Here should be compiling') - e.main_pipe.insert(50, 'dummy tasktype hook_m_50', hook_m_50) - - def hook_m_60(e): - e.log.info('Here should be test pipeline running') - tests = e['TESTS'].split() - for t in tests: - e.log.info('Running test %s' % t) - e.log.user.info('TEST %s ...' % t) - - op = moe.config.Operation('SET', None, t, level=70, source='') - testvar = e.config.lookup('TEST') - # Add and remove operation setting 'TEST="..."' - testvar.add_operation(op) - e.test_pipeline.run() - testvar.remove_operation(op) + e.main_pipe.insert(50, hook_m_50) - e.main_pipe.insert(60, 'dummy tasktype hook_m_60', hook_m_60) + e.main_pipe.insert(60, moe.testutils.hook_run_tests, desc='Run testcases') def hook_t_30(e): e.log.info("Maybe we should do something? Nah...") - e.test_pipe.insert(30, 'dummy tasktype hook_t_30', hook_t_30) + e.test_pipe.insert(30, hook_t_30)