Make OpenGL optional in tests

Summary: Add an option to run tests without the OpenGL Renderer.

Reviewed By: patricklabatut

Differential Revision: D53573400

fbshipit-source-id: 54a14e7b2f156d24e0c561fdb279f4a9af01b793
This commit is contained in:
Jeremy Reizenstein
2024-02-13 07:43:42 -08:00
committed by Facebook GitHub Bot
parent c292c71c1a
commit 8772fe0de8
6 changed files with 67 additions and 23 deletions

View File

@@ -24,6 +24,13 @@ def interactive_testing_requested() -> bool:
return os.environ.get("PYTORCH3D_INTERACTIVE_TESTING", "") == "1"
def skip_opengl_requested() -> bool:
return os.environ.get("PYTORCH3D_NO_TEST_OPENGL", "") == "1"
usesOpengl = unittest.skipIf(skip_opengl_requested(), "uses opengl")
def get_tests_dir() -> Path:
"""
Returns Path for the directory containing this file.