Aggregate all lit test targets under check-npcomp.

pull/1/head
Stella Laurenzo 2020-06-07 14:35:58 -07:00
parent 639826183d
commit 8280b86c05
4 changed files with 11 additions and 5 deletions

View File

@ -45,6 +45,8 @@ message(STATUS "Found ppython libraries: ${PYTHON_LIBRARIES}")
find_package(pybind11 CONFIG REQUIRED) find_package(pybind11 CONFIG REQUIRED)
message(STATUS "Found pybind11 v${pybind11_VERSION}: ${pybind11_INCLUDE_DIRS}") message(STATUS "Found pybind11 v${pybind11_VERSION}: ${pybind11_INCLUDE_DIRS}")
add_custom_target(check-npcomp)
add_subdirectory(include/npcomp) add_subdirectory(include/npcomp)
add_subdirectory(lib) add_subdirectory(lib)
add_subdirectory(python) add_subdirectory(python)

View File

@ -36,7 +36,7 @@ export LLVM_SRC_DIR=/path/to/llvm-project
# ./tools/test_all.sh runs all of these commands. # ./tools/test_all.sh runs all of these commands.
cd build cd build
ninja ninja
ninja check-npcomp check-npcomp-pytest ninja check-npcomp
# Note: currently, python tests run separately # Note: currently, python tests run separately
./python/run_tests.py ./python/run_tests.py
``` ```

View File

@ -11,10 +11,12 @@ set(NPCOMP_TEST_DEPENDS
NPCOMPNativePyExt NPCOMPNativePyExt
) )
add_lit_testsuite(check-npcomp-pytest "Running npcomp python lit tests" add_lit_testsuite(check-npcomp-pytest-lit "Running npcomp python lit tests"
${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}
DEPENDS ${NPCOMP_TEST_DEPENDS} DEPENDS ${NPCOMP_TEST_DEPENDS}
) )
set_target_properties(check-npcomp-pytest PROPERTIES FOLDER "Tests") set_target_properties(check-npcomp-pytest-lit PROPERTIES FOLDER "Tests")
add_lit_testsuites(NPCOMP_PYTEST ${CMAKE_CURRENT_SOURCE_DIR} DEPENDS ${NPCOMP_TEST_DEPENDS}) add_lit_testsuites(NPCOMP_PYTEST ${CMAKE_CURRENT_SOURCE_DIR} DEPENDS ${NPCOMP_TEST_DEPENDS})
add_dependencies(check-npcomp check-npcomp-pytest-lit)

View File

@ -11,10 +11,12 @@ set(NPCOMP_TEST_DEPENDS
npcomp-run-mlir npcomp-run-mlir
) )
add_lit_testsuite(check-npcomp "Running the npcomp regression tests" add_lit_testsuite(check-npcomp-lit "Running the npcomp regression tests"
${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}
DEPENDS ${NPCOMP_TEST_DEPENDS} DEPENDS ${NPCOMP_TEST_DEPENDS}
) )
set_target_properties(check-npcomp PROPERTIES FOLDER "Tests") set_target_properties(check-npcomp-lit PROPERTIES FOLDER "Tests")
add_lit_testsuites(NPCOMP_OPT ${CMAKE_CURRENT_SOURCE_DIR} DEPENDS ${NPCOMP_TEST_DEPENDS}) add_lit_testsuites(NPCOMP_OPT ${CMAKE_CURRENT_SOURCE_DIR} DEPENDS ${NPCOMP_TEST_DEPENDS})
add_dependencies(check-npcomp check-npcomp-lit)