- def hook_m_60(e):
- e.log.info('Here we run test pipeline')
- tests = e['TESTS'].split()
- for t in tests:
- e.log.info('Running test %s' % t)
- e.log.user.info('TEST %s ...' % t)
- with e.config.parse("TEST='"+t+"'", level=70, source='<dummy tasktype>'):
- e.test_pipe.run(e=e)
- ## The old (but proper, as the above is vulnerable to injections by including "'" !) way was:
- #op = moe.config.Operation('SET', None, moe.config.ConfigExpression([t]), level=70, source='<dummy tasktype>')
- #testvar = e.config.lookup('TEST')
- ## Add and remove operation setting 'TEST="..."'
- #testvar.add_operation(op)
- #e.test_pipe.run(e=e)
- #testvar.remove_operation(op)
-
- e.main_pipe.insert(60, 'dummy tasktype hook_m_60', hook_m_60)