Skip to content

Commit

Permalink
COMP: Re-introduce extension descriptions CMake tests
Browse files Browse the repository at this point in the history
This commit partially reverts 38f5351 (BUG: Remove failing extensions
manager tests) re-introducing the following tests inadvertently removed:

* cmake_slicer_extension_description_spec_defaults_test
* cmake_slicer_extension_metadata_set_defaults_test
* cmake_slicer_extract_extension_description_test
* cmake_slicer_generate_extension_description_test
  • Loading branch information
jcfr committed Aug 4, 2022
1 parent 947071a commit 28dd638
Show file tree
Hide file tree
Showing 4 changed files with 121 additions and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -816,6 +816,7 @@ if(BUILD_TESTING)
COPYONLY)

add_subdirectory(CMake/Testing)
add_subdirectory(Extensions/CMake/Testing)

if(Slicer_BUILD_CLI_SUPPORT)
set(SEM_LAUNCH_COMMAND ${Slicer_LAUNCH_COMMAND})
Expand Down
32 changes: 32 additions & 0 deletions Extensions/CMake/Testing/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

#
# Helper macro
#
macro(add_cmakescript_test testname script)
add_test(cmake_${testname} ${CMAKE_COMMAND}
-DTEST_${testname}:BOOL=ON
-P ${CMAKE_SOURCE_DIR}/${script})
set_tests_properties(cmake_${testname} PROPERTIES
LABELS CMake
PASS_REGULAR_EXPRESSION "SUCCESS")
endmacro()

#
# Add 'CMake script' Tests
#

add_cmakescript_test(
slicer_extension_description_spec_defaults_test
Extensions/CMake/SlicerExtensionDescriptionSpec.cmake)

add_cmakescript_test(
slicer_extension_metadata_set_defaults_test
Extensions/CMake/SlicerExtensionDescriptionSpec.cmake)

add_cmakescript_test(
slicer_extract_extension_description_test
Extensions/CMake/SlicerFunctionExtractExtensionDescription.cmake)

add_cmakescript_test(
slicer_generate_extension_description_test
Extensions/CMake/SlicerFunctionGenerateExtensionDescription.cmake)
44 changes: 44 additions & 0 deletions Extensions/CMake/Testing/extension_description_with_depends.s4ext
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#
# First token of each non-comment line is the keyword and the rest of the line
# (including spaces) is the value.
# - the value can be blank
#

# This is source code manager
scm git
scmurl https://github.com/jcfr/SlicerToKiwiExporter.git
scmrevision 9d7341e978df954a2c875240290833d7528ef29c

# list dependencies
# - These should be names of other modules that have .s4ext files
# - The dependencies will be built first
depends Foo Bar

# Inner build directory (default is ".")
build_subdirectory inner/inner-inner-build

# homepage
homepage https://www.slicer.org/w/index.php/Documentation/Nightly/Extensions/SlicerToKiwiExporter

# Firstname1 Lastname1 ([SubOrg1, ]Org1), Firstname2 Lastname2 ([SubOrg2, ]Org2)
# For example: Jane Roe (Superware), John Doe (Lab1, Nowhere), Joe Bloggs (Noware)
contributors Jean-Christophe Fillion-Robin (Kitware), Pat Marion (Kitware), Steve Pieper (Isomics), Atsushi Yamada (Shiga University of Medical Science)

# Match category in the xml description of the module (where it shows up in Modules menu)
category Exporter

# url to icon (png, size 128x128 pixels)
iconurl https://www.slicer.org/w/images/6/64/SlicerToKiwiExporterLogo.png

# Give people an idea what to expect from this code
# - Is it just a test or something you stand behind?
status Development

# One line stating what the module does
description The SlicerToKiwiExporter module provides Slicer user with any easy way to export models into a KiwiViewer scene file.

# Space separated list of urls
screenshoturls https://www.slicer.org/w/images/9/9e/SlicerToKiwiExporter_Kiwiviewer_8.PNG https://www.slicer.org/w/images/a/ab/SlicerToKiwiExporter_Kiwiviewer_9.PNG https://www.slicer.org/w/images/9/9a/SlicerToKiwiExporter_SaveDialog_Select-file-format_1.png

# 0 or 1: Define if the extension should be enabled after its installation.
enabled 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#
# First token of each non-comment line is the keyword and the rest of the line
# (including spaces) is the value.
# - the value can be blank
#

# This is source code manager
scm git
scmurl https://github.com/jcfr/SlicerToKiwiExporter.git
scmrevision 9d7341e978df954a2c875240290833d7528ef29c

# list dependencies
# - These should be names of other modules that have .s4ext files
# - The dependencies will be built first
depends NA

# Inner build directory (default is ".")
build_subdirectory .

# homepage
homepage https://www.slicer.org/w/index.php/Documentation/Nightly/Extensions/SlicerToKiwiExporter

# Firstname1 Lastname1 ([SubOrg1, ]Org1), Firstname2 Lastname2 ([SubOrg2, ]Org2)
# For example: Jane Roe (Superware), John Doe (Lab1, Nowhere), Joe Bloggs (Noware)
contributors Jean-Christophe Fillion-Robin (Kitware), Pat Marion (Kitware), Steve Pieper (Isomics), Atsushi Yamada (Shiga University of Medical Science)

# Match category in the xml description of the module (where it shows up in Modules menu)
category Exporter

# url to icon (png, size 128x128 pixels)
iconurl https://www.slicer.org/w/images/6/64/SlicerToKiwiExporterLogo.png

# Give people an idea what to expect from this code
# - Is it just a test or something you stand behind?
status Development

# One line stating what the module does
description The SlicerToKiwiExporter module provides Slicer user with any easy way to export models into a KiwiViewer scene file.

# Space separated list of urls
screenshoturls https://www.slicer.org/w/images/9/9e/SlicerToKiwiExporter_Kiwiviewer_8.PNG https://www.slicer.org/w/images/a/ab/SlicerToKiwiExporter_Kiwiviewer_9.PNG https://www.slicer.org/w/images/9/9a/SlicerToKiwiExporter_SaveDialog_Select-file-format_1.png

# 0 or 1: Define if the extension should be enabled after its installation.
enabled 1

0 comments on commit 28dd638

Please sign in to comment.