Commit 6e38579b authored by Diego Caballero's avatar Diego Caballero Committed by Scott Cyphers

[MLIR] Improve lit test config files and tools (#4010)

This PR fixes some of the inconveniences that we had with lit in nGraph
and aligns configuration files with MLIR/LLVM.
In particular:
  - `make install` is not needed to run lit test with the latest
    compiled version of testing tools (ngraph-opt).
  - LD_LIBRARY_PATH doesn't need to be modified.
parent 73b47a6a
......@@ -539,6 +539,9 @@ if (NOT NGRAPH_BUILD_DIR)
endif()
endif()
# Build destination directory for nGraph binaries and tools.
set(NGRAPH_BUILD_BIN ${CMAKE_CURRENT_BINARY_DIR}/bin)
set(EXTERNAL_INSTALL_DIR ${CMAKE_BINARY_DIR}/external)
if(NOT DEFINED EXTERNAL_PROJECTS_ROOT)
......
......@@ -28,4 +28,9 @@ add_executable(ngraph-opt
target_link_libraries(ngraph-opt PRIVATE ${LIBS})
set_target_properties(ngraph-opt PROPERTIES
RUNTIME_OUTPUT_DIRECTORY_DEBUG ${NGRAPH_BUILD_BIN}
RUNTIME_OUTPUT_DIRECTORY_RELEASE ${NGRAPH_BUILD_BIN}
)
install(TARGETS ngraph-opt RUNTIME DESTINATION ${NGRAPH_INSTALL_BIN})
......@@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#*****************************************************************************
"""Lit runner configuration."""
import lit.formats
from lit.llvm import llvm_config
......
......@@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#*****************************************************************************
"""Lit runner site configuration."""
import lit.llvm
......@@ -21,7 +22,7 @@ config.mlir_obj_root = "@MLIR_BUILD_DIR@"
config.mlir_tools_dir = "@MLIR_TOOLS_DIR@"
config.suffixes = ['.mlir']
config.ngraph_mlir_tools_dir = "@CMAKE_INSTALL_PREFIX@/@NGRAPH_INSTALL_BIN@"
config.ngraph_mlir_tools_dir = "@NGRAPH_BUILD_BIN@"
config.ngraph_mlir_test_src_dir = "@NGRAPH_LIT_TEST_SRC_DIR@"
config.ngraph_mlir_test_build_dir = "@NGRAPH_LIT_TEST_BUILD_DIR@"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment