[Lldb-commits] [lldb] r147160 - in /lldb/trunk/test: api/check_public_api_headers/Makefile api/check_public_api_headers/TestPublicAPIHeaders.py macosx/order/TestOrderFile.py
Johnny Chen
johnny.chen at apple.com
Thu Dec 22 11:21:47 PST 2011
Author: johnny
Date: Thu Dec 22 13:21:46 2011
New Revision: 147160
URL: http://llvm.org/viewvc/llvm-project?rev=147160&view=rev
Log:
Patches for running some of the Linux tests from Dawn, thanks!
With some minor modification from me.
Modified:
lldb/trunk/test/api/check_public_api_headers/Makefile
lldb/trunk/test/api/check_public_api_headers/TestPublicAPIHeaders.py
lldb/trunk/test/macosx/order/TestOrderFile.py
Modified: lldb/trunk/test/api/check_public_api_headers/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/api/check_public_api_headers/Makefile?rev=147160&r1=147159&r2=147160&view=diff
==============================================================================
--- lldb/trunk/test/api/check_public_api_headers/Makefile (original)
+++ lldb/trunk/test/api/check_public_api_headers/Makefile Thu Dec 22 13:21:46 2011
@@ -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:
#
Modified: lldb/trunk/test/api/check_public_api_headers/TestPublicAPIHeaders.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/api/check_public_api_headers/TestPublicAPIHeaders.py?rev=147160&r1=147159&r2=147160&view=diff
==============================================================================
--- lldb/trunk/test/api/check_public_api_headers/TestPublicAPIHeaders.py (original)
+++ lldb/trunk/test/api/check_public_api_headers/TestPublicAPIHeaders.py Thu Dec 22 13:21:46 2011
@@ -26,7 +26,10 @@
# 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 @@
# 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 @@
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():
Modified: lldb/trunk/test/macosx/order/TestOrderFile.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/macosx/order/TestOrderFile.py?rev=147160&r1=147159&r2=147160&view=diff
==============================================================================
--- lldb/trunk/test/macosx/order/TestOrderFile.py (original)
+++ lldb/trunk/test/macosx/order/TestOrderFile.py Thu Dec 22 13:21:46 2011
@@ -18,6 +18,7 @@
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()
More information about the lldb-commits
mailing list