Imported Debian patch 4.0.5-6~numeezy

This commit is contained in:
Alexandre Ellert
2016-02-17 15:07:45 +01:00
committed by Mario Fetka
parent c44de33144
commit 10dfc9587b
1203 changed files with 53869 additions and 241462 deletions

View File

@@ -19,7 +19,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from __future__ import print_function
import sys
import os
@@ -29,12 +28,7 @@ from ipapython.ipa_log_manager import log_mgr, standard_logging_setup
from ipatests.test_integration import config
from ipatests.test_integration import tasks
from ipatests.test_integration.host import Host
from ipatests.pytest_plugins.integration import collect_logs
try:
from pytest_beakerlib import BeakerLibProcess
except ImportError:
BeakerLibProcess = None
from ipatests.beakerlib_plugin import BeakerLibProcess
log = log_mgr.get_logger(__name__)
@@ -56,9 +50,6 @@ class TaskRunner(object):
help="""Issue BeakerLib commands for logging
and log collection""")
parser.add_argument('--logfile-dir', dest='logfile_dir',
help="""Directory to collect logs in""")
subparsers = parser.add_subparsers(
metavar='SUBCOMMAND',
help='The action to perform (* indicates an idempotent operation)')
@@ -250,11 +241,9 @@ class TaskRunner(object):
return parser
def main(self, argv):
parser = self.get_parser()
args = parser.parse_args(argv)
args = self.get_parser().parse_args(argv)
self.config = config.Config.from_env(os.environ)
if not self.config:
raise EnvironmentError('Multihost environment not configured')
logs_to_collect = {}
@@ -264,9 +253,6 @@ class TaskRunner(object):
self.collect_log = collect_log
if args.with_beakerlib:
if BeakerLibProcess is None:
parser.error(
'pytest_beakerlib not installed, cannot use BeakerLib')
beakerlib_process = BeakerLibProcess()
args.verbose = True
@@ -288,7 +274,7 @@ class TaskRunner(object):
try:
return args.func(args)
except Exception as e:
except Exception, e:
if args.with_beakerlib:
beakerlib_process.log_exception()
beakerlib_process.run_beakerlib_command(
@@ -296,10 +282,8 @@ class TaskRunner(object):
raise
finally:
if args.with_beakerlib:
collect_logs('ipa-test-task', logs_to_collect,
logfile_dir=args.logfile_dir,
beakerlib_plugin=beakerlib_process)
beakerlib_process.end()
beakerlib_process.collect_logs(logs_to_collect)
for host in self._prepared_hosts:
host.remove_log_collector(self.collect_log)
@@ -389,7 +373,7 @@ class TaskRunner(object):
def list_topos(self, args):
for name, topo in tasks.topologies.items():
print('%s: %s' % (name, topo.__doc__))
print '%s: %s' % (name, topo.__doc__)
def install_topo(self, args):
master = self.get_host(args.master, default=args.domain.master)