This framework provides facilities for automated execution of remote code. The core idea is, to utilize the debug symbols for automated testing, instead of developing custom tools. It does however limit some things to the itanium abi, i.e. gcc and clang.
At the current state it provides functionality for:
All tooling is written in python and easily extensible. Almost everything is written in C89, but we also have some modern C++ features.
The metal.gdb tool is the core. It uses the Python API of gdb to run code and obtain detailed information. This allows us to analyse and print values during unit tests without any allocations. Our toolset wraps around this and uses a single breakpoint to provide a variety of functionality, all written as plugins.
Since it is gdb based you can use it with any of those targets:
Since everything is a gdb plugin, you can use any of the functionality during a debug session, not only standalone.
The serial library provides a light-weight testing tool for environments that do not provide access for a debugger. It does utilize debug symbols, but to a minimal degree.
The debug symbols are used in conjunction with a preprocessor to conveniently generate you a binary protocol for uni- or bidirectional communication with the target device, e.g. through a serial port.
All you need is a function to write (and maybe receive) bytes you can enjoy the same features as metal.gdb
, but without the introspectio.
I wrote two articles so far about how metal.serial works.
metal.test
is shipped as a pip
package, since most is in python.
pip install metal_test
The metal-flags
tool allows you get the compiler flags, which you could for example use in your CMake build through execute_process
.
metal-flags -I -S gdb
The current master Documentation can be found in the wiki.