Skip to content

Fix use of LIBS_DIRS in build.ninja file for ninja test #429

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 11, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,11 +434,13 @@

script.add_product(foundation)

LIBS_DIRS = "LD_LIBRARY_PATH=${BUILD_DIR}/Foundation/"
LIBS_DIRS = ""
if "XCTEST_BUILD_DIR" in Configuration.current.variables:
LIBS_DIRS += ":${XCTEST_BUILD_DIR}"
LIBS_DIRS += "${XCTEST_BUILD_DIR}:"
if "LIBDISPATCH_BUILD_DIR" in Configuration.current.variables:
LIBS_DIRS += ":"+Configuration.current.variables["LIBDISPATCH_BUILD_DIR"]+"/src/.libs"
LIBS_DIRS += Configuration.current.variables["LIBDISPATCH_BUILD_DIR"]+"/src/.libs:"

Configuration.current.variables["LIBS_DIRS"] = LIBS_DIRS

extra_script = """
rule InstallFoundation
Expand All @@ -457,7 +459,7 @@
"""
extra_script += """
rule RunTestFoundation
command = echo "**** RUNNING TESTS ****\\nexecute:\\nLD_LIBRARY_PATH=${LIBS_DIRS} ${BUILD_DIR}/TestFoundation/TestFoundation\\n**** DEBUGGING TESTS ****\\nexecute:\\nLD_LIBRARY_PATH=${LIBS_DIRS} lldb ${BUILD_DIR}/TestFoundation/TestFoundation\\n"
command = echo "**** RUNNING TESTS ****\\nexecute:\\nLD_LIBRARY_PATH=${BUILD_DIR}/Foundation/:${LIBS_DIRS} ${BUILD_DIR}/TestFoundation/TestFoundation\\n**** DEBUGGING TESTS ****\\nexecute:\\nLD_LIBRARY_PATH=${LIBS_DIRS} lldb ${BUILD_DIR}/TestFoundation/TestFoundation\\n"
description = Building Tests

build ${BUILD_DIR}/.test: RunTestFoundation | TestFoundation
Expand Down