Author: jmolenda Date: Wed Sep 27 15:12:54 2017 New Revision: 314355 URL: http://llvm.org/viewvc/llvm-project?rev=314355&view=rev Log: 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.
Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference/TestFormattersBoolRefPtr.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/register_command/TestRegisters.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/step_out/TestThreadStepOut.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/unwind/sigtramp/TestSigtrampUnwind.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc-class-method/TestObjCClassMethod.py lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc-stepping/TestObjCStepping.py lldb/trunk/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py lldb/trunk/packages/Python/lldbsuite/test/test_categories.py Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference/TestFormattersBoolRefPtr.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference/TestFormattersBoolRefPtr.py?rev=314355&r1=314354&r2=314355&view=diff ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference/TestFormattersBoolRefPtr.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference/TestFormattersBoolRefPtr.py Wed Sep 27 15:12:54 2017 @@ -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', Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/register_command/TestRegisters.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/register_command/TestRegisters.py?rev=314355&r1=314354&r2=314355&view=diff ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/register_command/TestRegisters.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/register_command/TestRegisters.py Wed Sep 27 15:12:54 2017 @@ -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 Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/step_out/TestThreadStepOut.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/step_out/TestThreadStepOut.py?rev=314355&r1=314354&r2=314355&view=diff ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/step_out/TestThreadStepOut.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/step_out/TestThreadStepOut.py Wed Sep 27 15:12:54 2017 @@ -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()) Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/unwind/sigtramp/TestSigtrampUnwind.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/unwind/sigtramp/TestSigtrampUnwind.py?rev=314355&r1=314354&r2=314355&view=diff ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/unwind/sigtramp/TestSigtrampUnwind.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/unwind/sigtramp/TestSigtrampUnwind.py Wed Sep 27 15:12:54 2017 @@ -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() Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py?rev=314355&r1=314354&r2=314355&view=diff ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py Wed Sep 27 15:12:54 2017 @@ -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() Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc-class-method/TestObjCClassMethod.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc-class-method/TestObjCClassMethod.py?rev=314355&r1=314354&r2=314355&view=diff ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc-class-method/TestObjCClassMethod.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc-class-method/TestObjCClassMethod.py Wed Sep 27 15:12:54 2017 @@ -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) Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc-stepping/TestObjCStepping.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc-stepping/TestObjCStepping.py?rev=314355&r1=314354&r2=314355&view=diff ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc-stepping/TestObjCStepping.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc-stepping/TestObjCStepping.py Wed Sep 27 15:12:54 2017 @@ -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( Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py?rev=314355&r1=314354&r2=314355&view=diff ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py Wed Sep 27 15:12:54 2017 @@ -27,6 +27,7 @@ class ObjCSingleEntryDictionaryTestCase( 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") Modified: lldb/trunk/packages/Python/lldbsuite/test/test_categories.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/test_categories.py?rev=314355&r1=314354&r2=314355&view=diff ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/test_categories.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/test_categories.py Wed Sep 27 15:12:54 2017 @@ -53,10 +53,10 @@ def is_supported_on_platform(category, p # -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 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits