-
Notifications
You must be signed in to change notification settings - Fork 173
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
Issues with googletest conversion and test writing documentation #5029
Comments
There is another open issue that is potentially related to this issue. #4864 describes several learning moments that might be good to add to the documentation. One particularly subtle problem in the application is worth highlighting. You cannot call Process::SetOutputCube("TO") in your main as it will segfault. You must call the other method with the same name that takes a filename and cube attributes. |
We should probably also deprecate all of those Application functions to indicate that people should not use them. |
I am in the process of migrating from MacOS 10.15 Catalina to MacOS 12 Monterey, which has been released for a year now. (NOTE: Mac support needs clarity.) In my first attempt to build ISIS on Monterey, it appears to fail on Googetest itself. This may be because the Googletest version ISIS is pinned to is 3-4 years old. Note I tried both Xcode versions 13.4.1 and 14 and both failed. I may look into Xcode 12.3 which looks like that SDK is explicitly being referenced in the build.
Results in this immediate compile error:
|
Yeah we've started encountering this issue now that we are able to upgrade to a newer Mac OS version. We're working on figuring out what commit of gtest we should move to. The more recent commits fix this but appear to introduce other issues and are not compatible with older OS. We may need to move gtest from a static included dependency to a separate dependency per OS. |
I will just mention that the process by which external developers can update the ISIS test data area is not defined. The other mention I wanted to make is the current ISIS test framework (i.e., Fixtures) can lead to merge conflicts. However, it appears you are aware of this issue. |
Can you also provide status on the app/unit conversion effort? How many are completed? How many remain? Are there plans to complete this work? |
The fixture conflicts should be greatly reduced by splitting the massive file up into multiple files. It will still happen sometimes, but less often. We don't have a concerted effort to complete the app conversion processes because there are so many apps and they are relatively low value. So, we're just doing it as needed for test improvements and other improvements. We should setup a process for external people to request apps to be prioritized for conversion. I know @victoronline asked about this too. |
For updating legacy makefil test data, we are trying not to do that and instead convert the app the app to a callable. So, maybe that can be incorporated into conversion requests. That way, we're not updating test data that will eventually be removed. |
Please add guidelines/recommendations for data inclusion in tests. There is understandable concern about data volumes in all aspects of the ISIS system. However, fabrication of data for tests purposes should be discouraged where real data should be used. (Is it possible to utilize on-demand download of, say, image data from external sources for tests in real time?) In the work to convert the NEAR/MSI camera model (see #4887), I had to rely on you, @jessemapel, to produce ISD data for testing - something I had no knowledge of how/why to do it and the process is not documented in this context. |
Thanks for the comment. The project, during the major test conversion efforts, made the decision to use fabricated or cooked data to the greatest extent possible. This decision was made in part because of the test volume. The other, more significant issue, is that using fabricated data yields better unit tests. They allow testing a range of edge cases and better overall validation of the underlying algorithm implementations. Sure, they take more time to write, but they are better tests. This is not universally applied as you will some some applications (such as ingestion) where cropped versions of the data are used. |
There is a time and a place for real data. Things like calibration and photometric apps should use real data, but they should use very deliberately chosen small data sets. It's worth having something about when and where it is appropriate. |
Thank you for your contribution! Unfortunately, this issue hasn't received much attention lately, so it is labeled as 'stale.' If no additional action is taken, this issue will be automatically closed in 180 days. |
This issue is for collecting problems with the googletest and test conversion documentation on the wiki:
https://github.com/USGS-Astrogeology/ISIS3/wiki/Writing-ISIS-Tests-Using-Gtest-and-Ctest
The text was updated successfully, but these errors were encountered: