aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/report_tests/basic_report_tests.py2
-rw-r--r--tests/report_tests/smoke_tests.py2
-rw-r--r--tests/sos_tests.py12
3 files changed, 13 insertions, 3 deletions
diff --git a/tests/report_tests/basic_report_tests.py b/tests/report_tests/basic_report_tests.py
index 4a5e0001..2d2a6c30 100644
--- a/tests/report_tests/basic_report_tests.py
+++ b/tests/report_tests/basic_report_tests.py
@@ -39,7 +39,7 @@ class LogLevelTest(StageOneReportTest):
:avocado: tags=stageone
"""
- sos_cmd = '-vvv'
+ sos_cmd = '-vvv -o kernel,host,boot,filesys'
def test_archive_logging_enabled(self):
self.assertSosLogContains('DEBUG: \[archive:.*\]')
diff --git a/tests/report_tests/smoke_tests.py b/tests/report_tests/smoke_tests.py
index cf79a076..a313405e 100644
--- a/tests/report_tests/smoke_tests.py
+++ b/tests/report_tests/smoke_tests.py
@@ -64,7 +64,7 @@ class ExpectedDefaultPluginsTest(StageOneReportTest):
:avocado: tags=stageone
"""
- sos_cmd = '-v '
+ sos_cmd = ' '
def test_default_plugins_enabled(self):
"""These plugins should run on all supported hosts by default everytime
diff --git a/tests/sos_tests.py b/tests/sos_tests.py
index 002de313..25057ba3 100644
--- a/tests/sos_tests.py
+++ b/tests/sos_tests.py
@@ -8,6 +8,7 @@
from avocado.core.exceptions import TestSkipError
+from avocado.core.output import LOG_UI
from avocado import Test
from avocado.utils import archive, process, distro, software_manager
from fnmatch import fnmatch
@@ -218,7 +219,16 @@ class BaseSoSReportTest(BaseSoSTest):
if self._exception_expected:
self.cmd_output = err.result
else:
- raise
+ msg = err.result.stderr.decode() or err.result.stdout.decode()
+ # a little hacky, but using self.log methods here will not
+ # print to console unless we ratchet up the verbosity for the
+ # entire test suite, which will become very difficult to read
+ LOG_UI.error('ERROR:\n' + msg[:8196]) # don't flood w/ super verbose logs
+ if err.result.interrupted:
+ raise Exception("Timeout exceeded, see output above")
+ else:
+ raise Exception("Command failed, see output above: '%s'"
+ % err.command.split('bin/')[1])
with open(os.path.join(self.tmpdir, 'output'), 'wb') as pfile:
pickle.dump(self.cmd_output, pfile)
self.cmd_output.stdout = self.cmd_output.stdout.decode()