Skip to content

Commit a7ac431

Browse files
committed
Re-land "[lldb] Pick the builder for the target platform (#151262)"
Pick the builder for the target platform, not the host platform. This is necessary when running the test suite remotely on a different platform. Unlike for Darwin, both Windows and Linux us the default builder, which is why this went unnoticed on the remote-linux bots.
1 parent 24f9482 commit a7ac431

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

lldb/packages/Python/lldbsuite/test/builders/__init__.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,15 @@
88

99
def get_builder(platform):
1010
"""Returns a Builder instance for the given platform."""
11-
if platform == "darwin":
11+
if platform in [
12+
"bridgeos",
13+
"darwin",
14+
"ios",
15+
"macosx",
16+
"tvos",
17+
"watchos",
18+
"xros",
19+
]:
1220
from .darwin import BuilderDarwin
1321

1422
return BuilderDarwin()

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,8 @@ def hasChattyStderr(test_case):
229229

230230

231231
def builder_module():
232-
return get_builder(sys.platform)
232+
"""Return the builder for the target platform."""
233+
return get_builder(getPlatform())
233234

234235

235236
def getArchitecture():

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1517,7 +1517,7 @@ def build(
15171517
testname = self.getBuildDirBasename()
15181518

15191519
module = builder_module()
1520-
command = builder_module().getBuildCommand(
1520+
command = module.getBuildCommand(
15211521
debug_info,
15221522
architecture,
15231523
compiler,

0 commit comments

Comments
 (0)