blob: b173f30fe4a514c74967032995243bd4995ebe90 [file] [log] [blame]
Johnny Chenc6401792011-03-30 21:19:59 +00001"""
2Test some lldb platform commands.
3"""
4
5import os, time
6import unittest2
7import lldb
8from lldbtest import *
9
10class PlatformCommandTestCase(TestBase):
11
12 mydir = "platform"
13
14 def test_help_platform(self):
15 self.runCmd("help platform")
16
17 def test_list(self):
18 self.expect("platform list",
19 patterns = ['^Available platforms:'])
20
21 def test_process_list(self):
22 self.expect("platform process list",
23 substrs = ['PID', 'TRIPLE', 'NAME'])
24
25 def test_status(self):
26 self.expect("platform status",
27 substrs = ['Platform', 'Triple', 'OS Version', 'Kernel', 'Hostname'])
28
29
30if __name__ == '__main__':
31 import atexit
32 lldb.SBDebugger.Initialize()
33 atexit.register(lambda: lldb.SBDebugger.Terminate())
34 unittest2.main()