0.0
No commit activity in last 3 years
No release in over 3 years
Guard Cunit should automatically build your C project and run CUnit based tests
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0

Runtime

>= 1.1
 Project Readme

Guard CUnit Build Status

CUnit Guard allows you to run/watch Unit test for C modules, or anything other that works with Makefile

Has basic parser for CUnit tests. Current TODO is to add also for CppUtest and Unity

Install

Need to have guard and also some of the notifiers that guard uses

otherwise, get the gemfile and install it:

$ gem install guard-cunit

Already can be found on http://rubygems.org/

Guardfile

Generating the Guardfile is like all the other

$ guard init cunit

The file by default looks like this:

# A sample Guardfile
# More info at https://github.com/guard/guard#readme

#
# Cunit Guardfile - keep dflt builders after guard watcher's block
#
guard 'cunit' do
      watch(%r{((.+)\.c$)|((.+)\.h$)|((M|m)akefile$)} )	
end

set_builder "make"
set_cleaner "make clean"
cunit_runner "./#{File.basename(Dir.getwd)}_unit"
libdir "#{Dir.getwd}"

After the guard block are the new methods from Guardfile DSL, which are used for the tasks needed to be performed on running the build/tests

Usage

For all other stuff related to guard's usage please read Guard usage doc

Testing

Run rspec in top directory of the project or guard-rspec

Todo

  • fix all bugs :)
  • add parser for more Unit tests frameworks
  • add hook for coverage
  • something about automatic mock generation ???
  • ... whatever wind blows ...

Author

A tea cup on a rocking chair