[Lldb-commits] [PATCH] D89694: [lldb] Add Apple simulator platforms to lldbplatform.py

Raphael Isemann via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Nov 5 06:35:13 PST 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG26a8e8502b59: [lldb] Add Apple simulator platforms to lldbplatform.py (authored by teemperor).
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89694/new/

https://reviews.llvm.org/D89694

Files:
  lldb/packages/Python/lldbsuite/test/decorators.py
  lldb/packages/Python/lldbsuite/test/lldbplatform.py
  lldb/packages/Python/lldbsuite/test/lldbplatformutil.py


Index: lldb/packages/Python/lldbsuite/test/lldbplatformutil.py
===================================================================
--- lldb/packages/Python/lldbsuite/test/lldbplatformutil.py
+++ lldb/packages/Python/lldbsuite/test/lldbplatformutil.py
@@ -124,8 +124,7 @@
 
 
 def getDarwinOSTriples():
-    return ['darwin', 'macosx', 'ios', 'watchos', 'tvos', 'bridgeos']
-
+    return lldbplatform.translate(lldbplatform.darwin_all)
 
 def getPlatform():
     """Returns the target platform which the tests are running on."""
Index: lldb/packages/Python/lldbsuite/test/lldbplatform.py
===================================================================
--- lldb/packages/Python/lldbsuite/test/lldbplatform.py
+++ lldb/packages/Python/lldbsuite/test/lldbplatform.py
@@ -11,20 +11,25 @@
 # LLDB modules
 import lldb
 
-windows, linux, macosx, darwin, ios, tvos, watchos, bridgeos, darwin_all, darwin_embedded, freebsd, netbsd, bsd_all, android = range(
-    14)
+windows, linux, macosx, darwin, ios, tvos, watchos, bridgeos, darwin_all, \
+    darwin_embedded, darwin_simulator, freebsd, netbsd, bsd_all, android \
+    = range(15)
+
+__darwin_embedded = ["ios", "tvos", "watchos", "bridgeos"]
+__darwin_simulators = ["iphonesimulator", "watchsimulator", "appletvsimulator"]
 
 __name_lookup = {
     windows: ["windows"],
     linux: ["linux"],
     macosx: ["macosx"],
     darwin: ["darwin"],
-    ios: ["ios"],
-    tvos: ["tvos"],
-    watchos: ["watchos"],
+    ios: ["ios", "iphonesimulator"],
+    tvos: ["tvos", "appletvsimulator"],
+    watchos: ["watchos", "watchsimulator"],
     bridgeos: ["bridgeos"],
-    darwin_all: ["macosx", "darwin", "ios", "tvos", "watchos", "bridgeos"],
-    darwin_embedded: ["ios", "tvos", "watchos", "bridgeos"],
+    darwin_all: ["macosx", "darwin"] + __darwin_embedded + __darwin_simulators,
+    darwin_embedded: __darwin_embedded + __darwin_simulators,
+    darwin_simulator: __darwin_simulators,
     freebsd: ["freebsd"],
     netbsd: ["netbsd"],
     bsd_all: ["freebsd", "netbsd"],
Index: lldb/packages/Python/lldbsuite/test/decorators.py
===================================================================
--- lldb/packages/Python/lldbsuite/test/decorators.py
+++ lldb/packages/Python/lldbsuite/test/decorators.py
@@ -551,16 +551,16 @@
     return skipTestIfFn(is_ios_simulator)(func)
 
 def skipIfiOS(func):
-    return skipIfPlatform(["ios"])(func)
+    return skipIfPlatform(lldbplatform.translate(lldbplatform.ios))(func)
 
 def skipIftvOS(func):
-    return skipIfPlatform(["tvos"])(func)
+    return skipIfPlatform(lldbplatform.translate(lldbplatform.tvos))(func)
 
 def skipIfwatchOS(func):
-    return skipIfPlatform(["watchos"])(func)
+    return skipIfPlatform(lldbplatform.translate(lldbplatform.watchos))(func)
 
 def skipIfbridgeOS(func):
-    return skipIfPlatform(["bridgeos"])(func)
+    return skipIfPlatform(lldbplatform.translate(lldbplatform.bridgeos))(func)
 
 def skipIfDarwinEmbedded(func):
     """Decorate the item to skip tests that should be skipped on Darwin armv7/arm64 targets."""
@@ -568,6 +568,12 @@
         lldbplatform.translate(
             lldbplatform.darwin_embedded))(func)
 
+def skipIfDarwinSimulator(func):
+    """Decorate the item to skip tests that should be skipped on Darwin simulator targets."""
+    return skipIfPlatform(
+        lldbplatform.translate(
+            lldbplatform.darwin_simulator))(func)
+
 def skipIfFreeBSD(func):
     """Decorate the item to skip tests that should be skipped on FreeBSD."""
     return skipIfPlatform(["freebsd"])(func)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89694.303110.patch
Type: text/x-patch
Size: 3561 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20201105/e94927ad/attachment-0001.bin>


More information about the lldb-commits mailing list