Add tests coverage report generation
[command.git] / tests / Makefile.am
1 AUTOMAKE_OPTIONS = subdir-objects
2
3 TEST_PROGS = \
4         descriptive/holds_data.test \
5         callable/invokes_provided_function.test \
6         callable/invokes_void_function.test \
7         callable/invokes_class_method.test \
8         parameter/is_descriptive.test \
9         parameter/should_be_non_required.test \
10         argument/handles_string_value.test \
11         argument/handles_int_value.test \
12         argument/handles_negative_int_value.test \
13         argument/handles_float_value.test \
14         argument/handles_negative_float_value.test \
15         argument/handles_boolean_value.test \
16         option/handles_string_value.test \
17         option/handles_int_value.test \
18         option/handles_negative_int_value.test \
19         option/handles_float_value.test \
20         option/handles_negative_float_value.test \
21         option/handles_boolean_value.test \
22         option/handles_void_value.test \
23         option/should_match_exact_name.test \
24         option/should_throw_exception_on_missing_value.test \
25         required/should_be_required.test \
26         multivalue/should_extract_arguments_by_separator.test \
27         multivalue/should_extract_options_by_separator.test
28
29 TEST_SCRPTS = \
30         command/understand_void_option.test \
31         command/understand_bool_option.test \
32         command/understand_int_option.test \
33         command/understand_unsigned_int_option.test
34
35 TESTS = \
36         $(TEST_PROGS) \
37         $(TEST_SCRPTS)
38
39 EXTRA_DIST = \
40         $(TEST_SCRPTS)
41
42 noinst_PROGRAMS = \
43         $(TEST_PROGS) \
44         command/option_test_command
45
46 AM_CXXFLAGS = -I$(top_srcdir)/include -std=c++11
47
48 check-% :       %.test all
49         @srcdir=$(srcdir); export srcdir;
50
51 cov-reset:
52         rm -fr coverage
53         find . -name "*.gcda" -exec rm {} \;
54         find . -name "*.gcno" -exec rm {} \;
55         lcov --directory . --zerocounters
56
57 cov-report:
58         mkdir -p coverage
59         lcov --compat-libtool --directory . --capture --output-file coverage/app.info
60         genhtml -o coverage/ coverage/app.info
61
62 cov:
63         make cov-report
64
65 clean-local:
66         make cov-reset
67
68 descriptive_holds_data_test_SOURCES  = descriptive/holds_data.cpp
69
70 callable_invokes_provided_function_test_SOURCES  = callable/invokes_provided_function.cpp
71 callable_invokes_void_function_test_SOURCES  = callable/invokes_void_function.cpp
72 callable_invokes_class_method_test_SOURCES  = callable/invokes_class_method.cpp
73
74 parameter_is_descriptive_test_SOURCES  = parameter/is_descriptive.cpp
75 parameter_should_be_non_required_test_SOURCES = parameter/should_be_non_required.cpp
76
77 argument_handles_string_value_test_SOURCES  = argument/handles_string_value.cpp
78 argument_handles_int_value_test_SOURCES  = argument/handles_int_value.cpp
79 argument_handles_negative_int_value_test_SOURCES  = argument/handles_negative_int_value.cpp
80 argument_handles_float_value_test_SOURCES  = argument/handles_float_value.cpp
81 argument_handles_negative_float_value_test_SOURCES  = argument/handles_negative_float_value.cpp
82 argument_handles_boolean_value_test_SOURCES  = argument/handles_boolean_value.cpp
83
84 option_handles_string_value_test_SOURCES  = option/handles_string_value.cpp
85 option_handles_int_value_test_SOURCES = option/handles_int_value.cpp
86 option_handles_negative_int_value_test_SOURCES = option/handles_negative_int_value.cpp
87 option_handles_float_value_test_SOURCES  = option/handles_float_value.cpp
88 option_handles_negative_float_value_test_SOURCES  = option/handles_negative_float_value.cpp
89 option_handles_boolean_value_test_SOURCES  = option/handles_boolean_value.cpp
90 option_handles_void_value_test_SOURCES  = option/handles_void_value.cpp
91 option_should_match_exact_name_test_SOURCES  = option/should_match_exact_name.cpp
92 option_should_throw_exception_on_missing_value_test_SOURCES = option/should_throw_exception_on_missing_value.cpp
93
94 required_should_be_required_test_SOURCES = required/should_be_required.cpp
95
96 multivalue_should_extract_arguments_by_separator_test_SOURCES = multiValue/should_extract_arguments_by_separator.cpp
97 multivalue_should_extract_options_by_separator_test_SOURCES = multiValue/should_extract_options_by_separator.cpp
98
99 command_option_test_command_SOURCES = command/src/option_test_command.cpp