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

Paula Toth via Phabricator via libc-commits libc-commits at lists.llvm.org
Tue Jul 7 00:29:03 PDT 2020


This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rGaa6ef6fea0f0: [libc] Add documentation for integration tests. (authored by PaulkaToast).

Changed prior to commit:
  https://reviews.llvm.org/D82907?vs=274597&id=275626#toc

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.275626.patch
Type: text/x-patch
Size: 1276 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20200707/2b441fc0/attachment.bin>


More information about the libc-commits mailing list