[Lldb-commits] [lldb] [lldb][test] Set target OS for API tests in case of remote testing (PR #96654)
via lldb-commits
lldb-commits at lists.llvm.org
Tue Jun 25 08:24:47 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: Vladislav Dzhidzhoev (dzhidzhoev)
<details>
<summary>Changes</summary>
Makefile.rules uses HOST_OS and OS variables for determining host and target OSes for API tests compilation.
When lldb's target is set to remote-linux, Makefile.rules script should be executed with the target OS variable set to Linux.
This is useful for the case of Windows-to-Linux cross-testing.
---
Full diff: https://github.com/llvm/llvm-project/pull/96654.diff
1 Files Affected:
- (modified) lldb/packages/Python/lldbsuite/test/lldbplatformutil.py (+7)
``````````diff
diff --git a/lldb/packages/Python/lldbsuite/test/lldbplatformutil.py b/lldb/packages/Python/lldbsuite/test/lldbplatformutil.py
index 21f2095db90f8..c39d297a78f8f 100644
--- a/lldb/packages/Python/lldbsuite/test/lldbplatformutil.py
+++ b/lldb/packages/Python/lldbsuite/test/lldbplatformutil.py
@@ -56,6 +56,10 @@ def target_is_android():
return configuration.lldb_platform_name == "remote-android"
+def target_is_remote_linux():
+ return configuration.lldb_platform_name == "remote-linux"
+
+
def android_device_api():
if not hasattr(android_device_api, "result"):
assert configuration.lldb_platform_url is not None
@@ -97,6 +101,9 @@ def finalize_build_dictionary(dictionary):
dictionary = {}
dictionary["OS"] = "Android"
dictionary["PIE"] = 1
+ elif target_is_remote_linux():
+ dictionary = dictionary or {}
+ dictionary["OS"] = "Linux"
return dictionary
``````````
</details>
https://github.com/llvm/llvm-project/pull/96654
More information about the lldb-commits
mailing list