diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2015-01-25 14:30:13 +0000 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2015-07-08 17:05:20 +0100 |
commit | 9a87cb3415a7a9587828ee40d689439949def1be (patch) | |
tree | 2ebee404257f5d69fa63c0d6378194bc5211af54 /tests | |
parent | 4a0a3f9607006d402713320fc31780fb54556e6a (diff) | |
download | sos-9a87cb3415a7a9587828ee40d689439949def1be.tar.gz |
[sosreport] add --chroot option
Add a --chroot option to sosreport to control command chrooting.
The option takes one of three values:
* auto - Allow callers of the API to control chroot behaviour
* always - Always chroot external commands to --sysroot
* never - Never chroot external commands
This is a fairly low-level option and may not be exposed to the
user in a final release; for now it will allow tests in container
environments to control the chrooting behaviour used for a run.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/utilities_tests.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/utilities_tests.py b/tests/utilities_tests.py index 9327b1f9..c4646926 100644 --- a/tests/utilities_tests.py +++ b/tests/utilities_tests.py @@ -69,7 +69,9 @@ class ExecutableTest(unittest.TestCase): self.assertEquals(result['output'], "") def test_output_chdir(self): - result = sos_get_command_output("/usr/bin/pwd", chdir=TEST_DIR) + cmd = "/bin/bash -c 'echo $PWD'" + result = sos_get_command_output(cmd, chdir=TEST_DIR) + print(result) self.assertEquals(result['status'], 0) self.assertEquals(result['output'].strip(), TEST_DIR) |