Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

itkFEMElement2DC0LinearQuadrilateralStressTestFEMObjectReader has hard-coded I/O filenames #4417

Open
jhlegarreta opened this issue Jan 21, 2024 · 1 comment
Labels
type:Testing Ensure that the purpose of a class is met/the results on a wide set of test cases are correct

Comments

@jhlegarreta
Copy link
Member

Description

The itkFEMElement2DC0LinearQuadrilateralStressTestFEMObjectReader test in the FEM module has hard-coded I/O filenames. Additionally, it is not listed in the FEM module's test directory CMakeLists.txt file, so even if the module and testing are turned ON when configuring ITK, the build will succeed.

Steps to Reproduce

  1. Check-out ITK.
  2. Turn on the FEM module and building the tests when configuring.
  3. Build.
  4. Run ctest -V -R itkFEMElement2DC0LinearQuadrilateralStressTestFEMObjectReader -C Debug: no test will be found.

Expected behavior

No hard-coded paths should exist: the test should have its I/O arguments specified in the corresponding CMakeLists.txt entry.

Actual behavior

The itkFEMElement2DC0LinearQuadrilateralStressTestFEMObjectReader test in the FEM module has hard-coded I/O filenames. Additionally, it is not listed in the FEM module's test directory CMakeLists.txt file, so the test is not run even if turning ON the FEMmodule and building tests; it will fail if doing so, and adding an entry to CMakeLists.txt since the I/O filenames are hard-coded.

Reproducibility

100%.

Versions

ITK master.

Environment

Any

Additional Information

Its Trial.meta input file is not found on the current ITK source code tree; SpatialObjects.meta is found at https://github.com/InsightSoftwareConsortium/ITK/blob/5cf4a7226f1be5133f96fe7fcb49ba1fc367d525/Testing/Data/Input/SpatialObjects.meta.cid.

The test (including the hard-coded paths) was added by commit 23f10a9 (Kent Williams authored and @hjmjohnson committed on Jul 15, 2011). It does not look like Trial.meta has ever been committed.

@jhlegarreta jhlegarreta added the type:Testing Ensure that the purpose of a class is met/the results on a wide set of test cases are correct label Jan 21, 2024
@jhlegarreta
Copy link
Member Author

Slightly related: itkFEMElementTest does also have some hard-coded paths:

char listloc[] = "../../Insight/Testing/Data/Input/FEM/input-list";

and
char filepath[] = "../../Insight/Testing/Data/Input/FEM/";

These should be given as parameters in the CMakeLists.txt file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:Testing Ensure that the purpose of a class is met/the results on a wide set of test cases are correct
Projects
None yet
Development

No branches or pull requests

1 participant