Skip to content

Add cmocka setup, smoke tests, CI, and test template - #3

Merged
littlegraybird merged 3 commits into
mainfrom
cmocka-setup
Nov 9, 2026
Merged

littlegraybird merged 3 commits into
mainfrom
cmocka-setup

Conversation

@littlegraybird

Copy link
Copy Markdown
Collaborator

Created Makefile - adds a make test target to automatically find every test/test_*.c file, builds it with its matching src/<name>.c, and links against cmocka
Created tests/test_smoke.c - placeholder test (no project dependencies) to confirm cmocka is installed and works
Created .gitignore - ignores compiled test boundaries and obj files
Created .github/workflows/ci.yml - actions workflow that runs make test on every pull req and push to main to make sure cmocka is installed. checks for ubuntu and fedora
Created tests/template.c.example - template for test files w/ instructions

cmocka installation: sudo apt install libcmocka-dev (Ubuntu)

NOTE: all test files should be formatted as tests/test_<module>.c for the Makefile to detect it automatically

@littlegraybird
littlegraybird marked this pull request as ready for review November 9, 2026 21:53
@littlegraybird
littlegraybird merged commit 3b7c29d into main Nov 9, 2026
4 checks passed
@littlegraybird
littlegraybird deleted the cmocka-setup branch November 10, 2026 19:05
@littlegraybird
littlegraybird restored the cmocka-setup branch November 10, 2026 19:05
@littlegraybird
littlegraybird deleted the cmocka-setup branch November 10, 2026 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant