def run_mriya(datadir): executor = Executor() jobs = [] for script in SQL_SCRIPTS: jobs.append('--job-file') jobs.append(script) cmdl = [ 'python', 'mriya_dmt.py', '--conf-file', 'test-config.ini', '--src-name', 'foo1', '--dst-name', 'foo2', '--datadir', datadir ] cmdl.extend(jobs) cmd = ' '.join(cmdl) print cmd executor.execute('test_dmt', cmd, input_data=None, output_pipe=True) executor.wait_for_complete()
def test_3(): executor = Executor() executor.execute('t1', 'echo "test1" && sleep 1 && echo first done') executor.execute('t2', 'echo "test2" && echo first done') executor.wait_for_complete()