<div dir="ltr">Pretty much every single skip{If, Unless} right now refers to the target, and all of them will need to be renamed (except skipIfTargetAndroid).</div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jun 6, 2015 at 12:02 AM, Chaoren Lin <span dir="ltr"><<a href="mailto:chaorenl@google.com" target="_blank">chaorenl@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">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.</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 5, 2015 at 11:55 PM, Zachary Turner <span dir="ltr"><<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">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?<br></div><div><div><br><div class="gmail_quote"><div dir="ltr">On Fri, Jun 5, 2015 at 9:51 PM Chaoren Lin <<a href="mailto:chaorenl@google.com" target="_blank">chaorenl@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">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.</p>
<div class="gmail_quote">On Jun 5, 2015 21:42, "Chaoren Lin" <<a href="mailto:chaorenl@google.com" target="_blank">chaorenl@google.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">The host platform is not necessarily the same as the target platform.</p>
<div class="gmail_quote">On Jun 5, 2015 21:41, "Zachary Turner" <<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Fri, Jun 5, 2015 at 8:31 PM Chaoren Lin <<a href="mailto:chaorenl@google.com" target="_blank">chaorenl@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi ovyalov, zturner, clayborg,<br>
<br>
Opened files on Windows cannot be modified, so this test doesn't make sense.<br>
<br>
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D10295&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=MEqT8U_n7oNfuDW5NRbY3ZV384ZquXIYFPWmprwUdKM&m=3Oo_nLYwP5s8ofpd0FbnKmXpbSkz6UytaX79Qk3Fjpc&s=z0eJa8hiA7uHmZq9R_Hr7RydzXmVAE-JF5GOnTy7cu8&e=" target="_blank">http://reviews.llvm.org/D10295</a><br>
<br>
Files:<br>
  test/functionalities/inferior-changed/TestInferiorChanged.py<br>
  test/lldbtest.py<br>
<br>
Index: test/functionalities/inferior-changed/TestInferiorChanged.py<br>
===================================================================<br>
--- test/functionalities/inferior-changed/TestInferiorChanged.py<br>
+++ test/functionalities/inferior-changed/TestInferiorChanged.py<br>
@@ -21,6 +21,7 @@<br>
         self.setTearDownCleanup(dictionary=d)<br>
         self.inferior_not_crashing()<br>
<br>
+    @skipIfHostWindows<br>
     def test_inferior_crashing_dwarf(self):<br>
         """Test lldb reloads the inferior after it was changed during the session."""<br>
         self.buildDwarf()<br>
Index: test/lldbtest.py<br>
===================================================================<br>
--- test/lldbtest.py<br>
+++ test/lldbtest.py<br>
@@ -778,6 +778,10 @@<br>
     """Decorate the item to skip tests that should be skipped on Windows."""<br>
     return skipIfPlatform(["windows"])(func)<br>
<br>
+def skipIfHostWindows(func):<br>
+    """Decorate the item to skip tests that should be skipped on Windows."""<br>
+    return skipIfHostPlatform(["windows"])(func)<br>
+<br></blockquote><div>How is this different than @skipIfWindows, which we already have?  Seems like we should use one or the other.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
 def skipUnlessDarwin(func):<br>
     """Decorate the item to skip tests that should be skipped on any non Darwin platform."""<br>
     return skipUnlessPlatform(getDarwinOSTriples())(func)<br>
@@ -827,6 +831,16 @@<br>
             func(*args, **kwargs)<br>
     return wrapper<br>
<br>
+def skipIfHostPlatform(oslist):<br>
+    """Decorate the item to skip tests if running on one of the listed host platforms."""<br>
+    return unittest2.skipIf(getHostPlatform() in oslist,<br>
+                            "skip on %s" % (", ".join(oslist)))<br>
+<br>
+def skipUnlessHostPlatform(oslist):<br>
+    """Decorate the item to skip tests unless running on one of the listed host platforms."""<br>
+    return unittest2.skipUnless(getHostPlatform() in oslist,<br>
+                                "requires on of %s" % (", ".join(oslist)))<br>
+<br>
 def skipIfPlatform(oslist):<br>
     """Decorate the item to skip tests if running on one of the listed platforms."""<br>
     return unittest2.skipIf(getPlatform() in oslist,<br>
<br>
EMAIL PREFERENCES<br>
  <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_settings_panel_emailpreferences_&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=MEqT8U_n7oNfuDW5NRbY3ZV384ZquXIYFPWmprwUdKM&m=3Oo_nLYwP5s8ofpd0FbnKmXpbSkz6UytaX79Qk3Fjpc&s=kdo_0ZOo4ZPbdPrcaoQpvsgysUNnLh2TDNZvP2XDs1I&e=" target="_blank">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br>
</blockquote></div></div>
</blockquote></div>
</blockquote></div>
</blockquote></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>