Skip this test is the test suite is running in a mode where it has no WindowServer access
llvm-svn: 251559
This commit is contained in:
parent
c88f5d3c2c
commit
9685074fd3
|
@ -37,9 +37,12 @@ class Rdar12408181TestCase(TestBase):
|
|||
lldbutil.run_break_set_by_file_and_line (self, self.main_source, self.line, num_expected_locations=1, loc_exact=True)
|
||||
|
||||
self.runCmd("run", RUN_SUCCEEDED)
|
||||
window = self.frame().FindVariable("window")
|
||||
window_dynamic = window.GetDynamicValue(lldb.eDynamicCanRunTarget)
|
||||
self.assertTrue(window.GetNumChildren() > 1, "NSWindow (static) only has 1 child!")
|
||||
self.assertTrue(window_dynamic.GetNumChildren() > 1, "NSWindow (dynamic) only has 1 child!")
|
||||
self.assertTrue(window.GetChildAtIndex(0).IsValid(), "NSWindow (static) has an invalid child")
|
||||
self.assertTrue(window_dynamic.GetChildAtIndex(0).IsValid(), "NSWindow (dynamic) has an invalid child")
|
||||
if self.frame().EvaluateExpression('(void*)_CGSDefaultConnection()').GetValueAsUnsigned() != 0:
|
||||
window = self.frame().FindVariable("window")
|
||||
window_dynamic = window.GetDynamicValue(lldb.eDynamicCanRunTarget)
|
||||
self.assertTrue(window.GetNumChildren() > 1, "NSWindow (static) only has 1 child!")
|
||||
self.assertTrue(window_dynamic.GetNumChildren() > 1, "NSWindow (dynamic) only has 1 child!")
|
||||
self.assertTrue(window.GetChildAtIndex(0).IsValid(), "NSWindow (static) has an invalid child")
|
||||
self.assertTrue(window_dynamic.GetChildAtIndex(0).IsValid(), "NSWindow (dynamic) has an invalid child")
|
||||
else:
|
||||
self.skipTest('no WindowServer connection')
|
||||
|
|
Loading…
Reference in New Issue