[libc-commits] [libc] aa6ef6f - [libc] Add documentation for integration tests.

Paula Toth via libc-commits libc-commits at lists.llvm.org
Mon Jul 6 12:45:20 PDT 2020


Author: Paula Toth
Date: 2020-07-06T12:44:32-07:00
New Revision: aa6ef6fea0f0195779559350b42590b9e251a7d2

URL: https://github.com/llvm/llvm-project/commit/aa6ef6fea0f0195779559350b42590b9e251a7d2
DIFF: https://github.com/llvm/llvm-project/commit/aa6ef6fea0f0195779559350b42590b9e251a7d2.diff

LOG: [libc] Add documentation for integration tests.

Reviewers: sivachandra

Reviewed By: sivachandra

Subscribers: MaskRay, tschuett, ecnelises, libc-commits

Tags: #libc-project

Differential Revision: https://reviews.llvm.org/D82907

Added: 
    libc/docs/integration_test.rst

Modified: 
    

Removed: 
    


################################################################################
diff  --git a/libc/docs/integration_test.rst b/libc/docs/integration_test.rst
new file mode 100644
index 000000000000..dd3962bdeae6
--- /dev/null
+++ b/libc/docs/integration_test.rst
@@ -0,0 +1,19 @@
+Integration Tests
+=====================
+The implementation of libc-project is unique because our public C header files
+are generated using information from TableGen. Unit tests only exercise the
+internal C++ implementations and don't ensure the headers were generated by the
+build system. End to end testing ensures that, after building, the produced
+library and headers are usable in the C runtime. A simple solution is to have
+contributors write an integration test for each individual function as a C
+program; however, this would place a large burden on contributors and duplicates
+some effort from the unit tests.
+
+Instead we automate the generation of integration tests by modeling it from our
+generated headers. These integration tests ensure that public facing symbols are
+visible, that header files are generated as expected, and that each libc
+function has the correct function prototype.
+
+The integration test cmake rules are located in ``test/src/CMakeLists.txt`` and
+the generated integration test lives in
+``llvm/build/projects/libc/test/src/public_integration_test.cpp``


        


More information about the libc-commits mailing list