[Lldb-commits] [PATCH] Improve MiStackTestCase tests

Hafiz Abid Qadeer abidh.haq at gmail.com
Mon Mar 2 20:02:45 PST 2015


Hi,
I am travelling and will not be able to review your patch this week. If
there are problems in tests on Linux, please disable them on Linux before
committing. I will fix/enable them when I am back in office.

Thanks,
Abid

On Mon, Mar 2, 2015 at 3:22 PM, Ilia K <ki.stfu at gmail.com> wrote:

> Skip test_lldbmi_stack_info_frame unless Darwin
>
>
> http://reviews.llvm.org/D8004
>
> Files:
>   test/tools/lldb-mi/stack/TestMiStack.py
>
> Index: test/tools/lldb-mi/stack/TestMiStack.py
> ===================================================================
> --- test/tools/lldb-mi/stack/TestMiStack.py
> +++ test/tools/lldb-mi/stack/TestMiStack.py
> @@ -197,13 +197,25 @@
>          self.expect("\^running")
>          self.expect("\*stopped,reason=\"breakpoint-hit\"")
>
> -        # Test stack depth
> +        # Test that -stack-info-depth works
> +        # (and that max-depth is optional)
>          self.runCmd("-stack-info-depth")
>          self.expect("\^done,depth=\"[1-9]\"")
>
> +        # Test that max-depth restricts check of stack depth
> +        #FIXME: max-depth argument is ignored
> +        self.runCmd("-stack-info-depth 1")
> +        #self.expect("\^done,depth=\"1\"")
> +
> +        # Test that invalid max-depth argument is handled
> +        #FIXME: max-depth argument is ignored
> +        self.runCmd("-stack-info-depth -1")
> +        #self.expect("\^error")
> +
>      @lldbmi_test
>      @expectedFailureWindows("llvm.org/pr22274: need a pexpect
> replacement for windows")
>      @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known
> thread races
> +    @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires
> Darwin")
>      def test_lldbmi_stack_info_frame(self):
>          """Test that 'lldb-mi --interpreter' can show information about
> current frame."""
>
> @@ -224,10 +236,23 @@
>          self.expect("\^running")
>          self.expect("\*stopped,reason=\"breakpoint-hit\"")
>
> -        # Test that -stack-info-frame works when program is running
> +        # Test that -stack-info-frame works when program was stopped on BP
>          self.runCmd("-stack-info-frame")
>
>  self.expect("\^done,frame=\{level=\"0\",addr=\".+\",func=\"main\",file=\"main\.cpp\",fullname=\".*main\.cpp\",line=\"\d+\"\}")
>
> +        # Select frame #1
> +        self.runCmd("-stack-select-frame 1")
> +        self.expect("\^done")
> +
> +        # Test that -stack-info-frame works when specified frame was
> selected
> +        self.runCmd("-stack-info-frame")
> +
> self.expect("\^done,frame=\{level=\"1\",addr=\".+\",func=\".+\",file=\"\?\?\",fullname=\"\?\?\",line=\"-1\"\}")
> +
> +        # Test that -stack-info-frame fails when an argument is specified
> +        #FIXME: unknown argument is ignored
> +        self.runCmd("-stack-info-frame unknown_arg")
> +        #self.expect("\^error")
> +
>      @lldbmi_test
>      @expectedFailureWindows("llvm.org/pr22274: need a pexpect
> replacement for windows")
>      @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known
> thread races
>
> EMAIL PREFERENCES
>   http://reviews.llvm.org/settings/panel/emailpreferences/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150303/762c1b25/attachment.html>


More information about the lldb-commits mailing list