Closed benliao1 closed 1 year ago
A lot of small extra cleanup / QOL items were added in this PR. The tests/Makefile
in particular got a lot of extra functionality, i.e. it is now possible to run all of the following:
make net_handler_cli
to make just the net_handler_cli
make cli
to make all the CLIs, but nothing elsemake GeneralTestDevice
to make just the GeneralTestDevice
make devices
to make all virtual devices, but nothing elsemake tc_150_1
to make just tc_150_1
make integration/tc_150_1
(same as above)make tests
to make all test programsmake all
to make all devices, CLIs, and testsmake help
to list all of the above optionsI also managed to silence some formatting warnings in the compilation that was cluttering our CI output, and write our own formatting bash script specific to Runtime that is much much simpler than the Python script we had before.
The test script now can take ./runtime test tc_150_1
. You used to have to specify either the integration/
or performance/
folders, i.e. with ./runtime test integration/tc_150_1
. Both of these now work.
I also deleted the scripts/install_raspi.sh
and scripts/provision_raspi.sh
scripts because they aren't being referred to and don't really belong in the repo. We should create more wiki pages with how to provision / install Runtime on Raspberry Pi's (or put it in the root README.md
)!
In the past, our builds / Makefiles had two problems:
./runtime build
again, and not have all dependent files be rebuilt again.This PR fixes these issues by:
-MMD
and-MP
compiler flags to autogenerate dependency files for each object fileThis does make our Makefiles somewhat more complex, however, I tried my best to keep the number of syntax features to a minimum while still getting the job done in a more or less general way.
In addition to the Makefile changes, I fixed / cleaned up / added a few things:
#include
of Runtime headers to use angle brackets instead of quotes with relative path names (better readability!) since our Makefiles are able to support that nowdev_handler.c
anddev_handler_message.c
, as well as incorrect use ofprintf
intest.c
.gitignore
so as to only ignore the necessary folders / files; we used to have a copypasta.gitignore
from somewhere that had way too many entries and might lead to confusion for new membersrun_clang_format.py
script and replaced it with a much simpler, in-house script that I wrote in bash that does basically the same thing. Run a check with./runtime format check
and fix code to comply with the standard with./runtime format fix