Skip to content

Add unit tests for converting SDF to USD#796

Closed
adlarkin wants to merge 2 commits intoadlarkin/sdf_to_usdfrom
adlarkin/sdf_to_usd_TESTS
Closed

Add unit tests for converting SDF to USD#796
adlarkin wants to merge 2 commits intoadlarkin/sdf_to_usdfrom
adlarkin/sdf_to_usd_TESTS

Conversation

@adlarkin
Copy link
Copy Markdown
Contributor

Signed-off-by: Ashton Larkin 42042756+adlarkin@users.noreply.github.com

🎉 New feature

Summary

Adding unit tests for converting things like lights and models from SDF to USD.

Test it

You can build SDF and run the UNIT_sdf_usd_TEST executable:

mkdir build
cd build
cmake ..
make -j 10
cd build/src
./UNIT_sdf_usd_TEST

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

Signed-off-by: Ashton Larkin <42042756+adlarkin@users.noreply.github.com>
Signed-off-by: Ashton Larkin <42042756+adlarkin@users.noreply.github.com>
Copy link
Copy Markdown

@koonpeng koonpeng left a comment

Choose a reason for hiding this comment

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

usd has a known bug PixarAnimationStudios/OpenUSD#86 which causes it to exit the process cleanly if there is a fatal error. This can cause ci to stop early and report success if the program ever "crashes".

I can think of some workarounds

  1. fix upstream
  2. make all tests death tests, this is an ugly workaround which forks the process for every tests, the googletest docs mentions issues with forks which need to be worked around as well http://google.github.io/googletest/advanced.html#death-tests-and-threads.
  3. make a custom test runner which either captures and check stdout of the tests, or have each test write some artifacts and have the runner check them at the end.

@adlarkin
Copy link
Copy Markdown
Contributor Author

I am going to close this PR since the testing done here has been moved to #818, but I realize that we probably still need to address #796 (review) at some point. I have made a separate issue for this so that it can be discussed and worked on there: https://github.com/ignitionrobotics/sdformat/issues/826

@adlarkin adlarkin closed this Jan 20, 2022
@adlarkin adlarkin deleted the adlarkin/sdf_to_usd_TESTS branch March 24, 2022 15:05
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.

5 participants