diff options
Diffstat (limited to 'lib/spack/spack/cmd/install.py')
-rw-r--r-- | lib/spack/spack/cmd/install.py | 68 |
1 files changed, 6 insertions, 62 deletions
diff --git a/lib/spack/spack/cmd/install.py b/lib/spack/spack/cmd/install.py index c8673b5330..3b5954b1ad 100644 --- a/lib/spack/spack/cmd/install.py +++ b/lib/spack/spack/cmd/install.py @@ -167,65 +167,8 @@ packages. If neither are chosen, don't run tests for any packages.""" action='store_true', help="Show usage instructions for CDash reporting" ) - subparser.add_argument( - '-y', '--yes-to-all', - action='store_true', - dest='yes_to_all', - help="""assume "yes" is the answer to every confirmation request. -To run completely non-interactively, also specify '--no-checksum'.""" - ) - add_cdash_args(subparser, False) - arguments.add_common_arguments(subparser, ['spec']) - - -def add_cdash_args(subparser, add_help): - cdash_help = {} - if add_help: - cdash_help['upload-url'] = "CDash URL where reports will be uploaded" - cdash_help['build'] = """The name of the build that will be reported to CDash. -Defaults to spec of the package to install.""" - cdash_help['site'] = """The site name that will be reported to CDash. -Defaults to current system hostname.""" - cdash_help['track'] = """Results will be reported to this group on CDash. -Defaults to Experimental.""" - cdash_help['buildstamp'] = """Instead of letting the CDash reporter prepare the -buildstamp which, when combined with build name, site and project, -uniquely identifies the build, provide this argument to identify -the build yourself. Format: %%Y%%m%%d-%%H%%M-[cdash-track]""" - else: - cdash_help['upload-url'] = argparse.SUPPRESS - cdash_help['build'] = argparse.SUPPRESS - cdash_help['site'] = argparse.SUPPRESS - cdash_help['track'] = argparse.SUPPRESS - cdash_help['buildstamp'] = argparse.SUPPRESS - - subparser.add_argument( - '--cdash-upload-url', - default=None, - help=cdash_help['upload-url'] - ) - subparser.add_argument( - '--cdash-build', - default=None, - help=cdash_help['build'] - ) - subparser.add_argument( - '--cdash-site', - default=None, - help=cdash_help['site'] - ) - - cdash_subgroup = subparser.add_mutually_exclusive_group() - cdash_subgroup.add_argument( - '--cdash-track', - default='Experimental', - help=cdash_help['track'] - ) - cdash_subgroup.add_argument( - '--cdash-buildstamp', - default=None, - help=cdash_help['buildstamp'] - ) + arguments.add_cdash_args(subparser, False) + arguments.add_common_arguments(subparser, ['yes_to_all', 'spec']) def default_log_file(spec): @@ -283,11 +226,12 @@ environment variables: SPACK_CDASH_AUTH_TOKEN authentication token to present to CDash ''')) - add_cdash_args(parser, True) + arguments.add_cdash_args(parser, True) parser.print_help() return - reporter = spack.report.collect_info(args.log_format, args) + reporter = spack.report.collect_info( + spack.package.PackageInstaller, '_install_task', args.log_format, args) if args.log_file: reporter.filename = args.log_file @@ -383,7 +327,7 @@ environment variables: if not args.log_file and not reporter.filename: reporter.filename = default_log_file(specs[0]) reporter.specs = specs - with reporter: + with reporter('build'): if args.overwrite: installed = list(filter(lambda x: x, |