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

how to compare doxygen and sphinx html, esp. in test framework #121

Open
svenevs opened this issue Nov 28, 2021 · 0 comments
Open

how to compare doxygen and sphinx html, esp. in test framework #121

svenevs opened this issue Nov 28, 2021 · 0 comments

Comments

@svenevs
Copy link
Owner

svenevs commented Nov 28, 2021

Below is a note to myself primarily, need docs on how to debug / compare things with doxygen for others. If a user wants to compare the sphinx vs doxygen output, the need to

  1. Make sure to set GENERATE_HTML = YES in their doxygen configurations.

  2. If examining a test case,

    • from testing.decorators import no_cleanup and decorate a given test function with @no_cleanup. Then
    • In the test body self.app.build() (to actually get sphinx to generate html).

    Then testing/projects/{TestCase.test_project} folder will have a docs_TestClass_test_method_name/ folder inside of it, the doxygen html appears in _doxygen/html and the sphinx html in _build/html.

diff --git a/testing/tests/cpp_nesting.py b/testing/tests/cpp_nesting.py
index f59627c..5b26d30 100644
--- a/testing/tests/cpp_nesting.py
+++ b/testing/tests/cpp_nesting.py
@@ -17,7 +17,7 @@ from textwrap import dedent
 from exhale.utils import heading_mark
 
 from testing.base import ExhaleTestCase
-from testing.decorators import confoverrides
+from testing.decorators import confoverrides, no_cleanup
 from testing.hierarchies import                                                        \
     class_hierarchy, compare_class_hierarchy, compare_file_hierarchy, file,            \
     file_hierarchy
@@ -186,9 +186,12 @@ class CPPNestingPages(ExhaleTestCase):
         "exhaleDoxygenStdin": dedent("""\
             INPUT            = ../include
             EXCLUDE_PATTERNS = */page_town_rock_alt.hpp
+            GENERATE_HTML    = YES
         """)})
+    @no_cleanup
     def test_hierarchies_primary_mainpage(self):
         """Verify the class, file, and page hierarchies."""
+        self.app.build()
         self.check_most_pages(uses_mainpage=True)
         # Last but not least, we expect the hierarchy to *not* have indexpage.
         expected_page_hierarchy = dedent(r"""
@@ -209,9 +212,12 @@ class CPPNestingPages(ExhaleTestCase):
         "exhaleDoxygenStdin": dedent("""\
             INPUT            = ../include
             EXCLUDE_PATTERNS = */page_town_rock.hpp
+            GENERATE_HTML    = YES
         """)})
+    @no_cleanup
     def test_hierarchies_primary_no_mainpage(self):
         """Verify the class, file, and page hierarchies."""
+        self.app.build()
         self.check_most_pages(uses_mainpage=False, main_refid="overview")
 
         # Last but not least, we expect the hierarchy to *not* have indexpage.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant