================
@@ -1153,16 +1154,19 @@ def requirePlatform(oslist):
     )
 
 
-def requireNotPlatform(oslist):
+def requireNotPlatform(oslist: list, reason: Optional[str] = None):
     """Mark the item as inherently inapplicable to the listed target platforms.
 
     Unlike `skipIfPlatform`, the listed platforms are reported as UNSUPPORTED
     rather than SKIPPED.
     """
-    return unittest.skipIf(
-        lldbplatformutil.getPlatform() in oslist,
-        UnsupportedReason("unsupported on %s" % (", ".join(oslist))),
-    )
+    assert isinstance(
+        reason, (str, type(None))
+    ), f"expects 'str' or 'None' got {type(reason).__name__!r}"
+
+    skip_reason = reason or UnsupportedReason(f"unsupported on {', 
'.join(oslist)}")
----------------
charles-zablit wrote:

I think that we can generalize the reason to the `UnsupportedReason` 
constructor. We also want to pass reasons to non `Not` decorators like 
`requireWindows` as well.

https://github.com/llvm/llvm-project/pull/214701
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to