Skip to content

Commit f7e1211

Browse files
authored
Merge pull request #1853 from fabbione/tests-add-debug-output-opt
Tests: add debug output opt
2 parents 819af63 + 146fdcf commit f7e1211

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/tests_utils.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ def run_and_get_output(config, detach=False, preserve_fds=None, pid_file=None,
225225
keep=False,
226226
command='run', env=None, use_popen=False, hide_stderr=False, cgroup_manager='cgroupfs',
227227
all_dev_null=False, stdin_dev_null=False, id_container=None, relative_config_path="config.json",
228-
chown_rootfs_to=None, callback_prepare_rootfs=None, debug_on_error=None):
228+
chown_rootfs_to=None, callback_prepare_rootfs=None, debug=False):
229229

230230
# Some tests require that the container user, which might not be the
231231
# same user as the person running the tests, is able to resolve the full path
@@ -285,9 +285,10 @@ def run_and_get_output(config, detach=False, preserve_fds=None, pid_file=None,
285285
preserve_fds_arg = ['--preserve-fds', str(preserve_fds)] if preserve_fds else []
286286
pid_file_arg = ['--pid-file', pid_file] if pid_file else []
287287
relative_config_path = ['--config', relative_config_path] if relative_config_path else []
288+
debug_arg = ['--debug'] if debug else []
288289

289290
root = get_tests_root_status()
290-
args = [crun, "--cgroup-manager", cgroup_manager, "--root", root, command] + relative_config_path + preserve_fds_arg + detach_arg + keep_arg + pid_file_arg + [id_container]
291+
args = [crun] + debug_arg + ["--cgroup-manager", cgroup_manager, "--root", root, command] + relative_config_path + preserve_fds_arg + detach_arg + keep_arg + pid_file_arg + [id_container]
291292

292293
stderr = subprocess.STDOUT
293294
if hide_stderr:

0 commit comments

Comments
 (0)