forked from OSchip/llvm-project
Fix TestPublicAPIHeaders test on Linux.
-Change the build_dir variable name to lib_dir -Set lib_dir to the correct location on Linux -Set LD_EXTRAS to the actual lldb library llvm-svn: 175664
This commit is contained in:
parent
c6cbecc2c7
commit
93ee88179b
|
|
@ -6,7 +6,7 @@ MY_OS = $(shell uname -s)
|
|||
ifeq "$(MY_OS)" "Darwin"
|
||||
LD_EXTRAS ?= -framework LLDB
|
||||
else
|
||||
LD_EXTRAS ?= $(LLDB_BUILD_DIR)/_lldb.so
|
||||
LD_EXTRAS ?= $(LLDB_LIB_DIR)/liblldb.so
|
||||
endif
|
||||
|
||||
# Example dictionary to pass to the Python build method:
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ class SBDirCheckerCase(TestBase):
|
|||
|
||||
def setUp(self):
|
||||
TestBase.setUp(self)
|
||||
self.build_dir = os.environ["LLDB_BUILD_DIR"]
|
||||
self.lib_dir = os.environ["LLDB_LIB_DIR"]
|
||||
self.template = 'main.cpp.template'
|
||||
self.source = 'main.cpp'
|
||||
|
||||
|
|
@ -28,7 +28,7 @@ class SBDirCheckerCase(TestBase):
|
|||
self.generate_main_cpp()
|
||||
|
||||
if sys.platform.startswith("darwin"):
|
||||
d = {'FRAMEWORK_INCLUDES' : "-F%s" % self.build_dir}
|
||||
d = {'FRAMEWORK_INCLUDES' : "-F%s" % self.lib_dir}
|
||||
if sys.platform.startswith("linux") or os.environ.get('LLDB_BUILD_TYPE') == 'Makefile':
|
||||
d = {'FRAMEWORK_INCLUDES' : "-I%s" % os.path.join(os.environ["LLDB_SRC"], "include")}
|
||||
self.buildDefault(dictionary=d)
|
||||
|
|
@ -71,10 +71,10 @@ class SBDirCheckerCase(TestBase):
|
|||
|
||||
if sys.platform.startswith("darwin"):
|
||||
env_var = 'DYLD_FRAMEWORK_PATH'
|
||||
env_val = self.build_dir
|
||||
env_val = self.lib_dir
|
||||
if sys.platform.startswith("linux"):
|
||||
env_var = 'LD_LIBRARY_PATH'
|
||||
env_val = self.build_dir
|
||||
env_val = self.lib_dir
|
||||
|
||||
env_cmd = "settings set target.env-vars %s=%s" %(env_var, env_val)
|
||||
if self.TraceOn():
|
||||
|
|
|
|||
|
|
@ -820,9 +820,9 @@ def setupSysPath():
|
|||
|
||||
if lldbHere:
|
||||
os.environ["LLDB_HERE"] = lldbHere
|
||||
os.environ["LLDB_BUILD_DIR"] = os.path.split(lldbHere)[0]
|
||||
os.environ["LLDB_LIB_DIR"] = os.path.split(lldbHere)[0]
|
||||
if not noHeaders:
|
||||
print "LLDB build dir:", os.environ["LLDB_BUILD_DIR"]
|
||||
print "LLDB library dir:", os.environ["LLDB_LIB_DIR"]
|
||||
os.system('%s -v' % lldbHere)
|
||||
|
||||
if not lldbExec:
|
||||
|
|
@ -870,7 +870,7 @@ def setupSysPath():
|
|||
if len(lines) == 1 and os.path.isfile(os.path.join(lines[0], init_in_python_dir)):
|
||||
lldbPath = lines[0]
|
||||
if "linux" in sys.platform:
|
||||
os.environ['LLDB_BUILD_DIR'] = os.path.join(lldbPath, 'lldb')
|
||||
os.environ['LLDB_LIB_DIR'] = os.path.join(lldbPath, '..', '..')
|
||||
|
||||
if not lldbPath:
|
||||
dbgPath = os.path.join(base, *(xcode3_build_dir + dbg + python_resource_dir))
|
||||
|
|
|
|||
Loading…
Reference in New Issue