[Lldb-commits] [PATCH] Skip TestInferiorChanged if host platform is windows.

Zachary Turner zturner at google.com
Sat Jun 6 02:02:10 PDT 2015


Ok, seems fine to do it as a separate patch.  If it's just a straight
rename feel free to just submit the separate rename patch without review.

On Sat, Jun 6, 2015 at 12:06 AM Chaoren Lin <chaorenl at google.com> wrote:

> Pretty much every single skip{If, Unless} right now refers to the target,
> and all of them will need to be renamed (except skipIfTargetAndroid).
>
> On Sat, Jun 6, 2015 at 12:02 AM, Chaoren Lin <chaorenl at google.com> wrote:
>
>> I believe flackr only recently modified skipIf<platform> to specifically
>> mean the target platform (he's working on OS X to Linux support). I agree
>> that renaming it to skipIfTarget<platform> would make sense, but since
>> skipIf<platform> is already being used in //many many// parts of the test
>> suite, the resulting CL would be massive. So it's probably better off as a
>> separate patch.
>>
>> On Fri, Jun 5, 2015 at 11:55 PM, Zachary Turner <zturner at google.com>
>> wrote:
>>
>>> Right but we have @skipIfWindows.  I thought @skipIfWindows checked the
>>> host platform, not the target platform.  Am I wrong about that?  If I am,
>>> and @skipIfWindows is used for skipping based on the target, then can you
>>> rename @skipIfWindows to @skipIfTargetWindows so that the distinction is
>>> clear?
>>>
>>> On Fri, Jun 5, 2015 at 9:51 PM Chaoren Lin <chaorenl at google.com> wrote:
>>>
>>>> Actually, if Linux to Windows debugging ever becomes a thing, it'd be
>>>> possible for the inferior binary to change since it's on the host (Linux),
>>>> and the target (Windows) server can unlink and fetch the new binary.
>>>> However, when Windows is the host platform, no matter what the target
>>>> platform is, it'll be impossible for the inferior binaries to be modified.
>>>> On Jun 5, 2015 21:42, "Chaoren Lin" <chaorenl at google.com> wrote:
>>>>
>>>>> The host platform is not necessarily the same as the target platform.
>>>>> On Jun 5, 2015 21:41, "Zachary Turner" <zturner at google.com> wrote:
>>>>>
>>>>>>
>>>>>>
>>>>>> On Fri, Jun 5, 2015 at 8:31 PM Chaoren Lin <chaorenl at google.com>
>>>>>> wrote:
>>>>>>
>>>>>>> Hi ovyalov, zturner, clayborg,
>>>>>>>
>>>>>>> Opened files on Windows cannot be modified, so this test doesn't
>>>>>>> make sense.
>>>>>>>
>>>>>>> http://reviews.llvm.org/D10295
>>>>>>>
>>>>>>> Files:
>>>>>>>   test/functionalities/inferior-changed/TestInferiorChanged.py
>>>>>>>   test/lldbtest.py
>>>>>>>
>>>>>>> Index: test/functionalities/inferior-changed/TestInferiorChanged.py
>>>>>>> ===================================================================
>>>>>>> --- test/functionalities/inferior-changed/TestInferiorChanged.py
>>>>>>> +++ test/functionalities/inferior-changed/TestInferiorChanged.py
>>>>>>> @@ -21,6 +21,7 @@
>>>>>>>          self.setTearDownCleanup(dictionary=d)
>>>>>>>          self.inferior_not_crashing()
>>>>>>>
>>>>>>> +    @skipIfHostWindows
>>>>>>>      def test_inferior_crashing_dwarf(self):
>>>>>>>          """Test lldb reloads the inferior after it was changed
>>>>>>> during the session."""
>>>>>>>          self.buildDwarf()
>>>>>>> Index: test/lldbtest.py
>>>>>>> ===================================================================
>>>>>>> --- test/lldbtest.py
>>>>>>> +++ test/lldbtest.py
>>>>>>> @@ -778,6 +778,10 @@
>>>>>>>      """Decorate the item to skip tests that should be skipped on
>>>>>>> Windows."""
>>>>>>>      return skipIfPlatform(["windows"])(func)
>>>>>>>
>>>>>>> +def skipIfHostWindows(func):
>>>>>>> +    """Decorate the item to skip tests that should be skipped on
>>>>>>> Windows."""
>>>>>>> +    return skipIfHostPlatform(["windows"])(func)
>>>>>>> +
>>>>>>>
>>>>>> How is this different than @skipIfWindows, which we already have?
>>>>>> Seems like we should use one or the other.
>>>>>>
>>>>>>
>>>>>>
>>>>>>>  def skipUnlessDarwin(func):
>>>>>>>      """Decorate the item to skip tests that should be skipped on
>>>>>>> any non Darwin platform."""
>>>>>>>      return skipUnlessPlatform(getDarwinOSTriples())(func)
>>>>>>> @@ -827,6 +831,16 @@
>>>>>>>              func(*args, **kwargs)
>>>>>>>      return wrapper
>>>>>>>
>>>>>>> +def skipIfHostPlatform(oslist):
>>>>>>> +    """Decorate the item to skip tests if running on one of the
>>>>>>> listed host platforms."""
>>>>>>> +    return unittest2.skipIf(getHostPlatform() in oslist,
>>>>>>> +                            "skip on %s" % (", ".join(oslist)))
>>>>>>> +
>>>>>>> +def skipUnlessHostPlatform(oslist):
>>>>>>> +    """Decorate the item to skip tests unless running on one of the
>>>>>>> listed host platforms."""
>>>>>>> +    return unittest2.skipUnless(getHostPlatform() in oslist,
>>>>>>> +                                "requires on of %s" % (",
>>>>>>> ".join(oslist)))
>>>>>>> +
>>>>>>>  def skipIfPlatform(oslist):
>>>>>>>      """Decorate the item to skip tests if running on one of the
>>>>>>> listed platforms."""
>>>>>>>      return unittest2.skipIf(getPlatform() in oslist,
>>>>>>>
>>>>>>> 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/20150606/09d54192/attachment.html>


More information about the lldb-commits mailing list