aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJesse Jaggars <jjaggars@redhat.com>2012-04-05 15:48:02 -0500
committerJesse Jaggars <jjaggars@redhat.com>2012-04-05 15:48:02 -0500
commit26ffd0d8bd1336e6c4471b39cd129eff06a608db (patch)
treee8004b63884cf1c5dad34789382f066c4c3f9018 /tests
parent4b351b751e2f847b12ebbe7922a39cdc0959ea2e (diff)
parent3a09cb48bc8781f4d8693debec33e8c304096e08 (diff)
downloadsos-26ffd0d8bd1336e6c4471b39cd129eff06a608db.tar.gz
Merge branch 'master' of github.com:sosreport/sosreport
Diffstat (limited to 'tests')
-rw-r--r--tests/utilities_tests.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/utilities_tests.py b/tests/utilities_tests.py
index 24bc950b..fd9699fe 100644
--- a/tests/utilities_tests.py
+++ b/tests/utilities_tests.py
@@ -2,7 +2,7 @@ import os.path
import unittest
from StringIO import StringIO
-from sos.utilities import grep, DirTree, checksum, get_hash_name, is_executable, sosGetCommandOutput, find, tail
+from sos.utilities import grep, DirTree, checksum, get_hash_name, is_executable, sosGetCommandOutput, find, tail, shell_out
import sos
TEST_DIR = os.path.dirname(__file__)
@@ -71,6 +71,9 @@ class ExecutableTest(unittest.TestCase):
path = os.path.join(TEST_DIR, 'test_exe.py')
self.assertTrue(is_executable(path))
+ def test_exe_file_abs_path(self):
+ self.assertTrue(is_executable("/usr/bin/timeout"))
+
def test_output(self):
path = os.path.join(TEST_DIR, 'test_exe.py')
ret, out, junk = sosGetCommandOutput(path)
@@ -83,6 +86,10 @@ class ExecutableTest(unittest.TestCase):
self.assertEquals(ret, 127)
self.assertEquals(out, "")
+ def test_shell_out(self):
+ path = os.path.join(TEST_DIR, 'test_exe.py')
+ self.assertEquals("executed", shell_out(path))
+
class FindTest(unittest.TestCase):