diff options
author | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2011-12-12 17:06:39 +0000 |
---|---|---|
committer | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2011-12-12 17:06:39 +0000 |
commit | 9dbb2496767be6af8388168dc211d435b4191bd2 (patch) | |
tree | 45a53d18fe0b97c97a7129ddcf7c6568bbf9c169 /morph | |
parent | 410c58c37931f17fd68c1a6fafa192b56ae3e978 (diff) | |
download | morph-9dbb2496767be6af8388168dc211d435b4191bd2.tar.gz |
make a test subcommand that builds and gets the morph, image filename
Diffstat (limited to 'morph')
-rwxr-xr-x | morph | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -82,11 +82,12 @@ class Morph(cliapp.Application): if not os.path.exists(self.settings['cachedir']) and os.getuid() != 0: os.mkdir(self.settings['cachedir']) + ret = [] while len(args) >= 3: repo, ref, filename = args[:3] args = args[3:] self.msg('Building %s - %s - %s' % (repo, ref, filename)) - builder.build(repo, ref, filename) + ret.append(builder.build(repo, ref, filename)) # we may not have permission to tempdir.remove() ex = morphlib.execute.Execute('.', lambda msg: None) @@ -94,6 +95,8 @@ class Morph(cliapp.Application): if args: raise cliapp.AppException('Extra args on command line: %s' % args) + + return ret def cmd_testsysimg(self, args): '''Run tests for a built system image. @@ -126,6 +129,16 @@ class Morph(cliapp.Application): story.run() self.msg('Finished OK.') + def cmd_test(self, args): + '''Build and test a system morphology. + + The tests are specified in the morphology's test-stories field. + + ''' + + for x in self.cmd_build(args): + print x + def msg(self, msg): '''Show a message to the user about what is going on.''' logging.debug(msg) |