forked from OSchip/llvm-project
Add support for running the lldb testsuite against an apple watch
running watchos. These tests cannot run on normal customer devices, but I hope to some day have a public facing bot running against a device. llvm-svn: 314355
This commit is contained in:
parent
74d1e8683c
commit
11ff56c958
|
@ -54,7 +54,7 @@ class DataFormatterBoolRefPtr(TestBase):
|
|||
# Execute the cleanup function during test case tear down.
|
||||
self.addTearDownHook(cleanup)
|
||||
|
||||
isiOS = (lldbplatformutil.getPlatform() == 'ios')
|
||||
isiOS = (lldbplatformutil.getPlatform() == 'ios' or lldbplatformutil.getPlatform() == 'watchos')
|
||||
|
||||
# Now check that we use the right summary for BOOL&
|
||||
self.expect('frame variable yes_ref',
|
||||
|
|
|
@ -45,7 +45,7 @@ class RegisterCommandsTestCase(TestBase):
|
|||
self.runCmd("register read xmm0")
|
||||
self.runCmd("register read ymm15") # may be available
|
||||
self.runCmd("register read bnd0") # may be available
|
||||
elif self.getArchitecture() in ['arm', 'armv7', 'arm64']:
|
||||
elif self.getArchitecture() in ['arm', 'armv7', 'armv7k', 'arm64']:
|
||||
self.runCmd("register read s0")
|
||||
self.runCmd("register read q15") # may be available
|
||||
|
||||
|
@ -87,7 +87,7 @@ class RegisterCommandsTestCase(TestBase):
|
|||
elif self.getArchitecture() in ['arm64', 'aarch64']:
|
||||
gpr = "w0"
|
||||
vector = "v0"
|
||||
elif self.getArchitecture() in ['arm', 'armv7']:
|
||||
elif self.getArchitecture() in ['arm', 'armv7', 'armv7k']:
|
||||
gpr = "r0"
|
||||
vector = "q0"
|
||||
|
||||
|
@ -334,7 +334,7 @@ class RegisterCommandsTestCase(TestBase):
|
|||
"{0x01 0x02 0x03 0x00 0x00 0x00 0x00 0x00 0x09 0x0a 0x2f 0x2f 0x2f 0x2f 0x0e 0x0f}",
|
||||
False),
|
||||
]
|
||||
elif self.getArchitecture() in ['armv7', 'armv7k'] and self.platformIsDarwin():
|
||||
elif self.getArchitecture() in ['armv7'] and self.platformIsDarwin():
|
||||
reg_list = [
|
||||
# reg value
|
||||
# must-have
|
||||
|
@ -348,7 +348,7 @@ class RegisterCommandsTestCase(TestBase):
|
|||
"{0x01 0x02 0x03 0x00 0x00 0x00 0x00 0x00 0x09 0x0a 0x2f 0x2f 0x2f 0x2f 0x0e 0x0f}",
|
||||
False),
|
||||
]
|
||||
elif self.getArchitecture() in ['arm']:
|
||||
elif self.getArchitecture() in ['arm', 'armv7k']:
|
||||
reg_list = [
|
||||
# reg value
|
||||
# must-have
|
||||
|
|
|
@ -40,6 +40,7 @@ class ThreadStepOutTestCase(TestBase):
|
|||
oslist=["freebsd"],
|
||||
bugnumber="llvm.org/pr19347 2nd thread stops at breakpoint")
|
||||
@expectedFailureAll(oslist=["windows"])
|
||||
@expectedFailureAll(oslist=["watchos"], archs=['armv7k'], bugnumber="rdar://problem/34674488") # stop reason is trace when it should be step-out
|
||||
def test_step_all_threads(self):
|
||||
"""Test thread step out on all threads via command interpreter. """
|
||||
self.build(dictionary=self.getBuildFlags())
|
||||
|
|
|
@ -19,7 +19,7 @@ class SigtrampUnwind(TestBase):
|
|||
# On different platforms the "_sigtramp" and "__kill" frames are likely to be different.
|
||||
# This test could probably be adapted to run on linux/*bsd easily enough.
|
||||
@skipUnlessDarwin
|
||||
@expectedFailureAll(oslist=["ios", "tvos", "bridgeos"], bugnumber="<rdar://problem/34006863>") # lldb skips 1 frame on arm64 above _sigtramp
|
||||
@expectedFailureAll(oslist=["ios", "watchos", "tvos", "bridgeos"], bugnumber="<rdar://problem/34006863>") # lldb skips 1 frame on arm64 above _sigtramp
|
||||
def test(self):
|
||||
"""Test that we can backtrace correctly with _sigtramp on the stack"""
|
||||
self.build()
|
||||
|
|
|
@ -29,7 +29,7 @@ class TestStepOverWatchpoint(TestBase):
|
|||
bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
|
||||
# Read-write watchpoints not supported on SystemZ
|
||||
@expectedFailureAll(archs=['s390x'])
|
||||
@expectedFailureAll(oslist=["ios", "tvos", "bridgeos"], bugnumber="<rdar://problem/34027183>") # watchpoint tests aren't working on arm64
|
||||
@expectedFailureAll(oslist=["ios", "watchos", "tvos", "bridgeos"], bugnumber="<rdar://problem/34027183>") # watchpoint tests aren't working on arm64
|
||||
def test(self):
|
||||
"""Test stepping over watchpoints."""
|
||||
self.build()
|
||||
|
|
|
@ -60,5 +60,9 @@ class TestObjCClassMethod(TestBase):
|
|||
|
||||
cmd_value = frame.EvaluateExpression(
|
||||
"(int)[Foo doSomethingWithString:@\"Hello\"]")
|
||||
if self.TraceOn():
|
||||
if cmd_value.IsValid():
|
||||
print("cmd_value is valid")
|
||||
print("cmd_value has the value %d" % cmd_value.GetValueAsUnsigned())
|
||||
self.assertTrue(cmd_value.IsValid())
|
||||
self.assertTrue(cmd_value.GetValueAsUnsigned() == 5)
|
||||
|
|
|
@ -162,6 +162,7 @@ class TestObjCStepping(TestBase):
|
|||
newClassName = mySource_isa.GetSummary()
|
||||
|
||||
if self.TraceOn():
|
||||
print("className is %s, newClassName is %s" % (className, newClassName))
|
||||
print(mySource_isa)
|
||||
|
||||
self.assertTrue(
|
||||
|
|
|
@ -27,6 +27,7 @@ class ObjCSingleEntryDictionaryTestCase(TestBase):
|
|||
self.line = line_number('main.m', '// break here')
|
||||
|
||||
@skipUnlessDarwin
|
||||
@expectedFailureAll(oslist=['watchos'], bugnumber="rdar://problem/34642736") # bug in NSDictionary formatting on watchos
|
||||
def test_single_entry_dict(self):
|
||||
self.build()
|
||||
exe = os.path.join(os.getcwd(), "a.out")
|
||||
|
|
|
@ -53,10 +53,10 @@ def is_supported_on_platform(category, platform, compiler_path):
|
|||
# -gsplit-dwarf is not implemented by clang on Windows.
|
||||
return platform in ["linux", "freebsd"]
|
||||
elif category == "dsym":
|
||||
return platform in ["darwin", "macosx", "ios"]
|
||||
return platform in ["darwin", "macosx", "ios", "watchos", "tvos", "bridgeos"]
|
||||
elif category == "gmodules":
|
||||
# First, check to see if the platform can even support gmodules.
|
||||
if platform not in ["linux", "freebsd", "darwin", "macosx", "ios"]:
|
||||
if platform not in ["linux", "freebsd", "darwin", "macosx", "ios", "watchos", "tvos", "bridgeos"]:
|
||||
return False
|
||||
return gmodules.is_compiler_clang_with_gmodules(compiler_path)
|
||||
return True
|
||||
|
|
Loading…
Reference in New Issue