Browse Source

Tests: Add test for outputLogFile in CMakePresets.json

Kyle Edwards 3 years ago
parent
commit
757786bb73

+ 4 - 0
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()

+ 7 - 0
Tests/RunCMake/CMakePresetsTest/Good.json.in

@@ -171,6 +171,13 @@
             "execution": {
                 "showOnly": "human"
             }
+        },
+        {
+            "name": "outputLog",
+            "inherits": "minimal",
+            "output": {
+                "outputLogFile": "${sourceDir}/build/default/output.log"
+            }
         }
     ]
 }

+ 1 - 1
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"
                        ""