File tree Expand file tree Collapse file tree 5 files changed +15
-5
lines changed
packages/Python/lldbsuite/test
test/API/functionalities/archives Expand file tree Collapse file tree 5 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -110,6 +110,10 @@ def getToolchainSpec(self, compiler):
110110 if not cc :
111111 return []
112112
113+ exe_ext = ""
114+ if lldbplatformutil .getHostPlatform () == "windows" :
115+ exe_ext = ".exe"
116+
113117 cc = cc .strip ()
114118 cc_path = pathlib .Path (cc )
115119
@@ -149,9 +153,9 @@ def getToolchainSpec(self, compiler):
149153 cc_dir = cc_path .parent
150154
151155 def getToolchainUtil (util_name ):
152- return cc_dir / ( cc_prefix + util_name + cc_ext )
156+ return os . path . join ( configuration . llvm_tools_dir , util_name + exe_ext )
153157
154- cxx = getToolchainUtil ( cxx_type )
158+ cxx = cc_dir / ( cc_prefix + cxx_type + cc_ext )
155159
156160 util_names = {
157161 "OBJCOPY" : "objcopy" ,
@@ -161,6 +165,11 @@ def getToolchainUtil(util_name):
161165 }
162166 utils = []
163167
168+ # Required by API TestBSDArchives.py tests.
169+ # TODO don't forget to fix the test's Makefile when porting to mainline
170+ if not os .getenv ("LLVM_AR" ):
171+ utils .extend (["LLVM_AR=%s" % getToolchainUtil ("llvm-ar" )])
172+
164173 if not lldbplatformutil .platformIsDarwin ():
165174 if cc_type in ["clang" , "cc" , "gcc" ]:
166175 util_paths = {}
Original file line number Diff line number Diff line change 118118# same base name.
119119all_tests = set ()
120120
121+ # Path to LLVM tools to be used by tests.
122+ llvm_tools_dir = None
123+
121124# LLDB library directory.
122125lldb_libs_dir = None
123126lldb_obj_root = None
Original file line number Diff line number Diff line change @@ -280,6 +280,7 @@ def parseOptionsAndInitTestdirs():
280280 "xcrun -find -toolchain default dsymutil"
281281 )
282282 if args .llvm_tools_dir :
283+ configuration .llvm_tools_dir = args .llvm_tools_dir
283284 configuration .filecheck = shutil .which ("FileCheck" , path = args .llvm_tools_dir )
284285 configuration .yaml2obj = shutil .which ("yaml2obj" , path = args .llvm_tools_dir )
285286
Original file line number Diff line number Diff line change @@ -12,12 +12,10 @@ libfoo.a: a.o b.o
1212
1313# This tests whether lldb can load a thin archive
1414libbar.a : c.o
15- $(eval LLVM_AR := $(LLVM_TOOLS_DIR ) /llvm-ar)
1615 $(eval LLVM_ARFLAGS := -rcsDT)
1716 $(LLVM_AR ) $(LLVM_ARFLAGS ) $@ $^
1817
1918libfoo-thin.a : a.o b.o
20- $(eval LLVM_AR := $(LLVM_TOOLS_DIR ) /llvm-ar)
2119 $(eval LLVM_ARFLAGS := -rcsUT)
2220 $(LLVM_AR ) $(LLVM_ARFLAGS ) $@ $^
2321
Original file line number Diff line number Diff line change @@ -25,7 +25,6 @@ def setUp(self):
2525 oslist = ["windows" ],
2626 bugnumber = "llvm.org/pr24527. Makefile.rules doesn't know how to build static libs on Windows" ,
2727 )
28- @expectedFailureAll (remote = True )
2928 def test (self ):
3029 """Break inside a() and b() defined within libfoo.a."""
3130 self .build ()
You can’t perform that action at this time.
0 commit comments