Skip to content

Commit c1cb536

Browse files
committed
[lldb][test] Set target OS for API tests in case of remote testing
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.
1 parent 020f69c commit c1cb536

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lldb/packages/Python/lldbsuite/test/lldbplatformutil.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ def target_is_android():
5656
return configuration.lldb_platform_name == "remote-android"
5757

5858

59+
def target_is_remote_linux():
60+
return configuration.lldb_platform_name == "remote-linux"
61+
62+
5963
def android_device_api():
6064
if not hasattr(android_device_api, "result"):
6165
assert configuration.lldb_platform_url is not None
@@ -97,6 +101,9 @@ def finalize_build_dictionary(dictionary):
97101
dictionary = {}
98102
dictionary["OS"] = "Android"
99103
dictionary["PIE"] = 1
104+
elif target_is_remote_linux():
105+
dictionary = dictionary or {}
106+
dictionary["OS"] = "Linux"
100107
return dictionary
101108

102109

0 commit comments

Comments
 (0)