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

Paula Toth via Phabricator via libc-commits libc-commits at lists.llvm.org
Mon Jul 6 12:42:15 PDT 2020


PaulkaToast updated this revision to Diff 275800.

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82907/new/

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 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``


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82907.275800.patch
Type: text/x-patch
Size: 1276 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20200706/10f0cdad/attachment.bin>


More information about the libc-commits mailing list