summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorRalf Habacker <ralf.habacker@freenet.de>2023-11-29 19:39:23 (GMT)
committerBrad King <brad.king@kitware.com>2023-12-13 15:20:43 (GMT)
commit88863d83d62b7668047ee78a3ada841364e119a0 (patch)
tree7af47ede9f38acae8a2c6cc3ccd85cac5eb1a13d /Tests
parent1ec0372ed4b450e242fdb8f6a7d2862baa61b501 (diff)
downloadCMake-88863d83d62b7668047ee78a3ada841364e119a0.zip
CMake-88863d83d62b7668047ee78a3ada841364e119a0.tar.gz
CMake-88863d83d62b7668047ee78a3ada841364e119a0.tar.bz2
fileapi: Add test launcher to codemodel-v2
We do not need to bump the minor version because it was recently bumped by addition of the cross-compiling emulator as another kind of launcher.
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-check.py2
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/directories/cxx.cross.json3
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/directories/cxx.json1
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/projects/cxx.json2
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_cxx.json8
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_top.json8
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_test_launcher.json105
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_test_launcher_and_cross_emulator.json109
-rw-r--r--Tests/RunCMake/FileAPI/cxx/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/FileAPI/cxx/cross/CMakeLists.txt4
-rw-r--r--Tests/RunCMake/property_init/Executable.cmake1
11 files changed, 245 insertions, 1 deletions
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-check.py b/Tests/RunCMake/FileAPI/codemodel-v2-check.py
index f46448b..5f41ad9 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-check.py
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-check.py
@@ -809,6 +809,8 @@ def gen_check_targets(c, g, inSource):
read_codemodel_json_data("targets/cxx_exe.json"),
read_codemodel_json_data("targets/cxx_exe_cross_emulator.json"),
read_codemodel_json_data("targets/cxx_exe_cross_emulator_args.json"),
+ read_codemodel_json_data("targets/cxx_exe_test_launcher_and_cross_emulator.json"),
+ read_codemodel_json_data("targets/cxx_exe_test_launcher.json"),
read_codemodel_json_data("targets/cxx_standard_compile_feature_exe.json"),
read_codemodel_json_data("targets/cxx_standard_exe.json"),
read_codemodel_json_data("targets/cxx_shared_lib.json"),
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/cxx.cross.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/cxx.cross.json
index 09a9d04..8f6ded5 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/cxx.cross.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/cxx.cross.json
@@ -6,7 +6,8 @@
"childSources": null,
"targetIds": [
"^cxx_exe_cross_emulator::@ee4a268216d1f53c4e2e$",
- "^cxx_exe_cross_emulator_args::@ee4a268216d1f53c4e2e$"
+ "^cxx_exe_cross_emulator_args::@ee4a268216d1f53c4e2e$",
+ "^cxx_exe_test_launcher_and_cross_emulator::@ee4a268216d1f53c4e2e$"
],
"projectName": "Cxx",
"minimumCMakeVersion": "3.13",
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/cxx.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/cxx.json
index defb865..912d664 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/cxx.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/cxx.json
@@ -9,6 +9,7 @@
"^ALL_BUILD::@a56b12a3f5c0529fb296$",
"^ZERO_CHECK::@a56b12a3f5c0529fb296$",
"^cxx_exe::@a56b12a3f5c0529fb296$",
+ "^cxx_exe_test_launcher::@a56b12a3f5c0529fb296$",
"^cxx_standard_compile_feature_exe::@a56b12a3f5c0529fb296$",
"^cxx_standard_exe::@a56b12a3f5c0529fb296$",
"^cxx_lib::@a56b12a3f5c0529fb296$",
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/cxx.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/cxx.json
index ea738f8..c8a1a83 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/cxx.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/cxx.json
@@ -13,6 +13,8 @@
"^cxx_exe::@a56b12a3f5c0529fb296$",
"^cxx_exe_cross_emulator::@ee4a268216d1f53c4e2e$",
"^cxx_exe_cross_emulator_args::@ee4a268216d1f53c4e2e$",
+ "^cxx_exe_test_launcher_and_cross_emulator::@ee4a268216d1f53c4e2e$",
+ "^cxx_exe_test_launcher::@a56b12a3f5c0529fb296$",
"^cxx_standard_compile_feature_exe::@a56b12a3f5c0529fb296$",
"^cxx_standard_exe::@a56b12a3f5c0529fb296$",
"^cxx_shared_lib::@a56b12a3f5c0529fb296$",
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_cxx.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_cxx.json
index 2a093ab..3a83d29 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_cxx.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_cxx.json
@@ -91,6 +91,14 @@
"backtrace": null
},
{
+ "id": "^cxx_exe_test_launcher_and_cross_emulator::@ee4a268216d1f53c4e2e$",
+ "backtrace": null
+ },
+ {
+ "id": "^cxx_exe_test_launcher::@a56b12a3f5c0529fb296$",
+ "backtrace": null
+ },
+ {
"id": "^cxx_standard_compile_feature_exe::@a56b12a3f5c0529fb296$",
"backtrace": null
},
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_top.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_top.json
index b7cbc14..ec72eb8 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_top.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_top.json
@@ -131,6 +131,14 @@
"backtrace": null
},
{
+ "id": "^cxx_exe_test_launcher_and_cross_emulator::@ee4a268216d1f53c4e2e$",
+ "backtrace": null
+ },
+ {
+ "id": "^cxx_exe_test_launcher::@a56b12a3f5c0529fb296$",
+ "backtrace": null
+ },
+ {
"id": "^cxx_standard_compile_feature_exe::@a56b12a3f5c0529fb296$",
"backtrace": null
},
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_test_launcher.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_test_launcher.json
new file mode 100644
index 0000000..9002368
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_test_launcher.json
@@ -0,0 +1,105 @@
+{
+ "name": "cxx_exe_test_launcher",
+ "id": "^cxx_exe_test_launcher::@a56b12a3f5c0529fb296$",
+ "directorySource": "^cxx$",
+ "projectName": "Cxx",
+ "type": "EXECUTABLE",
+ "isGeneratorProvided": null,
+ "fileSets": null,
+ "sources": [
+ {
+ "path": "^empty\\.cxx$",
+ "isGenerated": null,
+ "fileSetName": null,
+ "sourceGroupName": "Source Files",
+ "compileGroupLanguage": "CXX",
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 49,
+ "command": "add_executable",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "Source Files",
+ "sourcePaths": [
+ "^empty\\.cxx$"
+ ]
+ }
+ ],
+ "compileGroups": [
+ {
+ "language": "CXX",
+ "sourcePaths": [
+ "^empty\\.cxx$"
+ ],
+ "includes": null,
+ "frameworks": null,
+ "defines": null,
+ "compileCommandFragments": null
+ }
+ ],
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 49,
+ "command": "add_executable",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": "^cxx_exe_test_launcher(\\.exe)?$",
+ "artifacts": [
+ {
+ "path": "^cxx/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?cxx_exe_test_launcher(\\.exe)?$",
+ "_dllExtra": false
+ },
+ {
+ "path": "^cxx/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?cxx_exe_test_launcher\\.pdb$",
+ "_dllExtra": true
+ }
+ ],
+ "build": "^cxx$",
+ "source": "^cxx$",
+ "install": null,
+ "launchers" : [
+ {
+ "command": "^no-such-launcher(\\.exe)?$",
+ "type" : "test"
+ }
+ ],
+ "link": {
+ "language": "CXX",
+ "lto": null,
+ "commandFragments": [
+ {
+ "fragment" : ".*",
+ "role" : "flags",
+ "backtrace": null
+ }
+ ]
+ },
+ "archive": null,
+ "dependencies": [
+ {
+ "id": "^ZERO_CHECK::@a56b12a3f5c0529fb296$",
+ "backtrace": null
+ }
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_test_launcher_and_cross_emulator.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_test_launcher_and_cross_emulator.json
new file mode 100644
index 0000000..06e7a7b
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_test_launcher_and_cross_emulator.json
@@ -0,0 +1,109 @@
+{
+ "name": "cxx_exe_test_launcher_and_cross_emulator",
+ "id": "^cxx_exe_test_launcher_and_cross_emulator::@ee4a268216d1f53c4e2e$",
+ "directorySource": "^cxx/cross$",
+ "projectName": "Cxx",
+ "type": "EXECUTABLE",
+ "isGeneratorProvided": null,
+ "fileSets": null,
+ "sources": [
+ {
+ "path": "^empty\\.cxx$",
+ "isGenerated": null,
+ "fileSetName": null,
+ "sourceGroupName": "Source Files",
+ "compileGroupLanguage": "CXX",
+ "backtrace": [
+ {
+ "file": "^cxx/cross/CMakeLists\\.txt$",
+ "line": 9,
+ "command": "add_executable",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/cross/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "Source Files",
+ "sourcePaths": [
+ "^empty\\.cxx$"
+ ]
+ }
+ ],
+ "compileGroups": [
+ {
+ "language": "CXX",
+ "sourcePaths": [
+ "^empty\\.cxx$"
+ ],
+ "includes": null,
+ "frameworks": null,
+ "defines": null,
+ "compileCommandFragments": null
+ }
+ ],
+ "backtrace": [
+ {
+ "file": "^cxx/cross/CMakeLists\\.txt$",
+ "line": 9,
+ "command": "add_executable",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/cross/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": "^cxx_exe_test_launcher_and_cross_emulator(\\.exe)?$",
+ "artifacts": [
+ {
+ "path": "^cxx/cross/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?cxx_exe_test_launcher_and_cross_emulator(\\.exe)?$",
+ "_dllExtra": false
+ },
+ {
+ "path": "^cxx/cross/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?cxx_exe_test_launcher_and_cross_emulator\\.pdb$",
+ "_dllExtra": true
+ }
+ ],
+ "build": "^cxx/cross$",
+ "source": "^cxx/cross$",
+ "install": null,
+ "launchers" : [
+ {
+ "command": "^no-such-launcher(\\.exe)?$",
+ "type" : "test"
+ },
+ {
+ "command": "^no-such-emulator(\\.exe)?$",
+ "type" : "emulator"
+ }
+ ],
+ "link": {
+ "language": "CXX",
+ "lto": null,
+ "commandFragments": [
+ {
+ "fragment" : ".*",
+ "role" : "flags",
+ "backtrace": null
+ }
+ ]
+ },
+ "archive": null,
+ "dependencies": [
+ {
+ "id": "^ZERO_CHECK::@6890427a1f51a3e7e1df$",
+ "backtrace": null
+ }
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/cxx/CMakeLists.txt b/Tests/RunCMake/FileAPI/cxx/CMakeLists.txt
index 91a9969..c465297 100644
--- a/Tests/RunCMake/FileAPI/cxx/CMakeLists.txt
+++ b/Tests/RunCMake/FileAPI/cxx/CMakeLists.txt
@@ -46,4 +46,7 @@ if(_rdeps)
)
endif()
+add_executable(cxx_exe_test_launcher ../empty.cxx)
+set_property(TARGET cxx_exe_test_launcher PROPERTY TEST_LAUNCHER no-such-launcher)
+
add_subdirectory(cross)
diff --git a/Tests/RunCMake/FileAPI/cxx/cross/CMakeLists.txt b/Tests/RunCMake/FileAPI/cxx/cross/CMakeLists.txt
index 87baf19..2f2594f 100644
--- a/Tests/RunCMake/FileAPI/cxx/cross/CMakeLists.txt
+++ b/Tests/RunCMake/FileAPI/cxx/cross/CMakeLists.txt
@@ -5,3 +5,7 @@ set_property(TARGET cxx_exe_cross_emulator PROPERTY CROSSCOMPILING_EMULATOR no-s
add_executable(cxx_exe_cross_emulator_args ../../empty.cxx)
set_property(TARGET cxx_exe_cross_emulator_args PROPERTY CROSSCOMPILING_EMULATOR "no-such-emulator;arg1;arg2 with space")
+
+add_executable(cxx_exe_test_launcher_and_cross_emulator ../../empty.cxx)
+set_property(TARGET cxx_exe_test_launcher_and_cross_emulator PROPERTY TEST_LAUNCHER "no-such-launcher")
+set_property(TARGET cxx_exe_test_launcher_and_cross_emulator PROPERTY CROSSCOMPILING_EMULATOR "no-such-emulator")
diff --git a/Tests/RunCMake/property_init/Executable.cmake b/Tests/RunCMake/property_init/Executable.cmake
index ede0e4b..a5e4fb8 100644
--- a/Tests/RunCMake/property_init/Executable.cmake
+++ b/Tests/RunCMake/property_init/Executable.cmake
@@ -17,6 +17,7 @@ set(properties
# Metadata
"CROSSCOMPILING_EMULATOR" "emu" "<SAME>"
+ "TEST_LAUNCHER" "test" "<SAME>"
)
prepare_target_types(executable