[ostree] Log to stdout as well

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2016-04-08 11:17:49 +02:00
parent 8799d4cd85
commit 1bf4bec32c
2 changed files with 4 additions and 4 deletions

View File

@ -34,13 +34,13 @@ def init_ostree_repo(repo, log_dir=None):
if not os.path.isdir(repo):
ensure_dir(repo)
shortcuts.run(['ostree', 'init', '--repo={}'.format(repo), '--mode=archive-z2'],
show_cmd=True, logfile=log_file)
show_cmd=True, stdout=True, logfile=log_file)
def make_ostree_repo(repo, config, log_dir=None):
log_file = make_log_file(log_dir, 'create-ostree-repo')
shortcuts.run(['rpm-ostree', 'compose', 'tree', '--repo={}'.format(repo), config],
show_cmd=True, logfile=log_file)
show_cmd=True, stdout=True, logfile=log_file)
def run(opts):

View File

@ -31,10 +31,10 @@ class OstreeScriptTest(helpers.PungiTestCase):
self.assertItemsEqual(
run.call_args_list,
[mock.call(['ostree', 'init', '--repo={}'.format(repo), '--mode=archive-z2'],
logfile=self.topdir + '/logs/Atomic/init-ostree-repo.log', show_cmd=True),
logfile=self.topdir + '/logs/Atomic/init-ostree-repo.log', show_cmd=True, stdout=True),
mock.call(['rpm-ostree', 'compose', 'tree', '--repo={}'.format(repo),
self.topdir + '/fedora-atomic-docker-host.json'],
logfile=self.topdir + '/logs/Atomic/create-ostree-repo.log', show_cmd=True)])
logfile=self.topdir + '/logs/Atomic/create-ostree-repo.log', show_cmd=True, stdout=True)])
if __name__ == '__main__':