find_program(PATH_TCLSH NAMES tclsh)
find_program(PATH_EXPECT NAMES expect)
if(NOT PATH_TCLSH)
    message(WARNING "tclsh not found, yanglint(1) interactive tests will not be available.")
elseif(NOT PATH_EXPECT)
    message(WARNING "expect not found, yanglint(1) interactive tests will not be available.")
else()
    add_test(NAME "yangre" COMMAND "tclsh" "${CMAKE_CURRENT_SOURCE_DIR}/all.tcl")
    set_property(TEST "yangre" APPEND PROPERTY ENVIRONMENT "TESTS_DIR=${CMAKE_CURRENT_SOURCE_DIR}")
    set_property(TEST "yangre" APPEND PROPERTY ENVIRONMENT "YANGRE=${PROJECT_BINARY_DIR}")
endif()
