[lldb/test] Fix tests reading log from remote platform instead of host (#183413)

Some tests are using logs to validate that a test behaves correctly
however they used `platform shell cat {log}` to read the logfile.

This doesn't work when running the testsuite against a remote platform
since the logs are saved on the host's filesystem.

This patch addresses those failures by making sure we read the log file
from the host platform.

Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
This commit is contained in:
Med Ismail Bennani 2026-02-25 15:46:40 -08:00 committed by GitHub
parent f01f0f01d8
commit b3ec476c70
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 4 deletions

View File

@ -17,7 +17,7 @@ class TestCase(TestBase):
substrs=["`po` was unsuccessful, running `p` instead\n", "(Bad *) 0x"],
)
self.filecheck(
f"platform shell cat {log}", __file__, f"-check-prefix=CHECK-EXPR"
f"platform shell -h -- cat {log}", __file__, f"-check-prefix=CHECK-EXPR"
)
# CHECK-EXPR: Object description fallback due to error: could not evaluate print object function: expression interrupted
@ -26,6 +26,8 @@ class TestCase(TestBase):
substrs=["`po` was unsuccessful, running `p` instead\n", "_lookHere = NO"],
)
self.filecheck(
f"platform shell cat {log}", __file__, f"-check-prefix=CHECK-DWIM-PRINT"
f"platform shell -h -- cat {log}",
__file__,
f"-check-prefix=CHECK-DWIM-PRINT",
)
# CHECK-DWIM-PRINT: Object description fallback due to error: could not evaluate print object function: expression interrupted

View File

@ -19,7 +19,9 @@ class TestCase(TestBase):
"(Pair) pair = (f = 2, e = 3)",
],
)
self.filecheck(f"platform shell cat {log}", __file__, f"-check-prefix=CHECK-VO")
self.filecheck(
f"platform shel -h -- cat {log}", __file__, f"-check-prefix=CHECK-VO"
)
# CHECK-VO: Object description fallback due to error: not a pointer type
self.expect(
@ -30,6 +32,6 @@ class TestCase(TestBase):
],
)
self.filecheck(
f"platform shell cat {log}", __file__, f"-check-prefix=CHECK-EXPR"
f"platform shel -h -- cat {log}", __file__, f"-check-prefix=CHECK-EXPR"
)
# CHECK-EXPR: Object description fallback due to error: not a pointer type