mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-02-15 16:28:20 +00:00
run-autopkgtest: Require --trigger argument, improve help
This commit is contained in:
parent
0e3434ddbd
commit
02c4e76c64
@ -24,13 +24,23 @@ def parse_args():
|
|||||||
help='Only run test(s) on given architecture name(s). '
|
help='Only run test(s) on given architecture name(s). '
|
||||||
'Can be specified multiple times (default: all).')
|
'Can be specified multiple times (default: all).')
|
||||||
parser.add_argument('--trigger', action='append', default=[],
|
parser.add_argument('--trigger', action='append', default=[],
|
||||||
|
metavar='SOURCE/VERSION', required=True,
|
||||||
help='Add triggering package to request. '
|
help='Add triggering package to request. '
|
||||||
'Can be specified multiple times.')
|
'Can be specified multiple times.')
|
||||||
parser.add_argument('--ppa', metavar='LPUSER/PPANAME',
|
parser.add_argument('--ppa', metavar='LPUSER/PPANAME',
|
||||||
help='Enable PPA for requested test(s)')
|
help='Enable PPA for requested test(s)')
|
||||||
parser.add_argument('package', nargs='+',
|
parser.add_argument('package', nargs='+',
|
||||||
help='Source package name(s) whose tests to run.')
|
help='Source package name(s) whose tests to run.')
|
||||||
return parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
# verify syntax of triggers
|
||||||
|
for t in args.trigger:
|
||||||
|
try:
|
||||||
|
(src, ver) = t.split('/')
|
||||||
|
except ValueError:
|
||||||
|
parser.error('Invalid trigger format "%s", must be "sourcepkg/version"' % t)
|
||||||
|
|
||||||
|
return args
|
||||||
|
|
||||||
|
|
||||||
def parse_config(config_file):
|
def parse_config(config_file):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user