From 0ca4ca8ba1ed597f88ecb7fc20344c75f09dcc5e Mon Sep 17 00:00:00 2001 From: dfukalov Date: Tue, 1 Mar 2016 18:15:54 +0300 Subject: [PATCH] Fix hipify tool discovery in lit test for standalone build case --- test/CMakeLists.txt | 4 ++-- test/lit.cfg | 1 + test/lit.site.cfg.in | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 4f74091b0b..5a0250381d 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -6,7 +6,7 @@ if( NOT PYTHONINTERP_FOUND ) "Please install Python or specify the PYTHON_EXECUTABLE CMake variable.") endif() -set(BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR} ) +set(BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/.. ) configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in @@ -16,7 +16,7 @@ configure_file( add_lit_testsuite(check-hipify "Running HIPify regression tests" ${CMAKE_CURRENT_SOURCE_DIR} PARAMS site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg - DEPENDS hipify + DEPENDS hipify FileCheck lit ) add_custom_target(check) diff --git a/test/lit.cfg b/test/lit.cfg index 775cdbf0d4..d9606b48fc 100644 --- a/test/lit.cfg +++ b/test/lit.cfg @@ -51,4 +51,5 @@ if not tool_path: lit_config.note('Did not find ' + tool_name + ' in ' + llvm_tools_dir) tool_path = llvm_tools_dir + '/' + tool_name config.substitutions.append((tool_name, tool_path)) +config.substitutions.append(("hipify", obj_root+"/hipify")) diff --git a/test/lit.site.cfg.in b/test/lit.site.cfg.in index 6fc35440d4..4511316ac7 100644 --- a/test/lit.site.cfg.in +++ b/test/lit.site.cfg.in @@ -1,7 +1,7 @@ import sys config.llvm_tools_dir = "@LLVM_TOOLS_BINARY_DIR@" -config.obj_root = "@CMAKE_CURRENT_BINARY_DIR@" +config.obj_root = "@BINARY_DIR@" # Support substitution of the tools and libs dirs with user parameters. This is # used when we can't determine the tool dir at configuration time.