Introduces a pw_facade template that provides a useful error message
when a backend is used but not properly set. This change also changes
pigweed to build pw_docs and module tests by default.
Change-Id: Ie78a0e291782592289baa94d06fd06e493c56956
Have pw_test_group create a *_run test group that runs all of the tests
in that group and dependent groups. This allows, for example, using
pw_module_tests_run to run all tests without rebuilding the docs.
Change-Id: I5b37129e94c1cc0f44085e02b0093848f1f8d249
This change adds a pw_varint module containing functions for encoding
and decoding variable-length integers.
Change-Id: I50bdf6d9d6762bffb93ee638683de53afed9c849
This change adds a GN template to the pw_unit_test module which defines
a group of unit tests. The template creates a generated_file target with
JSON metadata for the unit tests and dependencies within the test group.
These metadata files are intended to be parsed by the test runner script
to run unit tests outside of GN.
A pw_test_group target is added to each of the existing modules which
have unit tests.
Change-Id: I363b937da365d0a3482a979feace18ecba1807a9
This change introduces the pw_dumb_io module, a module intended for
pigweed testing and bringup. pw_dumb_io includes a facade, and a backend
implementation using stdio (pw_dumb_io_stdio).
Change-Id: I5d9ca3c256c7e7c6d60cc07292aaead808a7f3dd
This change adds a docs directory at the root level of the Pigweed
repository for building documentation for the entirety of Pigweed.
The directory contains a top-level index.rst and conf.py for docgen,
and a pw_doc_gen build target to render the documentation.
Change-Id: Iba981c64662d48a1d23bb7bda9bf0ed5a104873b
This change adds a size reporting module named pw_bloat. The module
uses Bloaty McBloatface to generate size report cards for binaries. It
provides a GN template which defines an action to perform a size diff
on a group of binary targets.
Example output:
simple_bloat
────────────
┌────────────────┬──────────────┬────────┬───────┬───────┐
│ Label │ Segment │ Before │ Delta │ After │
├════════════════┼══════════════┼════════┼═══════┼═══════┤
│ Add a loop │ EXAMPLE CODE │ 429 │ +32 │ 461 │
│ │ EXAMPLE RAM │ 576 │ +8 │ 584 │
├────────────────┼──────────────┼────────┼───────┼───────┤
│ Add a function │ EXAMPLE CODE │ 429 │ +16 │ 445 │
│ │ EXAMPLE RAM │ 576 │ +8 │ 584 │
└────────────────┴──────────────┴────────┴───────┴───────┘
Change-Id: I14b3d383ec450bc6d017bf5d0111e266b0a3c368
Introduce functions for outputting numbers as strings. Unlike some
snprintf implementations, these functions support 64-bit integers. Also,
very limited floating point support is provided.
These functions are faster than snprintf and never truncate numbers.
Change-Id: Id5ae06a5d175f15403c34cddb2a077a88be47cf8
This change adds a GN template for defining unit test executables.
The template, called pw_test, defines the executable and outputs a JSON
metadata file for the test.
A new build argument is added. This argument determines whether unit
test run targets are supported by the current build target. If this is
set, the pw_test template additionally creates a run target for its test
executable which invokes the executable through a script.
A basic test runner script is added to the pw_unit_test module. This
script currently only runs a single test executable directly.
The unit tests in the pw_preprocessor module are updated to use the
pw_test template.
Change-Id: I3cbde9c19440276dbab80dd2bab5fec87abe6d7e
This change adds two Pigweed modules: pw_preprocessor and pw_unit_test.
The preprocessor module contains header files providing helpful macros
for the C preprocessor. The unit test module contains a starter
implementation of a unit testing framework for Pigweed.
Change-Id: I46e1a4cae1fd8ce36d7840a2e92f8013fb489cde
This change adds Pigweed's first few (incomplete) modules: pw_build,
pw_status, and pw_toolchain. The main scaffolding for Pigweed's GN-based
build system is also included, with a root BUILDCONFIG and BUILD.gn file
defining a top-level modules build target.
Change-Id: I09599443d50696343d6c5b85853cb5cee3ce0026