Skip to content

Commit f18215a

Browse files
spevansparkera
authored andcommitted
Display absolute path for Foundation lib dir during manual testing. (#1489)
- This path is shown when 'ninja test' is run. - The LD_LIBRARY_PATH passed to TestFoundation via manual testing is inherited by xdgTestHelper. If the path is relative and the current directory has been changed then libraries will not be found. This is the case if compiled with debug and libFoundation is linked to libswiftSwiftOnone.
1 parent 5aa9421 commit f18215a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

build.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@
539539

540540
script.add_product(foundation)
541541

542-
LIBS_DIRS = ""
542+
LIBS_DIRS = Configuration.current.build_directory.absolute()+"/Foundation/:"
543543
if "XCTEST_BUILD_DIR" in Configuration.current.variables:
544544
LIBS_DIRS += "${XCTEST_BUILD_DIR}:"
545545
if "LIBDISPATCH_BUILD_DIR" in Configuration.current.variables:
@@ -566,7 +566,7 @@
566566
"""
567567
extra_script += """
568568
rule RunTestFoundation
569-
command = echo "**** RUNNING TESTS ****\\nexecute:\\nLD_LIBRARY_PATH=${BUILD_DIR}/Foundation/:${LIBS_DIRS} ${BUILD_DIR}/TestFoundation/TestFoundation\\n**** DEBUGGING TESTS ****\\nexecute:\\nLD_LIBRARY_PATH=${BUILD_DIR}/Foundation/:${LIBS_DIRS} ${BUILD_DIR}/../lldb-${OS}-${ARCH}/bin/lldb ${BUILD_DIR}/TestFoundation/TestFoundation\\n"
569+
command = echo "**** RUNNING TESTS ****\\nexecute:\\nLD_LIBRARY_PATH=${LIBS_DIRS} ${BUILD_DIR}/TestFoundation/TestFoundation\\n**** DEBUGGING TESTS ****\\nexecute:\\nLD_LIBRARY_PATH=${LIBS_DIRS} ${BUILD_DIR}/../lldb-${OS}-${ARCH}/bin/lldb ${BUILD_DIR}/TestFoundation/TestFoundation\\n"
570570
description = Building Tests
571571
572572
build ${BUILD_DIR}/.test: RunTestFoundation | TestFoundation

0 commit comments

Comments
 (0)