From f563262cfda72aa291dcca4cd703b2ccba3331a9 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Thu, 21 Dec 2017 12:48:17 -0800 Subject: [PATCH] Mark tests as USES_TERMINAL This allows the Ninja build to show the test output live. This requires bumping the min required CMake version to 3.2 (from 3.1) --- CMakeLists.txt | 2 +- cmake/Tests.cmake | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a9999939d..783c51d6a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 3.1) +CMAKE_MINIMUM_REQUIRED(VERSION 3.2) PROJECT(fish-shell CXX) # We are C++11. diff --git a/cmake/Tests.cmake b/cmake/Tests.cmake index 9a13a6758..e046fbca4 100644 --- a/cmake/Tests.cmake +++ b/cmake/Tests.cmake @@ -31,7 +31,8 @@ CMAKE_POLICY(POP) ADD_CUSTOM_TARGET(test_low_level COMMAND env XDG_DATA_HOME=test/data XDG_CONFIG_HOME=test/home ./fish_tests WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - DEPENDS fish_tests) + DEPENDS fish_tests + USES_TERMINAL) ADD_DEPENDENCIES(test test_low_level) # Make the directory in which to run tests. @@ -69,7 +70,8 @@ ADD_CUSTOM_TARGET(test_prep COMMAND ${CMAKE_COMMAND} -E remove_directory ${TEST_DIR}/temp COMMAND ${CMAKE_COMMAND} -E make_directory ${TEST_DIR}/data ${TEST_DIR}/home ${TEST_DIR}/temp - DEPENDS tests_buildroot_target) + DEPENDS tests_buildroot_target + USES_TERMINAL) # test_high_level_test_deps = test_fishscript test_interactive test_invocation @@ -84,7 +86,8 @@ ADD_CUSTOM_TARGET(test_prep ADD_CUSTOM_TARGET(test_invocation COMMAND ./invocation.sh WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tests/ - DEPENDS test_prep test_low_level) + DEPENDS test_prep test_low_level + USES_TERMINAL) # # test_fishscript: $(call filter_up_to,test_fishscript,$(active_test_goals)) @@ -93,7 +96,8 @@ ADD_CUSTOM_TARGET(test_invocation ADD_CUSTOM_TARGET(test_fishscript COMMAND cd tests && ${TEST_ROOT_DIR}/bin/fish test.fish - DEPENDS test_prep test_invocation) + DEPENDS test_prep test_invocation + USES_TERMINAL) # # test_interactive: $(call filter_up_to,test_interactive,$(active_test_goals)) # cd tests; ../test/root/bin/fish interactive.fish