summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/functionalities/process_launch/TestProcessLaunch.py
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/functionalities/process_launch/TestProcessLaunch.py')
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/process_launch/TestProcessLaunch.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/process_launch/TestProcessLaunch.py b/lldb/packages/Python/lldbsuite/test/functionalities/process_launch/TestProcessLaunch.py
index 9346bb0ba85..3131000be42 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/process_launch/TestProcessLaunch.py
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/process_launch/TestProcessLaunch.py
@@ -192,10 +192,16 @@ class ProcessLaunchTestCase(TestBase):
process = target.LaunchSimple(None, ['EVIL=' + evil_var], self.get_process_working_directory())
self.assertEqual(process.GetState(), lldb.eStateExited, PROCESS_EXITED)
- out = process.GetSTDOUT(len(evil_var))[:len(evil_var)]
+ out = process.GetSTDOUT(len(evil_var))
+ self.assertIsNotNone(out, "Encountered an error reading the process's output")
+
+ out = out[:len(evil_var)]
if out != evil_var:
self.fail('The environment variable was mis-coded: %s\n' % repr(out))
- newline = process.GetSTDOUT(1)[0]
+ newline = process.GetSTDOUT(1)
+ self.assertIsNotNone(newline, "Encountered an error reading the process's output")
+
+ newline = newline[0]
if newline != '\r' and newline != '\n':
self.fail('Garbage at end of environment variable')
OpenPOWER on IntegriCloud