cmake BUGFIX find expect
diff --git a/tools/lint/CMakeLists.txt b/tools/lint/CMakeLists.txt
index d8b00b0..a322413 100644
--- a/tools/lint/CMakeLists.txt
+++ b/tools/lint/CMakeLists.txt
@@ -21,7 +21,7 @@
${CMAKE_CURRENT_SOURCE_DIR}/*.c
${CMAKE_CURRENT_SOURCE_DIR}/*.h
PARENT_SCOPE)
-
+
add_executable(yanglint ${lintsrc} $<TARGET_OBJECTS:compat>)
target_link_libraries(yanglint yang)
install(TARGETS yanglint DESTINATION ${CMAKE_INSTALL_BINDIR})
@@ -35,22 +35,22 @@
cmake_parse_arguments(ADDTEST "" "NAME;SCRIPT" "" ${ARGN})
set(TEST_NAME yanglint_${ADDTEST_NAME})
- add_test(NAME ${TEST_NAME} COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tests/${ADDTEST_SCRIPT})
- set_property(TEST ${TEST_NAME} APPEND PROPERTY ENVIRONMENT "YANGLINT=${PROJECT_BINARY_DIR}/yanglint")
+ add_test(NAME ${TEST_NAME} COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tests/${ADDTEST_SCRIPT})
+ set_property(TEST ${TEST_NAME} APPEND PROPERTY ENVIRONMENT "YANGLINT=${PROJECT_BINARY_DIR}/yanglint")
endfunction(add_yanglint_test)
# tests of non-interactive mode using shunit2
find_program(PATH_SHUNIT NAMES shunit2)
if(NOT PATH_SHUNIT)
- message(WARNING "'shunit2' is not found! The yanglint(1) non-interactive tests will not be available.")
+ message(WARNING "'shunit2' not found! The yanglint(1) non-interactive tests will not be available.")
else()
- add_yanglint_test(NAME ni_list SCRIPT shunit2/list.sh)
+ add_yanglint_test(NAME ni_list SCRIPT shunit2/list.sh)
endif()
# tests of interactive mode using expect
-find_program(PATH_SHUNIT NAMES shunit2)
-if(NOT PATH_SHUNIT)
- message(WARNING "'expect' is not found! The yanglint(1) interactive tests will not be available.")
+find_program(PATH_EXPECT NAMES expect)
+if(NOT PATH_EXPECT)
+ message(WARNING "'expect' not found! The yanglint(1) interactive tests will not be available.")
else()
- add_yanglint_test(NAME in_list SCRIPT expect/list.exp)
+ add_yanglint_test(NAME in_list SCRIPT expect/list.exp)
endif()