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

Refactor/testing #98

Merged
merged 34 commits into from
Nov 1, 2021
Merged

Refactor/testing #98

merged 34 commits into from
Nov 1, 2021

Conversation

MishaZakharchanka
Copy link
Contributor

This pull request deals with a few changes/additions to Spheral's testing:
-Moving all tests into a separate testing directory
-Adding C++ tests to the integration.ats
-installing all the tests to be in the same location as our python install

INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib;${boost_DIR}/lib;${python_DIR}/lib"
INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib;${boost_DIR}/lib;${python_DIR}/lib;${conduit_DIR}/lib"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Revert this change we shouldn't need to include the conduit lib directory in our rpaths any more.

@MishaZakharchanka MishaZakharchanka marked this pull request as ready for review October 20, 2021 22:12
Comment on lines 13 to 18
100 0.0510675624557
100 0.109837589561
100 0.0510675624557
100 0.109837589561
100 0.109837589561
100 0.109837589561
Copy link
Collaborator

Choose a reason for hiding this comment

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

@jmikeowen Is this a file that we usually have in the spheral source or is it generated by the tests, I know it sometimes shows up in my git status reports. If it's generated then we should remove it.

Copy link
Collaborator

Choose a reason for hiding this comment

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

That is generated by the some of the Noh tests when they run. It should be treated the same way we treat any other output from such things I suppose. It's not part of the repot.

Copy link
Collaborator

@mdavis36 mdavis36 left a comment

Choose a reason for hiding this comment

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

There are a couple of files where it looks like there is still a bad merge conflict, all of the test file changes should show up essentially as name changes. It also appears that there are some generated test result/output files that are getting added into this new directory structure from the old one

Comment on lines 7 to 12
# GSPH
#
#ATS:gsph1 = test( SELF, "--gsph True --nx1 500 --nx2 30 --cfl 0.45 --graphics None --clearDirectories True --restartStep 20 --steps 40", label="Planar Water-Gas Sod problem with GSPH -- 1-D (serial)")
#ATS:gsph2 = testif(gsph1, SELF, "--gsph True --nx1 500 --nx2 30 --cfl 0.45 --graphics None --clearDirectories False --restartStep 20 --steps 20 --restoreCycle 20 --checkRestart True", label="Planar Water-Gas Sod problem with GSPH -- 1-D (serial) RESTART CHECK")
#

Copy link
Collaborator

Choose a reason for hiding this comment

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

@MishaZakharchanka It looks like there are still some merge conflicts to resolve in this file and a few others.

@MishaZakharchanka
Copy link
Contributor Author

I believe I have fixed the merge problems and removed the generated files from the branch. All tests pass for me, let me know if there are any other changes/problems.

Copy link
Collaborator

@jmikeowen jmikeowen left a comment

Choose a reason for hiding this comment

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

This looks good to me. One question for the future -- do we want to support different methods of install? For instance, should we support installing just the necessary bits to run the code when installing public releases? Currently installing the tests/ directory isn't too onerous, but if we add more reference data to test for instance that size could grow.

@mdavis36
Copy link
Collaborator

mdavis36 commented Oct 21, 2021

This looks good to me. One question for the future -- do we want to support different methods of install? For instance, should we support installing just the necessary bits to run the code when installing public releases? Currently installing the tests/ directory isn't too onerous, but if we add more reference data to test for instance that size could grow.

I think it's reasonable to have a flag for installing tests or not. ENABLE_TESTS is the conventional flag given for building tests so I don't see why we couldn't use it for the install logic with the rest of the python tests and reference data.

@MishaZakharchanka can you add a check around the install and "add_subdirectory" logic in CMakeLists.txt to see if ENABLE_TESTS is true.

Copy link
Collaborator

@mdavis36 mdavis36 left a comment

Choose a reason for hiding this comment

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

Looking at a clean clone of the directory structure there still seems to be a number of src/***/test/ directories floating around please move those over to test/unit/.

Can we change the Unit and Functional directories to lowercase. The only place we don't do that is our src/* directories as they represent their respective module names.

@jmikeowen in our functional tests we have EvardSphericalCollapse, KeplerianPressureDisk and SelfSimilarCollapse floating around on their own. Is there a directory they might be better placed or should we just leave them as is?

CMakeLists.txt Outdated
Comment on lines 10 to 17
if (ENABLE_TESTS)
add_subdirectory(${SPHERAL_ROOT_DIR}/tests/Unit/CXXTests)

install(DIRECTORY ${SPHERAL_ROOT_DIR}/tests/
DESTINATION ${CMAKE_INSTALL_PREFIX}/tests
PATTERN "runCXXTests.ats" EXCLUDE
)
endif()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we move this logic into SetupSpheral.cmake as this logic will be needed in LLNLSpheral as well.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Those are all variations on tests that include gravity+hydro. For now keep 'em as is, I suppose we could add a hydrodyanmics and gravity test directory as well at some point.

@MishaZakharchanka MishaZakharchanka merged commit 6de1215 into develop Nov 1, 2021
@MishaZakharchanka MishaZakharchanka deleted the refactor/testing branch November 4, 2021 23:28
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.

3 participants