kopia lustrzana https://github.com/bristol-seds/pico-tracker
9008a2f5c5 | ||
---|---|---|
.. | ||
ctypesgen | ||
tc | ||
README.md | ||
tests.py | ||
tmain.c |
README.md
Verification
Setup
sudo apt-get install python-pip
sudo pip install colorama
Usage
Something like this.
> /dev/null arm-none-eabi-gdb -q -x tools/tests.py
You need to have your debugger configured in config.mk and possibly
also have gdbscript-custom. The test driver just issues an attach 1
command after gdb startup and expects that to work.
Operation
Initially tests.py
loads the latest binary, and runs Reset_Handler
until the top of main
. It then jumps to tc_main
instead.
While stopped in tc_main
a pointer to the test case is set. The
program is then run, and one loop of tc_main
runs the test case.
Writing a new test case
- Choose a testcase name
[tc-name]
- Create
tc/[tc-name].py
andtc/[tc_name].h
. Use a pre-existing test case as a template. - Add
#include [tc-name].h
to the section at the top ofmain.c
You'll need to fill in the /* Parameters In */
and /* Results Out */
structures in tc/[tc-name].h
tc/[tc-name].py
must contain a class called [tc-name]_tc
that
defines get_test
and is_correct
methods.