diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/cmd/dev_build.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/spack/spack/cmd/dev_build.py b/lib/spack/spack/cmd/dev_build.py index 55f5d201a9..80878f5c76 100644 --- a/lib/spack/spack/cmd/dev_build.py +++ b/lib/spack/spack/cmd/dev_build.py @@ -39,6 +39,13 @@ def setup_parser(subparser): subparser.add_argument( '--drop-in', type=str, dest='shell', default=None, help="drop into a build environment in a new shell, e.g. bash, zsh") + subparser.add_argument( + '--test', default=None, + choices=['root', 'all'], + help="""If 'root' is chosen, run package tests during +installation for top-level packages (but skip tests for dependencies). +if 'all' is chosen, run package tests during installation for all +packages. If neither are chosen, don't run tests for any packages.""") arguments.add_common_arguments(subparser, ['spec']) stop_group = subparser.add_mutually_exclusive_group() @@ -91,7 +98,14 @@ def dev_build(self, args): if args.no_checksum: spack.config.set('config:checksum', False, scope='command_line') + tests = False + if args.test == 'all': + tests = True + elif args.test == 'root': + tests = [spec.name for spec in specs] + package.do_install( + tests=tests, make_jobs=args.jobs, keep_prefix=args.keep_prefix, install_deps=not args.ignore_deps, |