diff options
Diffstat (limited to 'morph')
-rwxr-xr-x | morph | 61 |
1 files changed, 0 insertions, 61 deletions
@@ -80,16 +80,6 @@ class Morph(cliapp.Application): 'build things in a staging chroot ' '(require real root to use)') - self.settings.boolean(['test-console'], - 'show what the system outputs on the serial ' - 'console during tests') - self.settings.integer(['test-timeout'], - 'abort test if system doesn\'t produce ' - 'expected output in TIMEOUT seconds ' - '(default: %default)', - metavar='TIMEOUT', - default=10) - self.settings.string_list(['worker'], 'IP or host name of a machine to distribute ' 'build work to', @@ -152,57 +142,6 @@ class Morph(cliapp.Application): return ret - def cmd_testsysimg(self, args): - '''Run tests for a built system image. - - Command line arguments are the filename of the system image, - and the filenames of the Python modules that contain the test - "stories". Each module must have a variable called "story", - which is a list of tuples. Each tuple is either two strings - (one to send, the other a regular expression for what is expected - in return), or two strings and a timeout in seconds. - - testsysimg runs the image under KVM, and accesses it via a - serial console, and runs the test stories, one by one. - - ''' - - if not args: - raise cliapp.AppException('Missing command line arguments. ' - 'Run with --help to see usage.') - - system = morphlib.tester.KvmSystem(args[0], - verbose=self.settings['test-console'], - timeout=self.settings['test-timeout']) - - for filename in args[1:]: - self.msg('Running %s' % filename) - module = morphlib.tester.load_module(filename) - story_steps = getattr(module, 'story') - story = morphlib.tester.TestStory(system, story_steps, self.msg) - 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 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 cmd_show_dependencies(self, args): '''Dumps the dependency tree of all input morphologies.''' |