From 9e3b4ecd130fbc1c033855f1694c2b081f7e80ba Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Mon, 12 Dec 2011 17:29:20 +0000 Subject: implement test subcommand properly --- morph | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'morph') 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.''' -- cgit v1.2.1