Skip to content

add unit tests for embree#952

Merged
teseoch merged 19 commits intolibigl:devfrom
rayform:embreeUnitTests
Nov 4, 2018
Merged

add unit tests for embree#952
teseoch merged 19 commits intolibigl:devfrom
rayform:embreeUnitTests

Conversation

@ikoruk
Copy link
Copy Markdown
Contributor

@ikoruk ikoruk commented Oct 17, 2018

Unit test for embree, in preparation of #947

@jdumas jdumas requested a review from qnzhou October 18, 2018 17:57
@qnzhou
Copy link
Copy Markdown
Collaborator

qnzhou commented Oct 18, 2018

Thanks @ikoruk , just FYI, we are in the process of migrating to Catch2 instead of google unit test.

@alecjacobson
Copy link
Copy Markdown
Contributor

This looks good. Is there a special way I'm suppose to mark this as reviewed?

Copy link
Copy Markdown
Collaborator

@qnzhou qnzhou left a comment

Choose a reason for hiding this comment

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

Looks good to me. Not directly related, but I kind of think EmbreeIntersector class should be templated. The PointMatrixType and FaceMatrixType are hard coded to be column major, which may be inefficient. @alecjacobson @jdumas

Copy link
Copy Markdown
Contributor

@alecjacobson alecjacobson left a comment

Choose a reason for hiding this comment

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

Looks good (I figured out reviewing).

@alecjacobson
Copy link
Copy Markdown
Contributor

I agree @qnzhou , but that looks like a separate PR to me.

@fwilliams
Copy link
Copy Markdown
Collaborator

fwilliams commented Oct 19, 2018

@qnzhou We're going to need to fix that for the Python bindings. Is there an open issue?

Alternatively, @ikoruk could you maybe do this in your PR #947? If not, then no big deal, we'll end up doing it in the dev-python branch.

@ikoruk ikoruk mentioned this pull request Oct 22, 2018
@ikoruk
Copy link
Copy Markdown
Contributor Author

ikoruk commented Oct 23, 2018

I discovered a bug in intersectBeam and issued a fix into this PR yesterday, so this should be re-reviewed before merging.

Copy link
Copy Markdown
Collaborator

@fwilliams fwilliams 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. As far as I can tell, it doesn't depend on the embree version bump PR (#947).

Can I propose we merge this before the Catch2 changes? @teseoch, if we merge this first, do you mind porting it over to Catch2 as part of your other changes?

@fwilliams fwilliams mentioned this pull request Oct 24, 2018
5 tasks
@teseoch
Copy link
Copy Markdown
Collaborator

teseoch commented Oct 24, 2018

there is a script (posted on the other PR) to convert a google test into Catch2 test

teseoch added 3 commits October 29, 2018 18:22
@teseoch teseoch self-requested a review October 29, 2018 22:30
@teseoch
Copy link
Copy Markdown
Collaborator

teseoch commented Oct 29, 2018

I updated the test to catch2. @ikoruk can you check?

Copy link
Copy Markdown
Collaborator

@teseoch teseoch left a comment

Choose a reason for hiding this comment

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

it seems that windows cannot see the tests anymore

@ikoruk
Copy link
Copy Markdown
Contributor Author

ikoruk commented Oct 30, 2018

@teseoch The changes look fine to me but I haven't used catch, don't know what would make it skip tests on windows.

@jdumas
Copy link
Copy Markdown
Collaborator

jdumas commented Nov 3, 2018

Alright, I managed to compile embree statically on Windows, the build on AppVeyor looks ok now!

As for why unit-tests were not showing on AppVeyor before, this has to do with the way Catch2 discovers unit tests and populates the CTest config. Indeed, the macro catch_discover_tests() will run internally ./igl_tests to get the list of available unit tests. Now, because of the new CMake setup, the executable igl_tests.exe was not finding the embree3.dll at runtime, and thus was not able to create the list of tests for CTest. Which is why igl_tests.exe was compiled correctly but no tests were found on AppVeyor. catch_discover_tests() interprets the return code of the unit test program as the number of tests to be defined (and then proceeds to parse the stdout). I don't have the energy to test this, but I suspect that a missing dll produces a return code > 0, which is why no error was reported by AppVeyor and no test was run.

@teseoch teseoch merged commit b7124f1 into libigl:dev Nov 4, 2018
@ikoruk ikoruk deleted the embreeUnitTests branch November 5, 2018 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants