summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2011-12-22 19:21:46 +0000
committerJohnny Chen <johnny.chen@apple.com>2011-12-22 19:21:46 +0000
commit025c58fc15f2d80218bf23f30a170a4ce6b22a26 (patch)
tree03a5221e4002aa521afc580186794898cf538c22
parenta0a6d01d4df6bb3c189314b778840507685d525a (diff)
downloadbcm5719-llvm-025c58fc15f2d80218bf23f30a170a4ce6b22a26.tar.gz
bcm5719-llvm-025c58fc15f2d80218bf23f30a170a4ce6b22a26.zip
Patches for running some of the Linux tests from Dawn, thanks!
With some minor modification from me. llvm-svn: 147160
-rw-r--r--lldb/test/api/check_public_api_headers/Makefile8
-rw-r--r--lldb/test/api/check_public_api_headers/TestPublicAPIHeaders.py10
-rw-r--r--lldb/test/macosx/order/TestOrderFile.py1
3 files changed, 17 insertions, 2 deletions
diff --git a/lldb/test/api/check_public_api_headers/Makefile b/lldb/test/api/check_public_api_headers/Makefile
index 5b490eb9b4a..c66dd7306c0 100644
--- a/lldb/test/api/check_public_api_headers/Makefile
+++ b/lldb/test/api/check_public_api_headers/Makefile
@@ -1,7 +1,13 @@
LEVEL = ../../make
CXX_SOURCES := main.cpp
-LD_EXTRAS ?= -framework LLDB
+
+MY_OS = $(shell uname -s)
+ifeq "$(MY_OS)" "Darwin"
+ LD_EXTRAS ?= -framework LLDB
+else
+ LD_EXTRAS ?= $(LLDB_BUILD_DIR)/_lldb.so
+endif
# Example dictionary to pass to the Python build method:
#
diff --git a/lldb/test/api/check_public_api_headers/TestPublicAPIHeaders.py b/lldb/test/api/check_public_api_headers/TestPublicAPIHeaders.py
index ff549c29407..bf084db0b43 100644
--- a/lldb/test/api/check_public_api_headers/TestPublicAPIHeaders.py
+++ b/lldb/test/api/check_public_api_headers/TestPublicAPIHeaders.py
@@ -26,7 +26,10 @@ class SBDirCheckerCase(TestBase):
# Call the program generator to produce main.cpp.
self.generate_main_cpp()
- d = {'FRAMEWORK_INCLUDES' : "-F%s" % self.build_dir}
+ if sys.platform.startswith("darwin"):
+ d = {'FRAMEWORK_INCLUDES' : "-F%s" % self.build_dir}
+ if sys.platform.startswith("linux"):
+ d = {'FRAMEWORK_INCLUDES' : "-I%s" % os.path.join(os.environ["LLDB_SRC"], "include")}
self.buildDefault(dictionary=d)
self.exe_name = 'a.out'
self.sanity_check_executable(self.exe_name)
@@ -45,6 +48,8 @@ class SBDirCheckerCase(TestBase):
# For different platforms, the include statement can vary.
if sys.platform.startswith("darwin"):
include_stmt = "'#include <%s>' % os.path.join('LLDB', header)"
+ if sys.platform.startswith("linux"):
+ 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"))]
includes = '\n'.join(list)
@@ -66,6 +71,9 @@ class SBDirCheckerCase(TestBase):
if sys.platform.startswith("darwin"):
env_var = 'DYLD_FRAMEWORK_PATH'
env_val = self.build_dir
+ if sys.platform.startswith("linux"):
+ env_var = 'LD_LIBRARY_PATH'
+ env_val = self.build_dir
env_cmd = "settings set target.env-vars %s=%s" %(env_var, env_val)
if self.TraceOn():
diff --git a/lldb/test/macosx/order/TestOrderFile.py b/lldb/test/macosx/order/TestOrderFile.py
index d7651cb46fd..0997f878af5 100644
--- a/lldb/test/macosx/order/TestOrderFile.py
+++ b/lldb/test/macosx/order/TestOrderFile.py
@@ -18,6 +18,7 @@ class OrderFileTestCase(TestBase):
self.buildDsym()
self.order_file()
+ @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
def test_with_dwarf(self):
"""Test debug symbols follow the correct order by the order file."""
self.buildDwarf()
OpenPOWER on IntegriCloud