summaryrefslogtreecommitdiff
path: root/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'util.py')
-rw-r--r--util.py19
1 files changed, 17 insertions, 2 deletions
diff --git a/util.py b/util.py
index 15c9c72..390e04c 100644
--- a/util.py
+++ b/util.py
@@ -25,11 +25,26 @@ import config
def run_morph(args, **kwargs):
- '''Run Morph on the current machine.'''
+ '''Run Morph on the current machine.
+
+ This is not quite compatible with the run_morph() shell function inside
+ Morph's Yarn's because these tests require connectivity to an actual Trove
+ and an actual VM host and therefore it's quite a different setup to the
+ self-contained Morph test suite.
+
+ '''
morph_command = config.MORPH_COMMAND
if isinstance(morph_command, str):
- morph_command = morph_command.split(' ')
+ if ' ' in morph_command:
+ morph_command = morph_command.split(' ')
+ else:
+ morph_command = [morph_command]
+
+ if config.log_dir is not None:
+ morph_command += ['--log', os.path.join(config.log_dir, 'morph.log')]
+
cmd = morph_command + args
+
if config.VERBOSE:
print ' '.join(cmd)
if 'stdout' not in kwargs: