~ubuntu-branches/ubuntu/wily/autopkgtest/wily

« back to all changes in this revision

Viewing changes to lib/adt_run_args.py

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2015-05-13 14:45:43 UTC
  • mfrom: (110.2.17 sid)
  • Revision ID: package-import@ubuntu.com-20150513144543-3d7nhxjqlnqzdmau
Tags: 3.14.1
* Go back to using the backgrounded reboot command as we had before 3.14.
  Just calling "reboot" is prone to hangs and timeouts in case reboot is too
  fast and shuts down our communication channel.
* Fix --override-control option in adt-run(1). (LP: #1453495)
* Fail with an error if --override-control file does not exist.
  (LP: #1453503)
* ssh-setup/snappy: Add -b/--show-boot option to direct boot and console
  messages to stdout. (LP: #1453154)
* adt-virt-qemu.1: Document --show-boot option.
* Add test case for using a @ command line include file for a virt runner.
* Strip leading and trailing space from argument lines in '@' included
  command line argument files. (LP: #1453498)

Show diffs side-by-side

added added

removed removed

Lines of Context:
103
103
built_binaries = None
104
104
 
105
105
 
 
106
class ArgumentParser(argparse.ArgumentParser):
 
107
    '''autopkgtest ArgumentParser
 
108
 
 
109
    It enables include files with '@' and trims whitespace from their lines.
 
110
    '''
 
111
    def __init__(self, **kwargs):
 
112
        super(ArgumentParser, self).__init__(fromfile_prefix_chars='@',
 
113
                                             **kwargs)
 
114
 
 
115
    def convert_arg_line_to_args(self, arg_line):
 
116
        return [arg_line.strip()]
 
117
 
 
118
 
106
119
class ActionArg(argparse.Action):
107
120
    def __call__(self, parser, args, value, option_string):
108
121
        global actions, built_binaries
320
333
        help='show this help message and exit')
321
334
 
322
335
    # first, expand argument files
323
 
    file_parser = argparse.ArgumentParser(fromfile_prefix_chars='@',
324
 
                                          add_help=False)
 
336
    file_parser = ArgumentParser(add_help=False)
325
337
    arglist = file_parser.parse_known_args(arglist)[1]
326
338
 
327
339
    # split off virt-server args