[libc-commits] [PATCH] D82907: [libc] Add documentation for integration tests.

Paula Toth via Phabricator via libc-commits libc-commits at lists.llvm.org
Tue Jun 30 13:36:07 PDT 2020


PaulkaToast created this revision.
PaulkaToast added a reviewer: sivachandra.
PaulkaToast added a project: libc-project.
Herald added subscribers: libc-commits, ecnelises, tschuett.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D82907

Files:
  libc/docs/integration_test.rst


Index: libc/docs/integration_test.rst
===================================================================
--- /dev/null
+++ 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 would ensure that, after building, the produced
+library and headers would be usable in the C runtime. A simple solution would
+have been to have contributors write an integration test for each individual
+function as a C program; however, this would have placed a large burden on
+contributors and duplicates some effort from the unit tests.
+
+Instead we automated the generation of integration tests by modeling it from our
+generated headers. These integration tests ensured 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`


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82907.274597.patch
Type: text/x-patch
Size: 1303 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20200630/60952644/attachment.bin>


More information about the libc-commits mailing list