Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • otb otb
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 207
    • Issues 207
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Main Repositories
  • otbotb
  • Merge requests
  • !173

Remove all *New tests

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Julien Michel requested to merge 1649-remove-New-tests into develop Jul 19, 2018
  • Overview 11
  • Commits 16
  • Pipelines 0
  • Changes 678

Summary

This MR is part of #1649 story. It removes all New tests code, and CMake test declarations.

Rationale

New test are a legacy from the beginning of OTB. They only contain a template class declaration and instanciation by calling the New() method. The rationale behind New tests is that if you have template code and you do not at least do that, the code is actually never compiled (and thus checked for compilation errors). While this sounds reasonable, in fact most of classes also have a more complete testing, which starts with template declaration and instanciation, doing the job of the New test already.

New tests thus mostly provides additional *.o to build and additional tests to run, with a marignal impact on code coverage.

This MR remove 344 *.o and associated tests, and should speed up the build/test process.

Implementation Details

Remove cxx files: find . -name *New.cxx | xargs git rm

Remove associated REGISTER_TESTS() in test drivers: find . -name *TestDriver.cxx | xargs sed -i '/.*New/d'

Remove build of cx files: find . -name CMakeLists.txt | xargs sed -i '/New.cxx$/d'

Remove tests declaration (a few manual fixes required): find . -name CMakeLists.txt | xargs sed -i '/add_test(NAME .*New/,+2d'

After that, there are still 25 new tests that are declared in other cxx tests files, which should be removed manually.

Copyright

The copyright owner is CNES and has signed the ORFEO ToolBox Contributor License Agreement.


***Check before merging:*** - All discussions are resolved - At least 2 👍 votes from core developers, no 👎 vote. - The feature branch is (reasonably) up-to-date with the base branch - Dashboard is green - Copyright owner has signed the ORFEO ToolBox Contributor License Agreement
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: 1649-remove-New-tests