diff options
author | Petr Viktorin <pviktori@redhat.com> | 2014-10-23 20:56:15 +0200 |
---|---|---|
committer | Tomas Babej <tbabej@redhat.com> | 2014-11-21 12:14:44 +0100 |
commit | 29c28786e35ee8e7fced740e62e0b5ddaa9bb381 (patch) | |
tree | bc24f1fa77ab4887ce2d210960498806ffef9fdf /ipatests/ipa-test-task | |
parent | 0ad5c57f6243a7dbfc15af04b87e88f59c65409c (diff) | |
download | freeipa-29c28786e35ee8e7fced740e62e0b5ddaa9bb381.tar.gz freeipa-29c28786e35ee8e7fced740e62e0b5ddaa9bb381.tar.xz freeipa-29c28786e35ee8e7fced740e62e0b5ddaa9bb381.zip |
Integration tests: Port the BeakerLib plugin and log collection to pytest
Move the IPA-specific log collection out of the Beakerlib plugin.
Add the --logfile-dir option to tests and ipa-test-task, so that logs
can be collected even if BeakerLib is not used.
https://fedorahosted.org/freeipa/ticket/4610
Reviewed-By: Tomas Babej <tbabej@redhat.com>
Diffstat (limited to 'ipatests/ipa-test-task')
-rwxr-xr-x | ipatests/ipa-test-task | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/ipatests/ipa-test-task b/ipatests/ipa-test-task index 02a04b6ab..612974549 100755 --- a/ipatests/ipa-test-task +++ b/ipatests/ipa-test-task @@ -28,7 +28,8 @@ 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.beakerlib_plugin import BeakerLibProcess +from ipatests.pytest_plugins.beakerlib import BeakerLibProcess +from ipatests.pytest_plugins.integration import collect_logs log = log_mgr.get_logger(__name__) @@ -50,6 +51,9 @@ 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)') @@ -282,8 +286,10 @@ 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) |