diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2022-10-18 19:20:29 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2022-10-18 19:20:44 (GMT) |
commit | 757786bb73f7c285ab57356612b49e721edca4c9 (patch) | |
tree | a00186b4351d1a05f3e4b22e3e68115aede8a81a /Tests/RunCMake/CMakePresetsTest | |
parent | b68c3596e7e9c1390d17b36163cd60aa12ead028 (diff) | |
download | CMake-757786bb73f7c285ab57356612b49e721edca4c9.zip CMake-757786bb73f7c285ab57356612b49e721edca4c9.tar.gz CMake-757786bb73f7c285ab57356612b49e721edca4c9.tar.bz2 |
Tests: Add test for outputLogFile in CMakePresets.json
Diffstat (limited to 'Tests/RunCMake/CMakePresetsTest')
-rw-r--r-- | Tests/RunCMake/CMakePresetsTest/Good-test-outputLog-check.cmake | 4 | ||||
-rw-r--r-- | Tests/RunCMake/CMakePresetsTest/Good.json.in | 7 | ||||
-rw-r--r-- | Tests/RunCMake/CMakePresetsTest/RunCMakeTest.cmake | 2 |
3 files changed, 12 insertions, 1 deletions
diff --git a/Tests/RunCMake/CMakePresetsTest/Good-test-outputLog-check.cmake b/Tests/RunCMake/CMakePresetsTest/Good-test-outputLog-check.cmake new file mode 100644 index 0000000..e860d42 --- /dev/null +++ b/Tests/RunCMake/CMakePresetsTest/Good-test-outputLog-check.cmake @@ -0,0 +1,4 @@ +include("${CMAKE_CURRENT_LIST_DIR}/check.cmake") +if(NOT EXISTS "${RunCMake_TEST_BINARY_DIR}/default/output.log") + string(APPEND RunCMake_TEST_FAILED "Expected ${RunCMake_TEST_BINARY_DIR}/default/output.log to exist but it does not\n") +endif() diff --git a/Tests/RunCMake/CMakePresetsTest/Good.json.in b/Tests/RunCMake/CMakePresetsTest/Good.json.in index d484a19..15d68bf 100644 --- a/Tests/RunCMake/CMakePresetsTest/Good.json.in +++ b/Tests/RunCMake/CMakePresetsTest/Good.json.in @@ -171,6 +171,13 @@ "execution": { "showOnly": "human" } + }, + { + "name": "outputLog", + "inherits": "minimal", + "output": { + "outputLogFile": "${sourceDir}/build/default/output.log" + } } ] } diff --git a/Tests/RunCMake/CMakePresetsTest/RunCMakeTest.cmake b/Tests/RunCMake/CMakePresetsTest/RunCMakeTest.cmake index e9e8395..3bbb2a8 100644 --- a/Tests/RunCMake/CMakePresetsTest/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMakePresetsTest/RunCMakeTest.cmake @@ -78,7 +78,7 @@ set(CMakePresetsTest_ASSETS "Good-indexFile.txt") set(GoodTestPresets "minimal;defaults;noEnvironment;withEnvironment" "config-debug;config-release" - "exclude;index;indexFile;showOnly") + "exclude;index;indexFile;showOnly;outputLog") run_cmake_test_presets(Good "default" "" |