Ceedling is a build system for C projects that is something of an extension around Ruby’s Rake (make-ish) build system. Ceedling also makes TDD (Test-Driven Development) in C a breeze by integrating CMock, Unity, and CException -- three other awesome open-source projects you can’t live without if you're creating awesomeness in the C language. Ceedling is also extensible with a handy plugin mechanism.
Documentation and license info exists in the repo in docs/
First make sure Ruby is installed on your system (if it's not already). Then, from a command prompt:
> gem install ceedling
> git clone --recursive https://github.com/throwtheswitch/ceedling.git
> cd ceedling
> bundle install # Ensures you have all RubyGems needed
> bundle exec rake # Run all CMock library tests
If bundler isn't installed on your system or you run into problems, you might have to install it:
> sudo gem install bundler
Creating a project with Ceedling is easy. Simply tell ceedling the name of the project, and it will create a subdirectory called that name and fill it with a default directory structure and configuration.
ceedling new YourNewProjectName
You can add files to your src and test directories and they will
instantly become part of your test build. Need a different structure?
You can start to tweak the project.yml
file immediately with your new
path or tool requirements.
You can upgrade to the latest version of Ceedling at any time, automatically gaining access to the packaged Unity and CMock that come with it.
gem update ceedling
Are you just getting started with Ceedling? Maybe you'd like your project to be installed with some of its handy documentation? No problem! You can do this when you create a new project.
ceedling new --docs MyAwesomeProject
Ceedling can deploy all of its guts into the project as well. This allows it to be used without having to worry about external dependencies. You don't have to worry about Ceedling changing for this particular project just because you updated your gems... no need to worry about changes in Unity or CMock breaking your build in the future. If you'd like to use Ceedling this way, tell it you want a local copy when you create your project:
ceedling new --local YourNewProjectName
This will install all of Unity, CMock, and Ceedling into a new folder
named vendor
inside your project YourNewProjectName
. It will still create
the simple directory structure for you with src
and test
folders.
SCORE!
If you want to force a locally installed version of Ceedling to upgrade to match your latest gem later, it's easy! Just issue the following command:
ceedling upgrade --local YourNewProjectName
Just like the new
command, it's called from the parent directory of your
project.
Are you afraid of losing all your local changes when this happens? You can keep
Ceedling from updating your project file by issuing no_configs
.
ceedling upgrade --local --no_configs TheProject
Are you using Git? You might want to automatically have Ceedling create a
gitignore
file for you by adding --gitignore
to your new
call.
HAPPY TESTING!
To install locally based of of what is in this repo, simply do rake install
.
Note, if you are doing this, you should alter the version to denote it is not
the Ceedling installed from rubygems.