cmake: tools: test

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
This commit is contained in:
Janusz Jankowski 2019-02-03 03:08:24 +01:00 committed by Liam Girdwood
parent 67597453ec
commit 1704bfcb95
3 changed files with 34 additions and 0 deletions

View File

@ -15,3 +15,4 @@ set(SOF_ROOT_SOURCE_DIRECTORY "${PROJECT_SOURCE_DIR}/..")
add_subdirectory(logger) add_subdirectory(logger)
add_subdirectory(eqctl) add_subdirectory(eqctl)
add_subdirectory(topology) add_subdirectory(topology)
add_subdirectory(test)

View File

@ -0,0 +1 @@
add_subdirectory(topology)

View File

@ -0,0 +1,32 @@
file(GLOB TPLG_DEPS
../../topology/platform/intel/*.m4
../../topology/common/*.m4
../../topology/m4/*.m4
../../topology/sof/*.m4
)
find_program(XARGS NAMES xargs PATHS ENV PATH NO_DEFAULT_PATH)
if(${XARGS} STREQUAL XARGS-NOTFOUND)
set(USE_XARGS "no")
else()
set(USE_XARGS "yes")
endif()
add_custom_target(tests
COMMAND ${CMAKE_COMMAND} -E env
SOF_TPLG_BUILD_OUTPUT=${CMAKE_CURRENT_BINARY_DIR}
USE_XARGS=${USE_XARGS}
./tplg-build.sh
DEPENDS ${TPLG_DEPS}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
VERBATIM
USES_TERMINAL
)
add_custom_target(tests-clean
COMMAND rm -f ${CMAKE_CURRENT_BINARY_DIR}/*.conf
COMMAND rm -f ${CMAKE_CURRENT_BINARY_DIR}/*.tplg
VERBATIM
USES_TERMINAL
)