Commit Graph

6 Commits

Author SHA1 Message Date
a48d8e998d Added a firstpass of a pre-push githook
This checksout every new commit and runs a testfile on it.
2025-12-23 21:46:32 -08:00
5905cb67b0 Added the test framework to the tests directory
Separated the test framework into the header. Test definitions should be
placed in the test.c.
2025-12-23 21:46:32 -08:00
0924650090 Added Makefile Logic to work with Submodules
These changes allow for projects that were created and built using the
same Makefile to be placed under the submodules directory. This Makefile
will recursively build the submodules and link to the top project.

The submodules will be built as a static library using ar rcs.
2025-12-23 21:46:32 -08:00
3677b50fe1 Added Resillance to SegFaults by forking tests
A child process is created which runs the test operation. It then
returns the exit status if exited properly and termination signal if
not.

A Termination signal of (11) corresponds to a segfault so keep that in
mind.
2025-12-23 21:46:32 -08:00
a490341129 Created Initial Attempt Testing Framework
The framework, completely contained in x_tfw4c.c, uses pre-compiler
MACROS to create an environment where it is easy to create unit tests
and run regression tests.

It iterates through a linked list of test structs that contain the test
function that should be executed and the name of the test to be
displayed.

This is a simple rework of a prior test framework that did not
dynamically add new tests at compile time.

Next steps would be to have it display more metadata and have some
resilience to crashes in the tests.
2025-12-23 21:46:32 -08:00
4320c26105 Added Template Makefile
This Makefile will be used as a way to start new projects with the same
hierarchy. It will also be tightly coupled with the x testing framework
for c (x_tfw4c).

It has targets to setup the source, include, object, and tests
directories using the `make dirs` command.

There is some fun interesting things that I used to get the target to
recompile when the header files are updated using the -MMD and -MP flags
in gcc.

These flags basically allow for the generation of dependencies from each
source file that are exported and then included using the -include
$(DEPENDENCIES) line at the bottem of the Makefile.
2025-12-23 21:46:32 -08:00