[Lldb-commits] [lldb] r322235 - Runs the part of the test that just finds the binary on all systems.
Jim Ingham via lldb-commits
lldb-commits at lists.llvm.org
Wed Jan 10 15:06:35 PST 2018
Author: jingham
Date: Wed Jan 10 15:06:34 2018
New Revision: 322235
URL: http://llvm.org/viewvc/llvm-project?rev=322235&view=rev
Log:
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.
Modified:
lldb/trunk/packages/Python/lldbsuite/test/macosx/find-app-in-bundle/TestFindAppInBundle.py
Modified: lldb/trunk/packages/Python/lldbsuite/test/macosx/find-app-in-bundle/TestFindAppInBundle.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/macosx/find-app-in-bundle/TestFindAppInBundle.py?rev=322235&r1=322234&r2=322235&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/macosx/find-app-in-bundle/TestFindAppInBundle.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/macosx/find-app-in-bundle/TestFindAppInBundle.py Wed Jan 10 15:06:34 2018
@@ -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 *
- at 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)))
More information about the lldb-commits
mailing list