diff options
-rw-r--r-- | source/API/SBPlatform.cpp | 2 | ||||
-rw-r--r-- | test/functionalities/platform/TestPlatformCommand.py | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/source/API/SBPlatform.cpp b/source/API/SBPlatform.cpp index b23891d39..a52287020 100644 --- a/source/API/SBPlatform.cpp +++ b/source/API/SBPlatform.cpp @@ -378,7 +378,7 @@ SBPlatform::GetTriple() PlatformSP platform_sp(GetSP()); if (platform_sp) { - ArchSpec arch(platform_sp->GetRemoteSystemArchitecture()); + ArchSpec arch(platform_sp->GetSystemArchitecture()); if (arch.IsValid()) { // Const-ify the string so we don't need to worry about the lifetime of the string diff --git a/test/functionalities/platform/TestPlatformCommand.py b/test/functionalities/platform/TestPlatformCommand.py index 25406429e..5bf812602 100644 --- a/test/functionalities/platform/TestPlatformCommand.py +++ b/test/functionalities/platform/TestPlatformCommand.py @@ -33,8 +33,11 @@ class PlatformCommandTestCase(TestBase): def test_shell(self): """ Test that the platform shell command can invoke ls. """ - if sys.platform.startswith("win32"): + triple = self.dbg.GetSelectedPlatform().GetTriple() + if re.match(".*-.*-windows", triple): self.expect("platform shell dir c:\\", substrs = ["Windows", "Program Files"]) + elif re.match(".*-.*-.*-android", triple): + self.expect("platform shell ls /", substrs = ["cache", "dev", "system"]) else: self.expect("platform shell ls /", substrs = ["dev", "tmp", "usr"]) |