[Lldb-commits] [lldb] r225284 - Added a test case for launching a process in a separate terminal window to ensure we don't regress on this.

Ilia K ki.stfu at gmail.com
Wed Jan 21 10:55:57 PST 2015


Hello,

Can you review please?
http://reviews.llvm.org/D7102

Thanks,
Ilia

On Tue, Jan 20, 2015 at 10:20 PM, <jingham at apple.com> wrote:

> The cmake build apparently doesn't build this tool.  The Xcode project
> does, and the test runs correctly.
>
> The correct fix is to get cmake to build it for Darwin.  It would be a
> little odd to mark it expected fail on Darwin, when it actually does
> succeed on Darwin depending on how it's built...
>
> Jim
>
> > On Jan 20, 2015, at 9:43 AM, Ilia K <ki.stfu at gmail.com> wrote:
> >
> > Hello Greg,
> >
> > Sorry for delay but this test doesn't work in OS X since the moment as
> it was added. Target::Launch returns the following error: "the
> 'darwin-debug' executable doesn't exists at
> '/Users/IliaK/p/llvm/build_ninja/lib/python2.7/site-packages/lldb/darwin-debug'".
> >
> > Could you skip it or mark it as expectedFailure for OS X? It has broken
> our build.
> >
> > Log:
> > ======================================================================
> > FAIL: test_launch_in_terminal (TestTerminal.LaunchInTerminalTestCase)
> > ----------------------------------------------------------------------
> > Traceback (most recent call last):
> >   File
> "/Users/IliaK/p/llvm/tools/lldb/test/functionalities/tty/TestTerminal.py",
> line 36, in test_launch_in_terminal
> >     self.assertTrue(error.Success(), "Make sure launch happened
> successfully in a terminal window")
> > AssertionError: False is not True : Make sure launch happened
> successfully in a terminal window
> > Config=x86_64-clang
> >
> > Thanks,
> > Ilia
> >
> >
> > On Tue, Jan 6, 2015 at 10:17 PM, Greg Clayton <gclayton at apple.com>
> wrote:
> > Author: gclayton
> > Date: Tue Jan  6 13:17:58 2015
> > New Revision: 225284
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=225284&view=rev
> > Log:
> > Added a test case for launching a process in a separate terminal window
> to ensure we don't regress on this.
> >
> > A recent POSIX host thread issue where HostThreadPosix::Join() wasn't
> returning the thread result was responsible for this regression, yet we had
> no test case covering this so it wasn't discovered.
> >
> >
> > Added:
> >     lldb/trunk/test/functionalities/tty/
> >     lldb/trunk/test/functionalities/tty/TestTerminal.py
> >
> > Added: lldb/trunk/test/functionalities/tty/TestTerminal.py
> > URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/tty/TestTerminal.py?rev=225284&view=auto
> >
> ==============================================================================
> > --- lldb/trunk/test/functionalities/tty/TestTerminal.py (added)
> > +++ lldb/trunk/test/functionalities/tty/TestTerminal.py Tue Jan  6
> 13:17:58 2015
> > @@ -0,0 +1,35 @@
> > +"""
> > +Test lldb command aliases.
> > +"""
> > +
> > +import os, time
> > +import unittest2
> > +import lldb
> > +from lldbtest import *
> > +import lldbutil
> > +
> > +class LaunchInTerminalTestCase(TestBase):
> > +
> > +    mydir = TestBase.compute_mydir(__file__)
> > +
> > +    # Darwin is the only platform that I know of that supports
> optionally launching
> > +    # a program in a separate terminal window. It would be great if
> other platforms
> > +    # added support for this.
> > +    @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires
> Darwin")
> > +    def test_launch_in_terminal (self):
> > +        exe = "/bin/ls"
> > +        target = self.dbg.CreateTarget(exe)
> > +        launch_info = lldb.SBLaunchInfo(["-lAF", "/tmp/"])
> > +        launch_info.SetLaunchFlags(lldb.eLaunchFlagLaunchInTTY)
> > +        error = lldb.SBError()
> > +        process = target.Launch (launch_info, error)
> > +        self.assertTrue(error.Success(), "Make sure launch happened
> successfully in a terminal window")
> > +        # Running in synchronous mode our process should have run and
> already exited by the time target.Launch() returns
> > +        self.assertTrue(process.GetState() == lldb.eStateExited)
> > +
> > +if __name__ == '__main__':
> > +    import atexit
> > +    lldb.SBDebugger.Initialize()
> > +    atexit.register(lambda: lldb.SBDebugger.Terminate())
> > +    unittest2.main()
> > +
> >
> >
> > _______________________________________________
> > lldb-commits mailing list
> > lldb-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
> >
> > _______________________________________________
> > lldb-commits mailing list
> > lldb-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150121/c225b823/attachment.html>


More information about the lldb-commits mailing list