diff options
author | Greg Clayton <gclayton@apple.com> | 2015-04-02 18:24:03 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2015-04-02 18:24:03 +0000 |
commit | e0d0a7652d40fc890009d048ba3e7532068af1d0 (patch) | |
tree | e21c817f47dcecf8688c168b3412b16142355e17 /lldb/test/api/check_public_api_headers | |
parent | a5cad0d6a66378a3429cb94d557f192d4223180e (diff) | |
download | bcm5719-llvm-e0d0a7652d40fc890009d048ba3e7532068af1d0.tar.gz bcm5719-llvm-e0d0a7652d40fc890009d048ba3e7532068af1d0.zip |
Many many test failures after some recent changes. The problem is lldbtest.getPlatform() returns the "OS" of the selected platform's triple. This is "macosx" for desktop macosx and "ios" for iOS. It used to be "darwin".
There was a lot of code that was checking "if self.getPlatform() == 'darwin'" which is not correct. I fixed this by adding a:
lldbtest.platformIsDarwin()
which returns true if the current platform's OS is "macosx", "ios" or "darwin". These three valid darwin are now returned by a static function:
lldbtest.getDarwinOSTriples()
Fixed up all places that has 'if self.getPlatform() == "darwin":' with "if self.platformIsDarwin()" and all instances of 'if self.getPlatform() != "darwin":' with "if not self.platformIsDarwin()". I also fixed some darwin decorator functions to do the right thing as well.
llvm-svn: 233933
Diffstat (limited to 'lldb/test/api/check_public_api_headers')
-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 9eb549c280d..a8821b11e31 100644 --- a/lldb/test/api/check_public_api_headers/TestPublicAPIHeaders.py +++ b/lldb/test/api/check_public_api_headers/TestPublicAPIHeaders.py @@ -24,8 +24,8 @@ class SBDirCheckerCase(TestBase): def test_sb_api_directory(self): """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 (self.getPlatform() == "darwin" and self.getArchitecture() == "x86_64" and not lldb.test_remote): + # Only proceed if this is an Apple OS, "x86_64", and local platform. + if not (self.platformIsDarwin() 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,7 +47,7 @@ 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 self.getPlatform() == "darwin": + if self.platformIsDarwin(): include_stmt = "'#include <%s>' % os.path.join('LLDB', header)" 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)" |