Skip to content

dpostorivo/Ceedling

 
 

Repository files navigation

Ceedling - Build/Test System for C Based on Ruby/Rake

Ceedling Build Status

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.

Usage Documentation

Documentation and license info exists in the repo in docs/

Getting Started

First make sure Ruby is installed on your system (if it's not already). Then, from a command prompt:

> gem install ceedling

(Alternate Installation for Those Planning to Be Ceedling Developers)

> 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

Putting Ceedling Inside a New Project

Ceedling can deploy all of its guts into a folder. 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.

ceedling new YourNewProjectName

This will install all of Unity, CMock, and Ceedling into a new folder named YourNewProjectName. It will also create a simple directory structure for you with src and test folders. SCORE! It also creates a sample project.yml file that you can tweak to your own needs.

It'll also include documentation for all of these tools, unless you specify --nodocs at when you issue the command above... then it skips that step for you.

Previous versions of Ceedling generated and depended on a rakefile, but that is no longer the case. Today, configuration is done with the project.yml file and the ceedling command is used to execute tests. Some old tutorials may still reference using rake commands, but the ceedling command should be used now, instead. For example, ceedling test:all will execute all tests.

Using Ceedling from a Ruby Gem

Ceedling can also be used as a gem. By installing it this way, you can automatically update to the latest version of Ceedling, Unity, and CMock just by running an update on your gems. Use this if you are only running one project OR if you feel you want to keep all your projects up to date.

ceedling new YourNewProjectName --as_gem

This creates a new folder named YourNewProjectName. Inside it will be your shiny new project.yml file and a couple of src and test directories to get you started. You can then tweak all of those things to your heart's content.

About

Ruby/Rake-based build and test system for C projects

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 98.0%
  • HTML 1.7%
  • Other 0.3%