def runcommand(self): reporter.using("tox-{} from {}".format(tox.__version__, tox.__file__)) show_description = reporter.has_level(reporter.Verbosity.DEFAULT) if self.config.option.showconfig: self.showconfig() elif self.config.option.listenvs: self.showenvs(all_envs=False, description=show_description) elif self.config.option.listenvs_all: self.showenvs(all_envs=True, description=show_description) else: with self.cleanup(): return self.subcommand_test()
def runcommand(self): reporter.using("tox-{} from {} (pid {})".format( tox.__version__, tox.__file__, os.getpid())) show_description = reporter.has_level(reporter.Verbosity.DEFAULT) if self.config.run_provision: provision_tox_venv = self.getvenv(self.config.provision_tox_env) return provision_tox(provision_tox_venv, self.config.args) else: if self.config.option.showconfig: self.showconfig() elif self.config.option.listenvs: self.showenvs(all_envs=False, description=show_description) elif self.config.option.listenvs_all: self.showenvs(all_envs=True, description=show_description) else: with self.cleanup(): return self.subcommand_test()
def main(args): setup_reporter(args) try: config = load_config(args) update_default_reporter(config.option.quiet_level, config.option.verbose_level) reporter.using("tox.ini: {}".format(config.toxinipath)) config.logdir.ensure(dir=1) ensure_empty_dir(config.logdir) with set_os_env_var("TOX_WORK_DIR", config.toxworkdir): retcode = build_session(config).runcommand() if retcode is None: retcode = 0 raise SystemExit(retcode) except KeyboardInterrupt: raise SystemExit(2) except (tox.exception.MinVersionError, tox.exception.MissingRequirement) as exception: reporter.error(str(exception)) raise SystemExit(1)