Differential D61687 Diff 214985 packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteProcessInfo.py
Changeset View
Changeset View
Standalone View
Standalone View
packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteProcessInfo.py
Show First 20 Lines • Show All 167 Lines • ▼ Show 20 Lines | def test_qProcessInfo_contains_cputype_cpusubtype_debugserver_darwin(self): | ||||
self.qProcessInfo_contains_keys(set(['cputype', 'cpusubtype'])) | self.qProcessInfo_contains_keys(set(['cputype', 'cpusubtype'])) | ||||
@skipUnlessDarwin | @skipUnlessDarwin | ||||
@llgs_test | @llgs_test | ||||
def test_qProcessInfo_contains_cputype_cpusubtype_llgs_darwin(self): | def test_qProcessInfo_contains_cputype_cpusubtype_llgs_darwin(self): | ||||
self.init_llgs_test() | self.init_llgs_test() | ||||
self.build() | self.build() | ||||
self.qProcessInfo_contains_keys(set(['cputype', 'cpusubtype'])) | self.qProcessInfo_contains_keys(set(['cputype', 'cpusubtype'])) | ||||
@skipUnlessPlatform(["linux"]) | |||||
@llgs_test | @llgs_test | ||||
def test_qProcessInfo_contains_triple_llgs_linux(self): | def test_qProcessInfo_contains_triple_ppid_llgs(self): | ||||
self.init_llgs_test() | self.init_llgs_test() | ||||
self.build() | self.build() | ||||
self.qProcessInfo_contains_keys(set(['triple'])) | self.qProcessInfo_contains_keys(set(['triple', 'parent-pid'])) | ||||
@skipUnlessDarwin | @skipUnlessDarwin | ||||
labath: I'm not sure why the original test was made linux-specific, but I think you can just drop the… | |||||
@debugserver_test | @debugserver_test | ||||
@skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet | @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet | ||||
def test_qProcessInfo_does_not_contain_triple_debugserver_darwin(self): | def test_qProcessInfo_does_not_contain_triple_debugserver_darwin(self): | ||||
self.init_debugserver_test() | self.init_debugserver_test() | ||||
self.build() | self.build() | ||||
# We don't expect to see triple on darwin. If we do, we'll prefer triple | # We don't expect to see triple on darwin. If we do, we'll prefer triple | ||||
# to cputype/cpusubtype and skip some darwin-based ProcessGDBRemote ArchSpec setup | # to cputype/cpusubtype and skip some darwin-based ProcessGDBRemote ArchSpec setup | ||||
# for the remote Host and Process. | # for the remote Host and Process. | ||||
self.qProcessInfo_does_not_contain_keys(set(['triple'])) | self.qProcessInfo_does_not_contain_keys(set(['triple'])) | ||||
@skipUnlessDarwin | @skipUnlessDarwin | ||||
@llgs_test | @llgs_test | ||||
def test_qProcessInfo_does_not_contain_triple_llgs_darwin(self): | def test_qProcessInfo_does_not_contain_triple_llgs_darwin(self): | ||||
self.init_llgs_test() | self.init_llgs_test() | ||||
self.build() | self.build() | ||||
# We don't expect to see triple on darwin. If we do, we'll prefer triple | # We don't expect to see triple on darwin. If we do, we'll prefer triple | ||||
# to cputype/cpusubtype and skip some darwin-based ProcessGDBRemote ArchSpec setup | # to cputype/cpusubtype and skip some darwin-based ProcessGDBRemote ArchSpec setup | ||||
# for the remote Host and Process. | # for the remote Host and Process. | ||||
self.qProcessInfo_does_not_contain_keys(set(['triple'])) | self.qProcessInfo_does_not_contain_keys(set(['triple'])) | ||||
@skipUnlessPlatform(["linux"]) | @skipIfDarwin | ||||
@llgs_test | @llgs_test | ||||
def test_qProcessInfo_does_not_contain_cputype_cpusubtype_llgs_linux(self): | def test_qProcessInfo_does_not_contain_cputype_cpusubtype_llgs(self): | ||||
self.init_llgs_test() | self.init_llgs_test() | ||||
self.build() | self.build() | ||||
self.qProcessInfo_does_not_contain_keys(set(['cputype', 'cpusubtype'])) | self.qProcessInfo_does_not_contain_keys(set(['cputype', 'cpusubtype'])) | ||||
These two tests can also be merged and made @skipIfDarwin as that is the only platform using the cpu(sub)type fields. labath: These two tests can also be merged and made `@skipIfDarwin` as that is the only platform using… |
I'm not sure why the original test was made linux-specific, but I think you can just drop the os name from the test and have a single test which checks for both the presence of parent-pid and triple. No @skipUnless needed as all platforms that currently have a working lldb-server should support these fields.