diff options
| author | Robert Flack <flackr@gmail.com> | 2015-04-01 13:26:16 +0000 |
|---|---|---|
| committer | Robert Flack <flackr@gmail.com> | 2015-04-01 13:26:16 +0000 |
| commit | 8f4c4d535b5e38be49245ca28ab4b65b02b0c093 (patch) | |
| tree | 3847fe673f6f082f0386cdb6be9dd969f1f9fb8d /lldb/test/api/check_public_api_headers/TestPublicAPIHeaders.py | |
| parent | 3a610ebf1e7c44309880b2bd7ec9325d3f1db0bd (diff) | |
| download | bcm5719-llvm-8f4c4d535b5e38be49245ca28ab4b65b02b0c093.tar.gz bcm5719-llvm-8f4c4d535b5e38be49245ca28ab4b65b02b0c093.zip | |
Update sys.platform switched behavior in tests to use self.getPlatform (remote target platform)
Uses target platform when determining which platform specific behavior to use
or expect in tests. TestHelp.py was unchanged because this is asserting
behavior of the local lldb binary.
Test Plan:
Run tests on different remote os. Several previously failing tests now pass:
TestArrayTypes.py
TestInferiorChanged.py
TestInferiorCrashing.py
TestIvarProtocols.py
TestProcessIO.py
TestPublicAPIHeaders.py
TestRecursiveInferior.py
Differential Revision: http://reviews.llvm.org/D8747
llvm-svn: 233805
Diffstat (limited to 'lldb/test/api/check_public_api_headers/TestPublicAPIHeaders.py')
| -rw-r--r-- | lldb/test/api/check_public_api_headers/TestPublicAPIHeaders.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lldb/test/api/check_public_api_headers/TestPublicAPIHeaders.py b/lldb/test/api/check_public_api_headers/TestPublicAPIHeaders.py index 6dfc51bcb27..9eb549c280d 100644 --- a/lldb/test/api/check_public_api_headers/TestPublicAPIHeaders.py +++ b/lldb/test/api/check_public_api_headers/TestPublicAPIHeaders.py @@ -25,7 +25,7 @@ class SBDirCheckerCase(TestBase): """Test the SB API directory and make sure there's no unwanted stuff.""" # Only proceed if this is "darwin", "x86_64", and local platform. - if not (sys.platform.startswith("darwin") and self.getArchitecture() == "x86_64" and not lldb.test_remote): + if not (self.getPlatform() == "darwin" and self.getArchitecture() == "x86_64" and not lldb.test_remote): self.skipTest("This test is only for LLDB.framework built 64-bit and !lldb.test_remote") if self.getArchitecture() == "i386": self.skipTest("LLDB is 64-bit and cannot be linked to 32-bit test program.") @@ -47,9 +47,9 @@ class SBDirCheckerCase(TestBase): # for all the SB API headers. public_headers = os.listdir(public_api_dir) # For different platforms, the include statement can vary. - if sys.platform.startswith("darwin"): + if self.getPlatform() == "darwin": include_stmt = "'#include <%s>' % os.path.join('LLDB', header)" - if sys.platform.startswith('freebsd') or sys.platform.startswith("linux") or os.environ.get('LLDB_BUILD_TYPE') == 'Makefile': + if self.getPlatform() == "freebsd" or self.getPlatform() == "linux" or os.environ.get('LLDB_BUILD_TYPE') == 'Makefile': include_stmt = "'#include <%s>' % os.path.join(public_api_dir, header)" list = [eval(include_stmt) for header in public_headers if (header.startswith("SB") and header.endswith(".h"))] |

