summaryrefslogtreecommitdiff
path: root/morph
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2011-12-12 17:29:20 +0000
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2011-12-12 17:29:20 +0000
commit9e3b4ecd130fbc1c033855f1694c2b081f7e80ba (patch)
treebec89e9b885d6ee15e756cded0b2bdf61cf28db5 /morph
parent290a5d3307aa8b1bf26492617a15a941ca2b5da8 (diff)
downloadmorph-9e3b4ecd130fbc1c033855f1694c2b081f7e80ba.tar.gz
implement test subcommand properly
Diffstat (limited to 'morph')
-rwxr-xr-xmorph14
1 files changed, 12 insertions, 2 deletions
diff --git a/morph b/morph
index 2c4d5031..742879c5 100755
--- a/morph
+++ b/morph
@@ -136,8 +136,18 @@ class Morph(cliapp.Application):
'''
- for x in self.cmd_build(args):
- print x
+ for morph, built in self.cmd_build(args):
+ if morph.kind == 'system':
+ self.msg('running tests on system %s' % morph.name)
+ assert len(built) == 1
+ image_filename = built.values()[0]
+ morphdir = os.path.dirname(morph.filename)
+ stories = [os.path.join(morphdir, x)
+ for x in morph.test_stories]
+ self.cmd_testsysimg([image_filename] + stories)
+ else:
+ self.msg('not testing %s %s (not a system)' %
+ (morph.kind, morph.name))
def msg(self, msg):
'''Show a message to the user about what is going on.'''