pmb ci: add --fast argument
Make it easy to only run the fast tests. Reviewed-by: Luca Weiss <luca@z3ntu.xyz> Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20221111072354.3431-3-ollieparanoid@postmarketos.org%3E
This commit is contained in:
parent
3fd22104a8
commit
315621d5b8
|
@ -656,6 +656,11 @@ def ci(args):
|
||||||
elif args.all:
|
elif args.all:
|
||||||
scripts_selected = scripts_available
|
scripts_selected = scripts_available
|
||||||
|
|
||||||
|
if args.fast:
|
||||||
|
for script, script_data in scripts_available.items():
|
||||||
|
if "slow" not in script_data["options"]:
|
||||||
|
scripts_selected[script] = script_data
|
||||||
|
|
||||||
if not pmb.helpers.git.clean_worktree(args, topdir):
|
if not pmb.helpers.git.clean_worktree(args, topdir):
|
||||||
logging.warning("WARNING: this git repository has uncommitted changes")
|
logging.warning("WARNING: this git repository has uncommitted changes")
|
||||||
|
|
||||||
|
|
|
@ -550,8 +550,11 @@ def arguments_ci(subparser):
|
||||||
ret = subparser.add_parser("ci", help="run continuous integration scripts"
|
ret = subparser.add_parser("ci", help="run continuous integration scripts"
|
||||||
" locally of git repo in current"
|
" locally of git repo in current"
|
||||||
" directory")
|
" directory")
|
||||||
ret.add_argument("-a", "--all", action="store_true",
|
script_args = ret.add_mutually_exclusive_group()
|
||||||
help="run all scripts")
|
script_args.add_argument("-a", "--all", action="store_true",
|
||||||
|
help="run all scripts")
|
||||||
|
script_args.add_argument("-f", "--fast", action="store_true",
|
||||||
|
help="run fast scripts only")
|
||||||
ret.add_argument("scripts", nargs="*", metavar="script",
|
ret.add_argument("scripts", nargs="*", metavar="script",
|
||||||
help="name of the CI script to run, depending on the git"
|
help="name of the CI script to run, depending on the git"
|
||||||
" repository")
|
" repository")
|
||||||
|
|
Loading…
Reference in New Issue