CMake: only run PoC tests if TERM is set

This commit is contained in:
nick black 2020-07-28 13:22:16 -04:00
parent 38a7306ba8
commit 77e04c63c5
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

View File

@ -541,6 +541,7 @@ if(${BUILD_TESTING})
# sadly, this doesn't take effect until CMake 3.17... # sadly, this doesn't take effect until CMake 3.17...
set(CMAKE_CTEST_ARGUMENTS "-V") set(CMAKE_CTEST_ARGUMENTS "-V")
enable_testing() enable_testing()
if(DEFINED ENV{TERM})
add_test( add_test(
NAME ncpp_build NAME ncpp_build
COMMAND ncpp_build COMMAND ncpp_build
@ -557,13 +558,10 @@ add_test(
NAME rgbbg NAME rgbbg
COMMAND rgbbg COMMAND rgbbg
) )
set_tests_properties( set_tests_properties(ncpp_build ncpp_build_exceptions rgb rgbbg
ncpp_build
ncpp_build_exceptions
rgb
rgbbg
PROPERTIES RUN_SERIAL TRUE PROPERTIES RUN_SERIAL TRUE
) )
endif()
if(${USE_DOCTEST}) if(${USE_DOCTEST})
file(GLOB TESTSRCS CONFIGURE_DEPENDS tests/*.cpp) file(GLOB TESTSRCS CONFIGURE_DEPENDS tests/*.cpp)
add_executable(notcurses-tester ${TESTSRCS}) add_executable(notcurses-tester ${TESTSRCS})