ENH: Convert 8 IO/ImageBase tests to GoogleTest#6177
Merged
hjmjohnson merged 2 commits intoInsightSoftwareConsortium:mainfrom May 4, 2026
Merged
ENH: Convert 8 IO/ImageBase tests to GoogleTest#6177hjmjohnson merged 2 commits intoInsightSoftwareConsortium:mainfrom
hjmjohnson merged 2 commits intoInsightSoftwareConsortium:mainfrom
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
a8b5f6a to
60a130c
Compare
2 tasks
hjmjohnson
added a commit
to hjmjohnson/ITK
that referenced
this pull request
May 1, 2026
The pinned v0.8 (2018-2019) ships an action that builds the Go binary from source on every CI run. Each build downloads dependencies from gopkg.in, which intermittently fails the TLS handshake and aborts the labeling job. The failure has been observed across multiple recent PRs (InsightSoftwareConsortium#5775, InsightSoftwareConsortium#6177, InsightSoftwareConsortium#6164 -- 'Docker build failed with exit code 1' from 'go: gopkg.in/check.v1: net/http: TLS handshake timeout'). srvaroa/labeler ships a pre-built Docker image starting at v1.8.1, so newer versions skip the Go-compile step entirely. The maintainer publishes a floating 'v1' major tag that auto-tracks minor/patch releases; v1.14.0 is current upstream. The v1 schema replaces the v0.8-era flat dict-of-rules with a 'version: 1' header + 'labels:' list of {label, title, files, ...} objects, so .github/labeler.yml is migrated alongside the workflow bump. Pattern semantics are unchanged: both v0.8 and v1 use Go's RE2 regex engine, matching unanchored against PR file paths -- so existing patterns like 'Modules/IO/*' (which is regex 'Modules/IO/' followed by zero-or-more '/') continue to behave the same in v1.
Mechanical CTest -> GTest conversion for the no-argument tests in Modules/IO/ImageBase/test: - itkImageFileReaderTest1 -> itkImageFileReaderGTest1 - itkImageIOFileNameExtensionsTests -> itkImageIOFileNameExtensionsGTests - itkConvertBufferTest2 -> itkConvertBufferGTest2 - itkNumericSeriesFileNamesTest -> itkNumericSeriesFileNamesGTest - itkConvertBufferTest -> itkConvertBufferGTest - itkIOCommonTest2 -> itkIOCommonGTest2 - itkIOCommonTest -> itkIOCommonGTest - itkImageIOBaseTest -> itkImageIOBaseGTest Each conversion preserves intent and assertions; ITK_TRY_EXPECT_EXCEPTION becomes EXPECT_THROW, ITK_TEST_EXPECT_EQUAL becomes EXPECT_EQ, and ITK_EXERCISE_BASIC_OBJECT_METHODS becomes ITK_GTEST_EXERCISE_BASIC_OBJECT_METHODS.
60a130c to
53f92f5
Compare
dzenanz
approved these changes
May 4, 2026
Member
dzenanz
left a comment
There was a problem hiding this comment.
Looks good with this file rename which ensures git tracking continuity.
b5745aa
into
InsightSoftwareConsortium:main
9 of 13 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mechanical CTest → GTest conversion for the 8 no-argument tests in
Modules/IO/ImageBase/test. Each test was renamed viagit mv, body translated to GTest macros (EXPECT_THROW,EXPECT_EQ,ITK_GTEST_EXERCISE_BASIC_OBJECT_METHODS), removed from the legacy test driver, and registered inITKIOImageBaseGTests.Tests converted
Test plan
cmake --build build --target ITKIOImageBaseGTestDriversucceedsctest -R '^…\.ConvertedLegacyTest\$')pre-commit run --all-filesclean on final tree