Skip to content

Comments

WIP: Refactor test/CMakeLists.txt to adhere to ITK module convention#900

Open
axel-grc wants to merge 1 commit intoRTKConsortium:mainfrom
axel-grc:Tests
Open

WIP: Refactor test/CMakeLists.txt to adhere to ITK module convention#900
axel-grc wants to merge 1 commit intoRTKConsortium:mainfrom
axel-grc:Tests

Conversation

@axel-grc
Copy link
Collaborator

  • Changed the main function in various test files to specific test function names .
  • Updated the CMakeLists of tests to follow itk convention with createtestdriver

Close #896

@axel-grc
Copy link
Collaborator Author

There is a problem with the example tests: with the ITK convention, tests are dispatched by the test driver and must provide an entrypoint like int (int,char**). The examples are standalone programs with a main(), and I don’t think it’s a good idea to rewrite their main just to fit the test driver pattern.

For now, I kept the previous approach only for examples: build each example as its own executable and register it with CTest via itkTestDriver.

Do you have any insight on this, @SimonRit

@SimonRit
Copy link
Collaborator

There is a problem with the example tests: with the ITK convention, tests are dispatched by the test driver and must provide an entrypoint like int (int,char**). The examples are standalone programs with a main(), and I don’t think it’s a good idea to rewrite their main just to fit the test driver pattern.

For now, I kept the previous approach only for examples: build each example as its own executable and register it with CTest via itkTestDriver.

Do you have any insight on this, @SimonRit

I'm not following. This seems to be the convention of a main function in C which is ok to adopt for all examples as is done in FirstReconstruction:
https://github.com/RTKConsortium/RTK/blob/main/examples/FirstReconstruction/FirstCudaReconstruction.cxx#L12

@axel-grc axel-grc force-pushed the Tests branch 6 times, most recently from 94254f4 to 1b84313 Compare February 18, 2026 09:44
- Changed the main function in various test files to specific test function names .
- Updated the CMakeLists of tests to follow itk convention with createtestdriver
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.

Refactor test/CMakeLists.txt to adhere to ITK module convention

2 participants