@skipIfDarwin
def test_command_script_immediate_output_console(self):
"""Test that LLDB correctly allows scripted commands to set immediate output to the console."""
+ prompt = "\(lldb\) "
self.launch(timeout=10)
+ self.expect(prompt)
script = os.path.join(self.getSourceDir(), 'custom_command.py')
prompt = "\(lldb\) "
'mycommand',
patterns='this is a test string, just a test string')
self.sendline('command script delete mycommand', patterns=[prompt])
- self.quit(gracefully=False)
+ self.quit()
@skipIfRemote # test not remote-ready llvm.org/pr24813
@expectedFailureAll(
@skipIfDarwin
def test_command_script_immediate_output_file(self):
"""Test that LLDB correctly allows scripted commands to set immediate output to a file."""
+ prompt = "\(lldb\) "
self.launch(timeout=10)
+ self.expect(prompt)
test_files = {self.getBuildArtifact('read.txt'): 'r',
self.getBuildArtifact('write.txt'): 'w',
init.write(starter_string)
script = os.path.join(self.getSourceDir(), 'custom_command.py')
- prompt = "\(lldb\) "
self.sendline('command script import %s' % script, patterns=[prompt])
self.sendline('command script delete mywrite', patterns=[prompt])
- self.quit(gracefully=False)
+ self.quit()
for path, mode in test_files.items():
with open(path, 'r') as result:
result.readline(), write_string + mode + '\n')
self.assertTrue(os.path.isfile(path))
- os.remove(path)