diff options
author | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2011-12-12 17:29:20 +0000 |
---|---|---|
committer | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2011-12-12 17:29:20 +0000 |
commit | 9e3b4ecd130fbc1c033855f1694c2b081f7e80ba (patch) | |
tree | bec89e9b885d6ee15e756cded0b2bdf61cf28db5 /morph | |
parent | 290a5d3307aa8b1bf26492617a15a941ca2b5da8 (diff) | |
download | morph-9e3b4ecd130fbc1c033855f1694c2b081f7e80ba.tar.gz |
implement test subcommand properly
Diffstat (limited to 'morph')
-rwxr-xr-x | morph | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -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.''' |