# Licensed under a 3-clause BSD style license - see LICENSE.rstfrom..importenvironmentfrom..benchmarksimportBenchmarksfrom..repoimportget_repofrom.importCommand,common_args
[docs]defsetup_arguments(cls,subparsers):parser=subparsers.add_parser("check",help="Import and check benchmark suite, but do not run benchmarks",description=""" This imports and checks basic validity of the benchmark suite, but does not run the benchmark target code""",)common_args.add_environment(parser,default_same=False)parser.set_defaults(func=cls.run_from_args)returnparser
[docs]defrun(cls,conf,env_spec=None):environments=list(environment.get_environments(conf,env_spec))ifenvironment.is_existing_only(environments):# No repository required, so skip using itconf.dvcs="none"repo=get_repo(conf)commit_hashes=[]# use fallback defaultsBenchmarks.discover(conf,repo,environments,commit_hashes,check=True)return0