From: Sage Weil Date: Sun, 10 Mar 2013 05:20:43 +0000 (-0800) Subject: mpi: substitute $TESTDIR X-Git-Tag: 1.1.0~2263 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=5df43e64abc5620ac41d4f03b09efa98fdd9166d;p=teuthology.git mpi: substitute $TESTDIR Signed-off-by: Sage Weil --- diff --git a/teuthology/task/mpi.py b/teuthology/task/mpi.py index b6e760c4d9..773ab7645a 100644 --- a/teuthology/task/mpi.py +++ b/teuthology/task/mpi.py @@ -55,7 +55,10 @@ def task(ctx, config): """ assert isinstance(config, dict), 'task mpi got invalid config' assert 'exec' in config, 'task mpi got invalid config, missing exec' - mpiexec = config['exec'] + + testdir = teuthology.get_testdir(ctx) + + mpiexec = config['exec'].replace('$TESTDIR', testdir) hosts = [] remotes = [] master_remote = None @@ -85,12 +88,10 @@ def task(ctx, config): workdir = [] if 'workdir' in config: - workdir = ['-wdir', config['workdir'] ] + workdir = ['-wdir', config['workdir'].replace('$TESTDIR', testdir) ] log.info('mpi rank 0 is: {name}'.format(name=master_remote.name)) - testdir = teuthology.get_testdir(ctx) - # write out the mpi hosts file log.info('mpi nodes: [%s]' % (', '.join(hosts))) teuthology.write_file(remote=master_remote,