Skip to content

COMP: Rename test names that collide with ITK core tests#56

Merged
hjmjohnson merged 1 commit into
mainfrom
fix-duplicate-test-names
Jul 18, 2026
Merged

COMP: Rename test names that collide with ITK core tests#56
hjmjohnson merged 1 commit into
mainfrom
fix-duplicate-test-names

Conversation

@hjmjohnson

Copy link
Copy Markdown
Member

Rename the two test names that collide with ITK core tests, which ITK's nightly dashboards report as AUTHOR_WARNINGs whenever this module is enabled.

Beyond the warning noise, duplicate test names share ITK's Cleanup_<name> fixture, so the colliding tests race under ctest -j.

The collision

itk_add_test keeps a global registry of test names (CMake/ITKModuleTest.cmake). Two names here are already registered by ITK core:

Test name ITK core owner
itkGradientMagnitudeImageFilterTest1 Modules/Filtering/ImageGradient/test/CMakeLists.txt
itkCannyEdgeDetectionImageFilterTest2 Modules/Filtering/ImageFeature/test/CMakeLists.txt

ITK warns rather than fails for remote-module collisions, because they cannot be fixed in the ITK tree:

# Duplicate names share the Cleanup_<name> fixture and race under ctest -j.
# Remote modules live in separate repositories, so a collision they cause
# cannot be fixed in this tree; warn instead of failing the configure.

Observed on the ITK nightly Linux-Ubuntu-GCC-Doxygen (blaster.kitware), https://open.cdash.org/builds/11424939/configure — 2 warnings, both from this module. No other module in that build produces any.

The module's other ~48 test names are unique and unchanged.

Verification

Full ITK configure with -DModule_LesionSizingToolkit=ON, same source tree and build directory for both runs:

Configure Duplicate test name warnings
ITK's currently pinned tag of this module 2 (reproduces the dashboard exactly)
Same tree with this change applied 0

Resulting ctest registrations — four distinct tests where there were two collisions:

#1792 itkCannyEdgeDetectionImageFilterTest2                        (ITK core)
#1933 itkGradientMagnitudeImageFilterTest1                         (ITK core)
#3722 LesionSizingToolkitGradientMagnitudeImageFilterTest1         (this module)
#3729 LesionSizingToolkitCannyEdgeDetectionImageFilterTest2        (this module)

Scope of the change: only the NAME argument of two itk_add_test calls. The executables, arguments, --compare baselines, and the .mha output filenames are untouched, and neither old name is referenced anywhere else in this repository.

Landing this does not by itself clear the dashboard warnings — ITK pins this module by commit in Modules/Remote/LesionSizingToolkit.remote.cmake (currently affbf7b0958205e2aab388bf0c3b7b1d5b0089de), so that pin needs bumping in a follow-up ITK change once this merges.

itkGradientMagnitudeImageFilterTest1 and itkCannyEdgeDetectionImageFilterTest2
are already registered by ITK's ImageGradient and ImageFeature modules, so a
build with this remote module enabled emits AUTHOR_WARNINGs from
itk_add_test and the two tests share ITK's Cleanup_<name> fixture, which
races under ctest -j.

Prefix both with the module name to make them unique. Only the ctest test
name changes; the executables, arguments, and baseline files are unchanged.
@hjmjohnson
hjmjohnson marked this pull request as ready for review July 18, 2026 20:54

@hjmjohnson hjmjohnson left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a test name change to remove conflicts with core ITK.

@hjmjohnson
hjmjohnson merged commit 8a02cdb into main Jul 18, 2026
2 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant