show and log command when using the run_blocking_cmd() method [RHELCMP-2243]

Signed-off-by: fdiprete <fdipretre@redhat.com>
This commit is contained in:
fdiprete 2021-07-28 17:48:10 +00:00 committed by lsedlar
parent 56a55db966
commit 446334fb95
2 changed files with 11 additions and 0 deletions

View File

@ -534,6 +534,7 @@ class KojiWrapper(object):
retcode, output = run( retcode, output = run(
command, command,
can_fail=True, can_fail=True,
show_cmd=True,
logfile=log_file, logfile=log_file,
env=env, env=env,
buffer_size=-1, buffer_size=-1,

View File

@ -720,6 +720,7 @@ class RunBlockingCmdTest(KojiWrapperBaseTestCase):
"cmd", "cmd",
can_fail=True, can_fail=True,
logfile=None, logfile=None,
show_cmd=True,
env={"FOO": "BAR", "PYTHONUNBUFFERED": "1"}, env={"FOO": "BAR", "PYTHONUNBUFFERED": "1"},
buffer_size=-1, buffer_size=-1,
universal_newlines=True, universal_newlines=True,
@ -745,6 +746,7 @@ class RunBlockingCmdTest(KojiWrapperBaseTestCase):
mock.call( mock.call(
"cmd", "cmd",
can_fail=True, can_fail=True,
show_cmd=True,
logfile=None, logfile=None,
env={ env={
"KRB5CCNAME": "DIR:/tmp/foo", "KRB5CCNAME": "DIR:/tmp/foo",
@ -772,6 +774,7 @@ class RunBlockingCmdTest(KojiWrapperBaseTestCase):
mock.call( mock.call(
"cmd", "cmd",
can_fail=True, can_fail=True,
show_cmd=True,
logfile="logfile", logfile="logfile",
env={"FOO": "BAR", "PYTHONUNBUFFERED": "1"}, env={"FOO": "BAR", "PYTHONUNBUFFERED": "1"},
buffer_size=-1, buffer_size=-1,
@ -795,6 +798,7 @@ class RunBlockingCmdTest(KojiWrapperBaseTestCase):
mock.call( mock.call(
"cmd", "cmd",
can_fail=True, can_fail=True,
show_cmd=True,
logfile=None, logfile=None,
env={"FOO": "BAR", "PYTHONUNBUFFERED": "1"}, env={"FOO": "BAR", "PYTHONUNBUFFERED": "1"},
buffer_size=-1, buffer_size=-1,
@ -818,6 +822,7 @@ class RunBlockingCmdTest(KojiWrapperBaseTestCase):
mock.call( mock.call(
"cmd", "cmd",
can_fail=True, can_fail=True,
show_cmd=True,
logfile=None, logfile=None,
env={"FOO": "BAR", "PYTHONUNBUFFERED": "1"}, env={"FOO": "BAR", "PYTHONUNBUFFERED": "1"},
buffer_size=-1, buffer_size=-1,
@ -842,6 +847,7 @@ class RunBlockingCmdTest(KojiWrapperBaseTestCase):
mock.call( mock.call(
"cmd", "cmd",
can_fail=True, can_fail=True,
show_cmd=True,
logfile=None, logfile=None,
env={"FOO": "BAR", "PYTHONUNBUFFERED": "1"}, env={"FOO": "BAR", "PYTHONUNBUFFERED": "1"},
buffer_size=-1, buffer_size=-1,
@ -871,6 +877,7 @@ class RunBlockingCmdTest(KojiWrapperBaseTestCase):
mock.call( mock.call(
"cmd", "cmd",
can_fail=True, can_fail=True,
show_cmd=True,
logfile=None, logfile=None,
env={"FOO": "BAR", "PYTHONUNBUFFERED": "1"}, env={"FOO": "BAR", "PYTHONUNBUFFERED": "1"},
buffer_size=-1, buffer_size=-1,
@ -901,6 +908,7 @@ class RunBlockingCmdTest(KojiWrapperBaseTestCase):
mock.call( mock.call(
"cmd", "cmd",
can_fail=True, can_fail=True,
show_cmd=True,
logfile=None, logfile=None,
env={"FOO": "BAR", "PYTHONUNBUFFERED": "1"}, env={"FOO": "BAR", "PYTHONUNBUFFERED": "1"},
buffer_size=-1, buffer_size=-1,
@ -944,6 +952,7 @@ class RunBlockingCmdTest(KojiWrapperBaseTestCase):
mock.call( mock.call(
"cmd", "cmd",
can_fail=True, can_fail=True,
show_cmd=True,
logfile=None, logfile=None,
env={"FOO": "BAR", "PYTHONUNBUFFERED": "1"}, env={"FOO": "BAR", "PYTHONUNBUFFERED": "1"},
buffer_size=-1, buffer_size=-1,
@ -980,6 +989,7 @@ class RunBlockingCmdTest(KojiWrapperBaseTestCase):
mock.call( mock.call(
"cmd", "cmd",
can_fail=True, can_fail=True,
show_cmd=True,
logfile=None, logfile=None,
env={"FOO": "BAR", "PYTHONUNBUFFERED": "1"}, env={"FOO": "BAR", "PYTHONUNBUFFERED": "1"},
buffer_size=-1, buffer_size=-1,