Commit Graph

10 Commits

Author SHA1 Message Date
Alexei Frolov
d0b2d48782 Add pw_test_server module
This change adds a pw_test_server module which implements a gRPC server
for queueing and distributing unit tests across multiple test runners.
The server is implemented as a Go library which can be imported and used
by developers to build a custom unit test running infrastructure.

To use the server, a UnitTestRunner interface that processes requests to
run unit tests must be implemented and registered with the server. An
implementation of this interface which runs unit test executables
through an external command is provided alongside the server.

An example program that uses the server library to run a unit test
server is also provided within the module. This program uses the
command-based test runners to run unit tests on a local machine. It is
configurable through a config file, allowing multiple workers to be
registered with the server. The program additionally doubles as a gRPC
client for the server which can be invoked with the path to a unit test
executable to schedule it to be run.

Change-Id: I347d230370620395de09e277f9763d7df1c4abad
2019-12-06 22:55:28 +00:00
Alexei Frolov
82d3cb35d3 pw_varint: Add varint module
This change adds a pw_varint module containing functions for encoding
and decoding variable-length integers.

Change-Id: I50bdf6d9d6762bffb93ee638683de53afed9c849
2019-12-02 18:39:29 +00:00
Armando Montanez
a69244e4c1 Add stm32f429i-disc1 target and pw_dumb_io
Adds both the stm32f429i-disc1 target and a pw_dumb_io uart-based
backend.

Change-Id: If24379118fc2877485653d61ca66ceeb59ef920a
2019-11-16 00:14:52 +00:00
Armando Montanez
68de071c7d Add pw_dumb_io with host backend
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
2019-11-16 00:14:15 +00:00
Alexei Frolov
e2016763a8
Add pw_bloat module
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
2019-11-14 14:29:28 -08:00
Wyatt Hepler
48db4d6f50 Start the pw_string module
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
2019-11-14 16:32:39 +00:00
Alexei Frolov
baaa2d62a6
Add pw_docgen module
This change adds a module which builds documentation using Sphinx.
Documentation files and assets are defined using a pw_doc_group GN
template which lists out all of the sources as metadata. Another GN
template, pw_doc_gen, collects the metadata from pw_doc_group targets
into a JSON file and defines an action that runs a script to build the
HTML docs.

A docgen script is provided by the pw_docgen module. This script reads
the JSON metadata file collected by a pw_doc_gen template, copies all of
the source and resource files into a documentation tree, and runs Sphinx
on the tree to render the docs as HTML.

Change-Id: I97890f05d850d5119cbd3bbf48138cd82f22d56c
2019-11-13 13:28:28 -08:00
Wyatt Hepler
771056581c pw_span module
pw::span is a stand-in for C++20's std::span.

Change-Id: I1f36d5da43493c20b4806f6cb1198faf62d47743
2019-11-08 17:15:01 -08:00
Alexei Frolov
c10c81201d Add preprocessor and unit_test modules
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
2019-11-04 16:07:34 -08:00
Alexei Frolov
1a82c146ff
Initial Pigweed modules
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
2019-10-31 17:43:53 -07:00