[Lldb-commits] [lldb] 7a11cc0 - [lldb][test] TestFileHandle: flush the output after write

Tatyana Krasnukha via lldb-commits lldb-commits at lists.llvm.org
Thu Mar 5 00:45:43 PST 2020


Author: Tatyana Krasnukha
Date: 2020-03-05T11:45:28+03:00
New Revision: 7a11cc06a4fd057f66a33830880ed567eb6d5eab

URL: https://github.com/llvm/llvm-project/commit/7a11cc06a4fd057f66a33830880ed567eb6d5eab
DIFF: https://github.com/llvm/llvm-project/commit/7a11cc06a4fd057f66a33830880ed567eb6d5eab.diff

LOG: [lldb][test] TestFileHandle: flush the output after write

Added: 
    

Modified: 
    lldb/test/API/python_api/file_handle/TestFileHandle.py

Removed: 
    


################################################################################
diff  --git a/lldb/test/API/python_api/file_handle/TestFileHandle.py b/lldb/test/API/python_api/file_handle/TestFileHandle.py
index 996077cff4b4..550aad2ad8a1 100644
--- a/lldb/test/API/python_api/file_handle/TestFileHandle.py
+++ b/lldb/test/API/python_api/file_handle/TestFileHandle.py
@@ -129,6 +129,7 @@ def test_legacy_file_out_script(self):
             # even with collect_result=True.
             self.handleCmd('script 1+1')
             self.dbg.GetOutputFileHandle().write('FOO\n')
+            self.dbg.GetOutputFileHandle().flush()
         with open(self.out_filename, 'r') as f:
             self.assertEqual(readStrippedLines(f), ['2', 'FOO'])
 
@@ -246,6 +247,7 @@ def test_fileno_out(self):
             self.assertTrue(status.Success())
             self.handleCmd('script 1+2')
             self.dbg.GetOutputFile().Write(b'quux')
+            self.dbg.GetOutputFile().Flush()
 
         with open(self.out_filename, 'r') as f:
             self.assertEqual(readStrippedLines(f), ['3', 'quux'])


        


More information about the lldb-commits mailing list