Skip to content

Commit

Permalink
Small fixes to CMake lit testing configuration and adding file lock t…
Browse files Browse the repository at this point in the history
…o VCK5000 tests to have each test run one at a time
  • Loading branch information
eddierichter-amd committed Mar 20, 2024
1 parent 497b5a5 commit bcd6ed4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,18 @@ set(MLIR_BINARY_DIR ${CMAKE_BINARY_DIR})
find_package(Vitis 2023.2 COMPONENTS AIE AIE2)
find_package(Python3 COMPONENTS Interpreter)
find_package(XRT)
find_package(hsa-runtime64)

cmake_dependent_option(ENABLE_CHESS_TESTS "Enable backend tests using xchesscc" ON "Vitis_FOUND" OFF)
cmake_dependent_option(ENABLE_BOARD_TESTS "Enable board tests" ON "hsa-runtime64_FOUND" OFF)
cmake_dependent_option(ENABLE_PYTHON_TESTS "Enable python tests" ON "AIE_ENABLE_BINDINGS_PYTHON" OFF)

# If we find hsa-runtiem64 run the tests on the board
if(hsa-runtime64_FOUND)
set(ENABLE_BOARD_TESTS ON)
else()
set(ENABLE_BOARD_TESTS OFF)
endif()

# Look for LibXAIE
set(LibXAIE_FOUND FALSE)
if (DEFINED LibXAIE_${AIE_RUNTIME_TEST_TARGET}_DIR)
Expand Down
2 changes: 1 addition & 1 deletion test/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
config.substitutions.append(('%link_against_hsa%', "--link_against_hsa"))

if config.enable_board_tests:
config.substitutions.append(('%run_on_board', "sudo"))
config.substitutions.append(('%run_on_board', "flock /tmp/vck5000.lock sudo"))
else:
print("Skipping execution of unit tests (ENABLE_BOARD_TESTS=OFF)")
config.substitutions.append(('%run_on_board', "echo"))
Expand Down

0 comments on commit bcd6ed4

Please sign in to comment.