Add tests coverage report generation
[command.git] / tests / Makefile.am
index f489244dbb64842ade7103a7c945919faa11a087..fa1fbc4fca8f0c8f34f2f4f44f3095cbefdaf465 100644 (file)
@@ -1,33 +1,36 @@
 AUTOMAKE_OPTIONS = subdir-objects
 
 TEST_PROGS = \
-       descriptive_holds_data.test \
-       callable_invokes_provided_function.test \
-       callable_invokes_void_function.test \
-       parameter_is_descriptive.test \
-       parameter_should_be_non_required.test \
-       argument_handles_string_value.test \
-       argument_handles_int_value.test \
-       argument_handles_negative_int_value.test \
-       argument_handles_float_value.test \
-       argument_handles_negative_float_value.test \
-       argument_handles_boolean_value.test \
-       option_handles_string_value.test \
-       option_handles_int_value.test \
-       option_handles_negative_int_value.test \
-       option_handles_float_value.test \
-       option_handles_negative_float_value.test \
-       option_handles_boolean_value.test \
-       option_handles_void_value.test \
-       option_should_match_exact_name.test \
-       option_should_throw_exception_on_missing_value.test \
-       required_should_be_required.test \
-       multivalue_should_extract_arguments_by_separator.test \
-       multivalue_should_extract_options_by_separator.test
+       descriptive/holds_data.test \
+       callable/invokes_provided_function.test \
+       callable/invokes_void_function.test \
+       callable/invokes_class_method.test \
+       parameter/is_descriptive.test \
+       parameter/should_be_non_required.test \
+       argument/handles_string_value.test \
+       argument/handles_int_value.test \
+       argument/handles_negative_int_value.test \
+       argument/handles_float_value.test \
+       argument/handles_negative_float_value.test \
+       argument/handles_boolean_value.test \
+       option/handles_string_value.test \
+       option/handles_int_value.test \
+       option/handles_negative_int_value.test \
+       option/handles_float_value.test \
+       option/handles_negative_float_value.test \
+       option/handles_boolean_value.test \
+       option/handles_void_value.test \
+       option/should_match_exact_name.test \
+       option/should_throw_exception_on_missing_value.test \
+       required/should_be_required.test \
+       multivalue/should_extract_arguments_by_separator.test \
+       multivalue/should_extract_options_by_separator.test
 
 TEST_SCRPTS = \
        command/understand_void_option.test \
-       command/understand_bool_option.test
+       command/understand_bool_option.test \
+       command/understand_int_option.test \
+       command/understand_unsigned_int_option.test
 
 TESTS = \
        $(TEST_PROGS) \
@@ -45,10 +48,28 @@ AM_CXXFLAGS = -I$(top_srcdir)/include -std=c++11
 check-% :      %.test all
        @srcdir=$(srcdir); export srcdir;
 
+cov-reset:
+       rm -fr coverage
+       find . -name "*.gcda" -exec rm {} \;
+       find . -name "*.gcno" -exec rm {} \;
+       lcov --directory . --zerocounters
+
+cov-report:
+       mkdir -p coverage
+       lcov --compat-libtool --directory . --capture --output-file coverage/app.info
+       genhtml -o coverage/ coverage/app.info
+
+cov:
+       make cov-report
+
+clean-local:
+       make cov-reset
+
 descriptive_holds_data_test_SOURCES  = descriptive/holds_data.cpp
 
 callable_invokes_provided_function_test_SOURCES  = callable/invokes_provided_function.cpp
 callable_invokes_void_function_test_SOURCES  = callable/invokes_void_function.cpp
+callable_invokes_class_method_test_SOURCES  = callable/invokes_class_method.cpp
 
 parameter_is_descriptive_test_SOURCES  = parameter/is_descriptive.cpp
 parameter_should_be_non_required_test_SOURCES = parameter/should_be_non_required.cpp