[Lldb-commits] [PATCH] D89224: [lldb] Add targets for running test suite against Watch/TV/iPhone simulators

Raphael Isemann via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Oct 13 08:08:15 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rGef733d9df486: [lldb] Add targets for running test suite against Watch/TV/iPhone simulators (authored by teemperor).
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

Changed prior to commit:
  https://reviews.llvm.org/D89224?vs=297522&id=297861#toc

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D89224

Files:
  lldb/test/API/lit.cfg.py
  lldb/test/CMakeLists.txt


Index: lldb/test/CMakeLists.txt
===================================================================
--- lldb/test/CMakeLists.txt
+++ lldb/test/CMakeLists.txt
@@ -214,6 +214,29 @@
   DEPENDS lldb-test-deps)
 add_dependencies(check-lldb-reproducers check-lldb-reproducers-capture)
 
+# Targets for running the test suite on the different Apple simulators.
+add_lit_testsuite(check-lldb-simulator-ios
+  "Running lldb test suite on the iOS simulator"
+  ${CMAKE_CURRENT_BINARY_DIR}/API
+  PARAMS "lldb-run-with-simulator=ios"
+  EXCLUDE_FROM_CHECK_ALL
+  DEPENDS lldb-test-deps)
+
+add_lit_testsuite(check-lldb-simulator-watchos
+  "Running lldb test suite on the watchOS simulator"
+  ${CMAKE_CURRENT_BINARY_DIR}/API
+  PARAMS "lldb-run-with-simulator=watchos"
+  EXCLUDE_FROM_CHECK_ALL
+  DEPENDS lldb-test-deps)
+
+add_lit_testsuite(check-lldb-simulator-tvos
+  "Running lldb test suite on the tvOS simulator"
+  ${CMAKE_CURRENT_BINARY_DIR}/API
+  PARAMS "lldb-run-with-simulator=tvos"
+  EXCLUDE_FROM_CHECK_ALL
+  DEPENDS lldb-test-deps)
+
+
 if(LLDB_BUILT_STANDALONE)
   # This has to happen *AFTER* add_lit_testsuite.
   if (EXISTS ${LLVM_MAIN_SRC_DIR}/utils/llvm-lit)
Index: lldb/test/API/lit.cfg.py
===================================================================
--- lldb/test/API/lit.cfg.py
+++ lldb/test/API/lit.cfg.py
@@ -146,6 +146,20 @@
   elif lldb_repro_mode == 'replay':
     config.available_features.add('lldb-repro-replay')
 
+lldb_use_simulator = lit_config.params.get('lldb-run-with-simulator', None)
+if lldb_use_simulator:
+  if lldb_use_simulator == "ios":
+    lit_config.note("Running API tests on iOS simulator")
+    config.available_features.add('lldb-simulator-ios')
+  elif lldb_use_simulator == "watchos":
+    lit_config.note("Running API tests on watchOS simulator")
+    config.available_features.add('lldb-simulator-watchos')
+  elif lldb_use_simulator == "tvos":
+    lit_config.note("Running API tests on tvOS simulator")
+    config.available_features.add('lldb-simulator-tvos')
+  else:
+    lit_config.error("Unknown simulator id '{}'".format(lldb_use_simulator))
+
 # Set a default per-test timeout of 10 minutes. Setting a timeout per test
 # requires that killProcessAndChildren() is supported on the platform and
 # lit complains if the value is set but it is not supported.
@@ -216,6 +230,16 @@
     'lldb-repro-replay' in config.available_features:
   dotest_cmd += ['--skip-category=lldb-vscode', '--skip-category=std-module']
 
+if 'lldb-simulator-ios' in config.available_features:
+  dotest_cmd += ['--apple-sdk', 'iphonesimulator',
+                 '--platform-name', 'ios-simulator']
+elif 'lldb-simulator-watchos' in config.available_features:
+  dotest_cmd += ['--apple-sdk', 'watchsimulator',
+                 '--platform-name', 'watchos-simulator']
+elif 'lldb-simulator-tvos' in config.available_features:
+  dotest_cmd += ['--apple-sdk', 'appletvsimulator',
+                 '--platform-name', 'tvos-simulator']
+
 if is_configured('enabled_plugins'):
   for plugin in config.enabled_plugins:
     dotest_cmd += ['--enable-plugin', plugin]


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89224.297861.patch
Type: text/x-patch
Size: 3103 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20201013/471a7043/attachment-0001.bin>


More information about the lldb-commits mailing list