summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2018-01-10 23:06:34 +0000
committerJim Ingham <jingham@apple.com>2018-01-10 23:06:34 +0000
commit1f74a24ac05ce493a46bdadec4d7c089398214b5 (patch)
tree33df52ab6ad34755109a562d3995ea92caf2b4a5 /lldb/packages/Python/lldbsuite
parent5e9e86a538a185e130f33f46550b62e178e19b15 (diff)
downloadbcm5719-llvm-1f74a24ac05ce493a46bdadec4d7c089398214b5.tar.gz
bcm5719-llvm-1f74a24ac05ce493a46bdadec4d7c089398214b5.zip
Runs the part of the test that just finds the binary on all systems.
That should work everywhere. Then only try actually running on macosx. llvm-svn: 322235
Diffstat (limited to 'lldb/packages/Python/lldbsuite')
-rw-r--r--lldb/packages/Python/lldbsuite/test/macosx/find-app-in-bundle/TestFindAppInBundle.py27
1 files changed, 14 insertions, 13 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/macosx/find-app-in-bundle/TestFindAppInBundle.py b/lldb/packages/Python/lldbsuite/test/macosx/find-app-in-bundle/TestFindAppInBundle.py
index a64bd2ee184..c5dbe579587 100644
--- a/lldb/packages/Python/lldbsuite/test/macosx/find-app-in-bundle/TestFindAppInBundle.py
+++ b/lldb/packages/Python/lldbsuite/test/macosx/find-app-in-bundle/TestFindAppInBundle.py
@@ -11,9 +11,9 @@ import re
import lldb
from lldbsuite.test.decorators import *
import lldbsuite.test.lldbutil as lldbutil
+import lldbsuite.test.lldbplatformutil as lldbplatformutil
from lldbsuite.test.lldbtest import *
-@decorators.skipUnlessDarwin
class FindAppInMacOSAppBundle(TestBase):
mydir = TestBase.compute_mydir(__file__)
@@ -46,17 +46,18 @@ class FindAppInMacOSAppBundle(TestBase):
bkpt = target.BreakpointCreateBySourceRegex("Set a breakpoint here", self.main_source_file)
self.assertTrue(bkpt.GetNumLocations() == 1, "Couldn't set a breakpoint in the main app")
- launch_info = lldb.SBLaunchInfo(None)
- launch_info.SetWorkingDirectory(self.get_process_working_directory())
-
- error = lldb.SBError()
- process = target.Launch(launch_info, error)
-
- self.assertTrue(process, "Could not create a valid process for TestApp: %s"%(error.GetCString()))
-
- # Frame #0 should be at our breakpoint.
- threads = lldbutil.get_threads_stopped_at_breakpoint(process, bkpt)
-
- self.assertTrue(len(threads) == 1, "Expected 1 thread to stop at breakpoint, %d did."%(len(threads)))
+ if lldbplatformutil.getPlatform() == "macosx":
+ launch_info = lldb.SBLaunchInfo(None)
+ launch_info.SetWorkingDirectory(self.get_process_working_directory())
+
+ error = lldb.SBError()
+ process = target.Launch(launch_info, error)
+
+ self.assertTrue(process, "Could not create a valid process for TestApp: %s"%(error.GetCString()))
+
+ # Frame #0 should be at our breakpoint.
+ threads = lldbutil.get_threads_stopped_at_breakpoint(process, bkpt)
+
+ self.assertTrue(len(threads) == 1, "Expected 1 thread to stop at breakpoint, %d did."%(len(threads)))
OpenPOWER on IntegriCloud