summaryrefslogtreecommitdiffstats
path: root/lldb/test/functionalities/load_unload/TestLoadUnload.py
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2015-04-02 18:24:03 +0000
committerGreg Clayton <gclayton@apple.com>2015-04-02 18:24:03 +0000
commite0d0a7652d40fc890009d048ba3e7532068af1d0 (patch)
treee21c817f47dcecf8688c168b3412b16142355e17 /lldb/test/functionalities/load_unload/TestLoadUnload.py
parenta5cad0d6a66378a3429cb94d557f192d4223180e (diff)
downloadbcm5719-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/functionalities/load_unload/TestLoadUnload.py')
-rw-r--r--lldb/test/functionalities/load_unload/TestLoadUnload.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/lldb/test/functionalities/load_unload/TestLoadUnload.py b/lldb/test/functionalities/load_unload/TestLoadUnload.py
index 8facb488dd9..a2038f6b189 100644
--- a/lldb/test/functionalities/load_unload/TestLoadUnload.py
+++ b/lldb/test/functionalities/load_unload/TestLoadUnload.py
@@ -24,7 +24,7 @@ class LoadUnloadTestCase(TestBase):
'// Set break point at this line for test_lldb_process_load_and_unload_commands().')
self.line_d_function = line_number('d.c',
'// Find this line number within d_dunction().')
- if self.getPlatform() != "darwin":
+ if not self.platformIsDarwin():
if "LD_LIBRARY_PATH" in os.environ:
self.runCmd("settings set target.env-vars " + self.dylibPath + "=" + os.environ["LD_LIBRARY_PATH"] + ":" + os.getcwd())
else:
@@ -38,7 +38,7 @@ class LoadUnloadTestCase(TestBase):
# Invoke the default build rule.
self.buildDefault()
- if self.getPlatform() == "darwin":
+ if self.platformIsDarwin():
dylibName = 'libloadunload_d.dylib'
else:
dylibName = 'libloadunload_d.so'
@@ -93,7 +93,7 @@ class LoadUnloadTestCase(TestBase):
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
- if self.getPlatform() == "darwin":
+ if self.platformIsDarwin():
dylibName = 'libloadunload_d.dylib'
dsymName = 'libloadunload_d.dylib.dSYM'
else:
@@ -112,7 +112,7 @@ class LoadUnloadTestCase(TestBase):
# we pick up the hidden dylib.
env_cmd_string = "settings set target.env-vars " + self.dylibPath + "=" + new_dir
- if self.getPlatform() != "darwin":
+ if not self.platformIsDarwin():
env_cmd_string += ":" + os.getcwd()
if self.TraceOn():
@@ -164,7 +164,7 @@ class LoadUnloadTestCase(TestBase):
error=True, matching=False,
patterns = ["1 match found .* %s" % self.mydir])
- if self.getPlatform() == "darwin":
+ if self.platformIsDarwin():
dylibName = 'libloadunload_a.dylib'
else:
dylibName = 'libloadunload_a.so'
OpenPOWER on IntegriCloud