Skip to content

C TDD Boilerplate using Unity, CMock and SCons. Suitable for embedded TDD development.

License

Notifications You must be signed in to change notification settings

jorgeacortes/c-tdd-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C Test Driven Development boilerplate

Ready to go boilerplate for doing TDD with C and SCons as builder.

Boilerplate for C development using TDD and SCons.

Uses Unity for unit testing and CMock to create mocks.

Has already a sample module called func1 with some unit tests and mocks to ease the use of the boilerplate.

Sample usage

To test that your setup is ready, run the following commands. If not, go to Requirements.

git clone --recursive https://github.com/jorgeacortes/c-tdd-boilerplate
scons MOCK=yes # Creates mock files
scons # Builds the app and tests

Build.py is a file included in order to manage usual builds. Instead of using scons directly, Build.py can be used generating a logfile.

Including your code

To include your code you need to modify at least:

  • project.scons
    • include_path_list: add all include paths for production code or common ones.
    • mocks_list: in case mocks are needed.
  • app.scons
    • productionCode_sources: include all sources to compile
  • test.scons
    • tests_sources: include all sources to compile (mocks and tests)
    • Add more runners if needed

Requirements

  • Ruby (for CMock)
  • Python (for SCons)
  • SCons

Release History

  • 1.0.0
    • First version

Contributing

Feel free to contribute opening issues or pull requests.

To do list

  • Automatically launch all runners and show results.

About

C TDD Boilerplate using Unity, CMock and SCons. Suitable for embedded TDD development.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published