summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite
diff options
context:
space:
mode:
authorRaphael Isemann <teemperor@gmail.com>2019-09-03 08:30:17 +0000
committerRaphael Isemann <teemperor@gmail.com>2019-09-03 08:30:17 +0000
commitb10a433da85ea20c0e1f5b5b35c2cf8bd5cf3ac0 (patch)
tree5d5d570ed4db484a7bc8e47c508d897d98077b01 /lldb/packages/Python/lldbsuite
parent935499579c2d58e64d597aa19f6bc8ea31e88f04 (diff)
downloadbcm5719-llvm-b10a433da85ea20c0e1f5b5b35c2cf8bd5cf3ac0.tar.gz
bcm5719-llvm-b10a433da85ea20c0e1f5b5b35c2cf8bd5cf3ac0.zip
[lldb][NFC] Unify log files in commands/log/basic
llvm-svn: 370706
Diffstat (limited to 'lldb/packages/Python/lldbsuite')
-rw-r--r--lldb/packages/Python/lldbsuite/test/commands/log/basic/TestLogging.py16
1 files changed, 7 insertions, 9 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/commands/log/basic/TestLogging.py b/lldb/packages/Python/lldbsuite/test/commands/log/basic/TestLogging.py
index 526288f3deb..7efcce6f7ca 100644
--- a/lldb/packages/Python/lldbsuite/test/commands/log/basic/TestLogging.py
+++ b/lldb/packages/Python/lldbsuite/test/commands/log/basic/TestLogging.py
@@ -21,21 +21,19 @@ class LogTestCase(TestBase):
super(LogTestCase, self).setUp()
self.log_file = self.getBuildArtifact("log-file.txt")
- def test(self):
+ def test_file_writing(self):
self.build()
exe = self.getBuildArtifact("a.out")
self.expect("file " + exe,
patterns=["Current executable set to .*a.out"])
- log_file = os.path.join(self.getBuildDir(), "lldb-commands-log.txt")
-
- if (os.path.exists(log_file)):
- os.remove(log_file)
+ if (os.path.exists(self.log_file)):
+ os.remove(self.log_file)
# By default, Debugger::EnableLog() will set log options to
# PREPEND_THREAD_NAME + OPTION_THREADSAFE. We don't want the
# threadnames here, so we enable just threadsafe (-t).
- self.runCmd("log enable -t -f '%s' lldb commands" % (log_file))
+ self.runCmd("log enable -t -f '%s' lldb commands" % (self.log_file))
self.runCmd("command alias bp breakpoint")
@@ -45,12 +43,12 @@ class LogTestCase(TestBase):
self.runCmd("log disable lldb")
- self.assertTrue(os.path.isfile(log_file))
+ self.assertTrue(os.path.isfile(self.log_file))
- f = open(log_file)
+ f = open(self.log_file)
log_lines = f.readlines()
f.close()
- os.remove(log_file)
+ os.remove(self.log_file)
self.assertGreater(
len(log_lines),
OpenPOWER on IntegriCloud