ceedling 0.20.3 → 0.21.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (407) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +3 -0
  3. data/Gemfile.lock +1 -0
  4. data/Rakefile +1 -0
  5. data/bin/ceedling +79 -26
  6. data/lib/ceedling/configurator_plugins.rb +0 -18
  7. data/lib/ceedling/rules_cmock.rake +1 -1
  8. data/lib/ceedling/tasks_base.rake +5 -1
  9. data/lib/ceedling/tasks_tests.rake +12 -9
  10. data/lib/ceedling/version.rb +1 -1
  11. data/lib/ceedling/version.rb.erb +1 -1
  12. data/plugins/fake_function_framework/README.md +250 -0
  13. data/plugins/fake_function_framework/Rakefile +19 -0
  14. data/plugins/fake_function_framework/examples/fff_example/project.yml +71 -0
  15. data/plugins/fake_function_framework/examples/fff_example/rakefile.rb +7 -0
  16. data/plugins/fake_function_framework/examples/fff_example/src/bar.c +1 -0
  17. data/plugins/fake_function_framework/examples/fff_example/src/bar.h +13 -0
  18. data/plugins/fake_function_framework/examples/fff_example/src/custom_types.h +6 -0
  19. data/plugins/fake_function_framework/examples/fff_example/src/display.c +7 -0
  20. data/plugins/fake_function_framework/examples/fff_example/src/display.h +16 -0
  21. data/plugins/fake_function_framework/examples/fff_example/src/event_processor.c +92 -0
  22. data/plugins/fake_function_framework/examples/fff_example/src/event_processor.h +11 -0
  23. data/plugins/fake_function_framework/examples/fff_example/src/foo.c +16 -0
  24. data/plugins/fake_function_framework/examples/fff_example/src/foo.h +8 -0
  25. data/plugins/fake_function_framework/examples/fff_example/src/subfolder/zzz.c +1 -0
  26. data/plugins/fake_function_framework/examples/fff_example/src/subfolder/zzz.h +6 -0
  27. data/plugins/fake_function_framework/examples/fff_example/test/test_event_processor.c +155 -0
  28. data/plugins/fake_function_framework/examples/fff_example/test/test_foo.c +47 -0
  29. data/plugins/fake_function_framework/lib/fake_function_framework.rb +87 -0
  30. data/plugins/fake_function_framework/lib/fff_mock_generator.rb +159 -0
  31. data/plugins/fake_function_framework/spec/fff_mock_generator_spec.rb +464 -0
  32. data/plugins/fake_function_framework/spec/spec_helper.rb +96 -0
  33. data/plugins/fake_function_framework/src/fff_unity_helper.h +33 -0
  34. data/plugins/fake_function_framework/vendor/fff/LICENSE +25 -0
  35. data/plugins/fake_function_framework/vendor/fff/Makefile +10 -0
  36. data/plugins/fake_function_framework/vendor/fff/README.md +454 -0
  37. data/plugins/fake_function_framework/vendor/fff/buildandtest +15 -0
  38. data/plugins/fake_function_framework/vendor/fff/examples/Makefile +7 -0
  39. data/plugins/fake_function_framework/vendor/fff/examples/driver_testing/Makefile +64 -0
  40. data/plugins/fake_function_framework/vendor/fff/examples/driver_testing/driver.c +24 -0
  41. data/plugins/fake_function_framework/vendor/fff/examples/driver_testing/driver.h +11 -0
  42. data/plugins/fake_function_framework/vendor/fff/examples/driver_testing/driver.test.cpp +50 -0
  43. data/plugins/fake_function_framework/vendor/fff/examples/driver_testing/driver.test.fff.cpp +62 -0
  44. data/plugins/fake_function_framework/vendor/fff/examples/driver_testing/hardware_abstraction.h +15 -0
  45. data/plugins/fake_function_framework/vendor/fff/examples/driver_testing/registers.h +13 -0
  46. data/plugins/fake_function_framework/vendor/fff/examples/embedded_ui/DISPLAY.h +17 -0
  47. data/plugins/fake_function_framework/vendor/fff/examples/embedded_ui/Kata.txt +25 -0
  48. data/plugins/fake_function_framework/vendor/fff/examples/embedded_ui/Makefile +67 -0
  49. data/plugins/fake_function_framework/vendor/fff/examples/embedded_ui/SYSTEM.h +21 -0
  50. data/plugins/fake_function_framework/vendor/fff/examples/embedded_ui/UI.c +48 -0
  51. data/plugins/fake_function_framework/vendor/fff/examples/embedded_ui/UI.h +12 -0
  52. data/plugins/fake_function_framework/vendor/fff/examples/embedded_ui/UI_test_ansic.c +183 -0
  53. data/plugins/fake_function_framework/vendor/fff/examples/embedded_ui/UI_test_cpp.cpp +136 -0
  54. data/plugins/fake_function_framework/vendor/fff/examples/embedded_ui/test_suite_template.c +34 -0
  55. data/plugins/fake_function_framework/vendor/fff/fakegen.rb +420 -0
  56. data/plugins/fake_function_framework/vendor/fff/fff.h +5112 -0
  57. data/plugins/fake_function_framework/vendor/fff/gtest/Makefile +22 -0
  58. data/plugins/fake_function_framework/vendor/fff/gtest/gtest-all.cc +9118 -0
  59. data/plugins/fake_function_framework/vendor/fff/gtest/gtest-main.cc +6 -0
  60. data/plugins/fake_function_framework/vendor/fff/gtest/gtest.h +19537 -0
  61. data/plugins/fake_function_framework/vendor/fff/test/Makefile +81 -0
  62. data/plugins/fake_function_framework/vendor/fff/test/c_test_framework.h +15 -0
  63. data/plugins/fake_function_framework/vendor/fff/test/fff_test_c.c +108 -0
  64. data/plugins/fake_function_framework/vendor/fff/test/fff_test_cpp.cpp +45 -0
  65. data/plugins/fake_function_framework/vendor/fff/test/fff_test_global_c.c +76 -0
  66. data/plugins/fake_function_framework/vendor/fff/test/fff_test_global_cpp.cpp +23 -0
  67. data/plugins/fake_function_framework/vendor/fff/test/global_fakes.c +13 -0
  68. data/plugins/fake_function_framework/vendor/fff/test/global_fakes.h +37 -0
  69. data/plugins/fake_function_framework/vendor/fff/test/test_cases.include +276 -0
  70. data/plugins/gcov/README.md +9 -0
  71. data/plugins/gcov/{template.erb → assets/template.erb} +1 -1
  72. data/plugins/gcov/{defaults.yml → config/defaults.yml} +10 -1
  73. data/plugins/gcov/gcov.rake +20 -8
  74. data/plugins/gcov/{gcov.rb → lib/gcov.rb} +13 -24
  75. data/plugins/module_generator/module_generator.rake +3 -3
  76. data/plugins/warnings_report/lib/warnings_report.rb +69 -0
  77. data/plugins/xml_tests_report/lib/xml_tests_report.rb +108 -0
  78. data/spec/spec_system_helper.rb +1 -1
  79. data/vendor/c_exception/lib/CException.h +1 -1
  80. data/vendor/c_exception/vendor/unity/auto/generate_module.rb +16 -16
  81. data/vendor/c_exception/vendor/unity/auto/generate_test_runner.rb +61 -21
  82. data/vendor/c_exception/vendor/unity/auto/stylize_as_junit.rb +5 -1
  83. data/vendor/c_exception/vendor/unity/auto/unity_to_junit.py +146 -0
  84. data/vendor/c_exception/vendor/unity/docs/UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf +0 -0
  85. data/vendor/c_exception/vendor/unity/docs/UnityAssertionsReference.pdf +0 -0
  86. data/vendor/c_exception/vendor/unity/docs/UnityConfigurationGuide.pdf +0 -0
  87. data/vendor/c_exception/vendor/unity/docs/UnityGettingStartedGuide.pdf +0 -0
  88. data/vendor/c_exception/vendor/unity/docs/UnityHelperScriptsGuide.pdf +0 -0
  89. data/vendor/c_exception/vendor/unity/examples/example_1/makefile +1 -1
  90. data/vendor/c_exception/vendor/unity/examples/example_1/src/ProductionCode.c +7 -7
  91. data/vendor/c_exception/vendor/unity/examples/example_1/src/ProductionCode2.c +2 -2
  92. data/vendor/c_exception/vendor/unity/examples/example_1/test/TestProductionCode.c +14 -14
  93. data/vendor/c_exception/vendor/unity/examples/example_1/test/TestProductionCode2.c +2 -2
  94. data/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +5 -5
  95. data/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +5 -5
  96. data/vendor/c_exception/vendor/unity/examples/unity_config.h +257 -0
  97. data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.c +9 -8
  98. data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_internals.h +1 -0
  99. data/vendor/c_exception/vendor/unity/extras/fixture/test/Makefile +28 -8
  100. data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_Test.c +57 -17
  101. data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_TestRunner.c +3 -0
  102. data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_output_Spy.c +2 -3
  103. data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_output_Spy.h +1 -1
  104. data/vendor/c_exception/vendor/unity/release/version.info +1 -1
  105. data/vendor/c_exception/vendor/unity/src/unity.c +336 -191
  106. data/vendor/c_exception/vendor/unity/src/unity.h +73 -69
  107. data/vendor/c_exception/vendor/unity/src/unity_internals.h +119 -90
  108. data/vendor/c_exception/vendor/unity/test/Makefile +51 -0
  109. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_cmd.c +5 -5
  110. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_def.c +5 -5
  111. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_head1.c +5 -5
  112. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_cmd.c +6 -6
  113. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_def.c +6 -6
  114. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_head1.c +6 -6
  115. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_new1.c +6 -6
  116. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_new2.c +8 -8
  117. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_param.c +6 -6
  118. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_run1.c +6 -6
  119. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_run2.c +8 -8
  120. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_yaml.c +7 -7
  121. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_new1.c +5 -5
  122. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_new2.c +7 -7
  123. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_param.c +5 -5
  124. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_run1.c +5 -5
  125. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_run2.c +7 -7
  126. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_yaml.c +6 -6
  127. data/vendor/c_exception/vendor/unity/test/rakefile +5 -0
  128. data/vendor/c_exception/vendor/unity/test/rakefile_helper.rb +9 -7
  129. data/vendor/c_exception/vendor/unity/test/targets/clang_file.yml +1 -0
  130. data/vendor/c_exception/vendor/unity/test/targets/clang_strict.yml +3 -0
  131. data/vendor/c_exception/vendor/unity/test/targets/gcc_32.yml +1 -0
  132. data/vendor/c_exception/vendor/unity/test/targets/gcc_64.yml +1 -0
  133. data/vendor/c_exception/vendor/unity/test/targets/gcc_auto_limits.yml +1 -0
  134. data/vendor/c_exception/vendor/unity/test/targets/gcc_auto_sizeof.yml +1 -0
  135. data/vendor/c_exception/vendor/unity/test/targets/gcc_auto_stdint.yml +1 -0
  136. data/vendor/c_exception/vendor/unity/test/targets/gcc_manual_math.yml +1 -0
  137. data/vendor/c_exception/vendor/unity/test/targets/iar_arm_v4.yml +1 -0
  138. data/vendor/c_exception/vendor/unity/test/targets/iar_arm_v5.yml +1 -0
  139. data/vendor/c_exception/vendor/unity/test/targets/iar_arm_v5_3.yml +1 -0
  140. data/vendor/c_exception/vendor/unity/test/targets/iar_armcortex_LM3S9B92_v5_4.yml +1 -0
  141. data/vendor/c_exception/vendor/unity/test/targets/iar_cortexm3_v5.yml +1 -0
  142. data/vendor/c_exception/vendor/unity/test/targets/iar_msp430.yml +1 -0
  143. data/vendor/c_exception/vendor/unity/test/targets/iar_sh2a_v6.yml +1 -0
  144. data/vendor/c_exception/vendor/unity/test/testdata/CException.h +11 -0
  145. data/vendor/c_exception/vendor/unity/test/testdata/Defs.h +8 -0
  146. data/vendor/c_exception/vendor/unity/test/testdata/cmock.h +14 -0
  147. data/vendor/c_exception/vendor/unity/test/testdata/mockMock.h +13 -0
  148. data/vendor/c_exception/vendor/unity/test/testdata/testRunnerGenerator.c +183 -0
  149. data/vendor/c_exception/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +65 -0
  150. data/vendor/c_exception/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +192 -0
  151. data/vendor/c_exception/vendor/unity/test/tests/test_generate_test_runner.rb +1221 -71
  152. data/vendor/c_exception/vendor/unity/test/tests/testparameterized.c +1 -1
  153. data/vendor/c_exception/vendor/unity/test/tests/testunity.c +127 -5
  154. data/vendor/cmock/docs/CMock_Summary.md +1 -1
  155. data/vendor/cmock/lib/cmock_generator.rb +7 -2
  156. data/vendor/cmock/lib/cmock_header_parser.rb +29 -9
  157. data/vendor/cmock/scripts/create_mock.rb +1 -1
  158. data/vendor/cmock/test/system/test_compilation/const.h +15 -0
  159. data/vendor/cmock/test/unit/cmock_generator_main_test.rb +4 -4
  160. data/vendor/cmock/test/unit/cmock_header_parser_test.rb +136 -73
  161. data/vendor/cmock/vendor/c_exception/lib/CException.h +1 -1
  162. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/generate_module.rb +16 -16
  163. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/generate_test_runner.rb +61 -21
  164. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/stylize_as_junit.rb +5 -1
  165. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/unity_to_junit.py +146 -0
  166. data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf +0 -0
  167. data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityAssertionsReference.pdf +0 -0
  168. data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityConfigurationGuide.pdf +0 -0
  169. data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityGettingStartedGuide.pdf +0 -0
  170. data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityHelperScriptsGuide.pdf +0 -0
  171. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/makefile +1 -1
  172. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/src/ProductionCode.c +7 -7
  173. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/src/ProductionCode2.c +2 -2
  174. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/test/TestProductionCode.c +14 -14
  175. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/test/TestProductionCode2.c +2 -2
  176. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +5 -5
  177. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +5 -5
  178. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/unity_config.h +257 -0
  179. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.c +9 -8
  180. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_internals.h +1 -0
  181. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/Makefile +28 -8
  182. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_Test.c +57 -17
  183. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_TestRunner.c +3 -0
  184. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/unity_output_Spy.c +2 -3
  185. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/unity_output_Spy.h +1 -1
  186. data/vendor/cmock/vendor/c_exception/vendor/unity/release/version.info +1 -1
  187. data/vendor/cmock/vendor/c_exception/vendor/unity/src/unity.c +336 -191
  188. data/vendor/cmock/vendor/c_exception/vendor/unity/src/unity.h +73 -69
  189. data/vendor/cmock/vendor/c_exception/vendor/unity/src/unity_internals.h +119 -90
  190. data/vendor/cmock/vendor/c_exception/vendor/unity/test/Makefile +51 -0
  191. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_cmd.c +5 -5
  192. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_def.c +5 -5
  193. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_head1.c +5 -5
  194. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_cmd.c +6 -6
  195. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_def.c +6 -6
  196. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_head1.c +6 -6
  197. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_new1.c +6 -6
  198. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_new2.c +8 -8
  199. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_param.c +6 -6
  200. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_run1.c +6 -6
  201. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_run2.c +8 -8
  202. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_yaml.c +7 -7
  203. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_new1.c +5 -5
  204. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_new2.c +7 -7
  205. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_param.c +5 -5
  206. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_run1.c +5 -5
  207. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_run2.c +7 -7
  208. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_yaml.c +6 -6
  209. data/vendor/cmock/vendor/c_exception/vendor/unity/test/rakefile +5 -0
  210. data/vendor/cmock/vendor/c_exception/vendor/unity/test/rakefile_helper.rb +9 -7
  211. data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/clang_file.yml +1 -0
  212. data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/clang_strict.yml +3 -0
  213. data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/gcc_32.yml +1 -0
  214. data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/gcc_64.yml +1 -0
  215. data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/gcc_auto_limits.yml +1 -0
  216. data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/gcc_auto_sizeof.yml +1 -0
  217. data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/gcc_auto_stdint.yml +1 -0
  218. data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/gcc_manual_math.yml +1 -0
  219. data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/iar_arm_v4.yml +1 -0
  220. data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/iar_arm_v5.yml +1 -0
  221. data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/iar_arm_v5_3.yml +1 -0
  222. data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/iar_armcortex_LM3S9B92_v5_4.yml +1 -0
  223. data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/iar_cortexm3_v5.yml +1 -0
  224. data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/iar_msp430.yml +1 -0
  225. data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/iar_sh2a_v6.yml +1 -0
  226. data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/CException.h +11 -0
  227. data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/Defs.h +8 -0
  228. data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/cmock.h +14 -0
  229. data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/mockMock.h +13 -0
  230. data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/testRunnerGenerator.c +183 -0
  231. data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +65 -0
  232. data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +192 -0
  233. data/vendor/cmock/vendor/c_exception/vendor/unity/test/tests/test_generate_test_runner.rb +1221 -71
  234. data/vendor/cmock/vendor/c_exception/vendor/unity/test/tests/testparameterized.c +1 -1
  235. data/vendor/cmock/vendor/c_exception/vendor/unity/test/tests/testunity.c +127 -5
  236. data/vendor/cmock/vendor/unity/auto/generate_module.rb +16 -16
  237. data/vendor/cmock/vendor/unity/auto/generate_test_runner.rb +61 -21
  238. data/vendor/cmock/vendor/unity/auto/stylize_as_junit.rb +5 -1
  239. data/vendor/cmock/vendor/unity/auto/unity_to_junit.py +146 -0
  240. data/vendor/cmock/vendor/unity/docs/UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf +0 -0
  241. data/vendor/cmock/vendor/unity/docs/UnityAssertionsReference.pdf +0 -0
  242. data/vendor/cmock/vendor/unity/docs/UnityConfigurationGuide.pdf +0 -0
  243. data/vendor/cmock/vendor/unity/docs/UnityGettingStartedGuide.pdf +0 -0
  244. data/vendor/cmock/vendor/unity/docs/UnityHelperScriptsGuide.pdf +0 -0
  245. data/vendor/cmock/vendor/unity/examples/example_1/makefile +1 -1
  246. data/vendor/cmock/vendor/unity/examples/example_1/src/ProductionCode.c +7 -7
  247. data/vendor/cmock/vendor/unity/examples/example_1/src/ProductionCode2.c +2 -2
  248. data/vendor/cmock/vendor/unity/examples/example_1/test/TestProductionCode.c +14 -14
  249. data/vendor/cmock/vendor/unity/examples/example_1/test/TestProductionCode2.c +2 -2
  250. data/vendor/cmock/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +5 -5
  251. data/vendor/cmock/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +5 -5
  252. data/vendor/cmock/vendor/unity/examples/unity_config.h +257 -0
  253. data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture.c +3 -0
  254. data/vendor/cmock/vendor/unity/extras/fixture/test/unity_fixture_Test.c +5 -2
  255. data/vendor/cmock/vendor/unity/extras/fixture/test/unity_output_Spy.c +1 -2
  256. data/vendor/cmock/vendor/unity/extras/fixture/test/unity_output_Spy.h +1 -1
  257. data/vendor/cmock/vendor/unity/src/unity.c +329 -186
  258. data/vendor/cmock/vendor/unity/src/unity.h +73 -69
  259. data/vendor/cmock/vendor/unity/src/unity_internals.h +119 -94
  260. data/vendor/cmock/vendor/unity/test/Makefile +4 -5
  261. data/vendor/cmock/vendor/unity/test/expectdata/testsample_cmd.c +5 -5
  262. data/vendor/cmock/vendor/unity/test/expectdata/testsample_def.c +5 -5
  263. data/vendor/cmock/vendor/unity/test/expectdata/testsample_head1.c +5 -5
  264. data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_cmd.c +6 -6
  265. data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_def.c +6 -6
  266. data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_head1.c +6 -6
  267. data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_new1.c +6 -6
  268. data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_new2.c +8 -8
  269. data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_param.c +6 -6
  270. data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_run1.c +6 -6
  271. data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_run2.c +8 -8
  272. data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_yaml.c +7 -7
  273. data/vendor/cmock/vendor/unity/test/expectdata/testsample_new1.c +5 -5
  274. data/vendor/cmock/vendor/unity/test/expectdata/testsample_new2.c +7 -7
  275. data/vendor/cmock/vendor/unity/test/expectdata/testsample_param.c +5 -5
  276. data/vendor/cmock/vendor/unity/test/expectdata/testsample_run1.c +5 -5
  277. data/vendor/cmock/vendor/unity/test/expectdata/testsample_run2.c +7 -7
  278. data/vendor/cmock/vendor/unity/test/expectdata/testsample_yaml.c +6 -6
  279. data/vendor/cmock/vendor/unity/test/rakefile +5 -0
  280. data/vendor/cmock/vendor/unity/test/rakefile_helper.rb +9 -7
  281. data/vendor/cmock/vendor/unity/test/targets/clang_file.yml +1 -0
  282. data/vendor/cmock/vendor/unity/test/targets/clang_strict.yml +3 -0
  283. data/vendor/cmock/vendor/unity/test/targets/gcc_32.yml +1 -0
  284. data/vendor/cmock/vendor/unity/test/targets/gcc_64.yml +1 -0
  285. data/vendor/cmock/vendor/unity/test/targets/gcc_auto_limits.yml +1 -0
  286. data/vendor/cmock/vendor/unity/test/targets/gcc_auto_sizeof.yml +1 -0
  287. data/vendor/cmock/vendor/unity/test/targets/gcc_auto_stdint.yml +1 -0
  288. data/vendor/cmock/vendor/unity/test/targets/gcc_manual_math.yml +1 -0
  289. data/vendor/cmock/vendor/unity/test/targets/iar_arm_v4.yml +1 -0
  290. data/vendor/cmock/vendor/unity/test/targets/iar_arm_v5.yml +1 -0
  291. data/vendor/cmock/vendor/unity/test/targets/iar_arm_v5_3.yml +1 -0
  292. data/vendor/cmock/vendor/unity/test/targets/iar_armcortex_LM3S9B92_v5_4.yml +1 -0
  293. data/vendor/cmock/vendor/unity/test/targets/iar_cortexm3_v5.yml +1 -0
  294. data/vendor/cmock/vendor/unity/test/targets/iar_msp430.yml +1 -0
  295. data/vendor/cmock/vendor/unity/test/targets/iar_sh2a_v6.yml +1 -0
  296. data/vendor/cmock/vendor/unity/test/testdata/CException.h +11 -0
  297. data/vendor/cmock/vendor/unity/test/testdata/Defs.h +8 -0
  298. data/vendor/cmock/vendor/unity/test/testdata/cmock.h +14 -0
  299. data/vendor/cmock/vendor/unity/test/testdata/mockMock.h +13 -0
  300. data/vendor/cmock/vendor/unity/test/testdata/testRunnerGenerator.c +183 -0
  301. data/vendor/cmock/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +65 -0
  302. data/vendor/cmock/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +192 -0
  303. data/vendor/cmock/vendor/unity/test/tests/test_generate_test_runner.rb +1221 -71
  304. data/vendor/cmock/vendor/unity/test/tests/testparameterized.c +1 -1
  305. data/vendor/cmock/vendor/unity/test/tests/testunity.c +104 -7
  306. data/vendor/deep_merge/README +94 -94
  307. data/vendor/deep_merge/Rakefile +28 -28
  308. data/vendor/deep_merge/lib/deep_merge.rb +211 -211
  309. data/vendor/deep_merge/test/test_deep_merge.rb +553 -553
  310. data/vendor/unity/auto/generate_module.rb +16 -16
  311. data/vendor/unity/auto/generate_test_runner.rb +61 -21
  312. data/vendor/unity/auto/stylize_as_junit.rb +5 -1
  313. data/vendor/unity/auto/unity_to_junit.py +146 -0
  314. data/vendor/unity/docs/UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf +0 -0
  315. data/vendor/unity/docs/UnityAssertionsReference.pdf +0 -0
  316. data/vendor/unity/docs/UnityConfigurationGuide.pdf +0 -0
  317. data/vendor/unity/docs/UnityGettingStartedGuide.pdf +0 -0
  318. data/vendor/unity/docs/UnityHelperScriptsGuide.pdf +0 -0
  319. data/vendor/unity/examples/example_1/makefile +1 -1
  320. data/vendor/unity/examples/example_1/src/ProductionCode.c +7 -7
  321. data/vendor/unity/examples/example_1/src/ProductionCode2.c +2 -2
  322. data/vendor/unity/examples/example_1/test/TestProductionCode.c +14 -14
  323. data/vendor/unity/examples/example_1/test/TestProductionCode2.c +2 -2
  324. data/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +5 -5
  325. data/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +5 -5
  326. data/vendor/unity/examples/unity_config.h +257 -0
  327. data/vendor/unity/extras/fixture/src/unity_fixture.c +3 -0
  328. data/vendor/unity/extras/fixture/test/unity_fixture_Test.c +5 -2
  329. data/vendor/unity/extras/fixture/test/unity_output_Spy.c +1 -2
  330. data/vendor/unity/extras/fixture/test/unity_output_Spy.h +1 -1
  331. data/vendor/unity/src/unity.c +329 -186
  332. data/vendor/unity/src/unity.h +73 -69
  333. data/vendor/unity/src/unity_internals.h +119 -94
  334. data/vendor/unity/test/Makefile +4 -5
  335. data/vendor/unity/test/expectdata/testsample_cmd.c +5 -5
  336. data/vendor/unity/test/expectdata/testsample_def.c +5 -5
  337. data/vendor/unity/test/expectdata/testsample_head1.c +5 -5
  338. data/vendor/unity/test/expectdata/testsample_mock_cmd.c +6 -6
  339. data/vendor/unity/test/expectdata/testsample_mock_def.c +6 -6
  340. data/vendor/unity/test/expectdata/testsample_mock_head1.c +6 -6
  341. data/vendor/unity/test/expectdata/testsample_mock_new1.c +6 -6
  342. data/vendor/unity/test/expectdata/testsample_mock_new2.c +8 -8
  343. data/vendor/unity/test/expectdata/testsample_mock_param.c +6 -6
  344. data/vendor/unity/test/expectdata/testsample_mock_run1.c +6 -6
  345. data/vendor/unity/test/expectdata/testsample_mock_run2.c +8 -8
  346. data/vendor/unity/test/expectdata/testsample_mock_yaml.c +7 -7
  347. data/vendor/unity/test/expectdata/testsample_new1.c +5 -5
  348. data/vendor/unity/test/expectdata/testsample_new2.c +7 -7
  349. data/vendor/unity/test/expectdata/testsample_param.c +5 -5
  350. data/vendor/unity/test/expectdata/testsample_run1.c +5 -5
  351. data/vendor/unity/test/expectdata/testsample_run2.c +7 -7
  352. data/vendor/unity/test/expectdata/testsample_yaml.c +6 -6
  353. data/vendor/unity/test/rakefile +5 -0
  354. data/vendor/unity/test/rakefile_helper.rb +9 -7
  355. data/vendor/unity/test/targets/clang_file.yml +1 -0
  356. data/vendor/unity/test/targets/clang_strict.yml +3 -0
  357. data/vendor/unity/test/targets/gcc_32.yml +1 -0
  358. data/vendor/unity/test/targets/gcc_64.yml +1 -0
  359. data/vendor/unity/test/targets/gcc_auto_limits.yml +1 -0
  360. data/vendor/unity/test/targets/gcc_auto_sizeof.yml +1 -0
  361. data/vendor/unity/test/targets/gcc_auto_stdint.yml +1 -0
  362. data/vendor/unity/test/targets/gcc_manual_math.yml +1 -0
  363. data/vendor/unity/test/targets/iar_arm_v4.yml +1 -0
  364. data/vendor/unity/test/targets/iar_arm_v5.yml +1 -0
  365. data/vendor/unity/test/targets/iar_arm_v5_3.yml +1 -0
  366. data/vendor/unity/test/targets/iar_armcortex_LM3S9B92_v5_4.yml +1 -0
  367. data/vendor/unity/test/targets/iar_cortexm3_v5.yml +1 -0
  368. data/vendor/unity/test/targets/iar_msp430.yml +1 -0
  369. data/vendor/unity/test/targets/iar_sh2a_v6.yml +1 -0
  370. data/vendor/unity/test/testdata/CException.h +11 -0
  371. data/vendor/unity/test/testdata/Defs.h +8 -0
  372. data/vendor/unity/test/testdata/cmock.h +14 -0
  373. data/vendor/unity/test/testdata/mockMock.h +13 -0
  374. data/vendor/unity/test/testdata/testRunnerGenerator.c +183 -0
  375. data/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +65 -0
  376. data/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +192 -0
  377. data/vendor/unity/test/tests/test_generate_test_runner.rb +1221 -71
  378. data/vendor/unity/test/tests/testparameterized.c +1 -1
  379. data/vendor/unity/test/tests/testunity.c +104 -7
  380. metadata +124 -32
  381. data/plugins/gcov/readme.txt +0 -0
  382. data/plugins/warnings_report/warnings_report.rb +0 -71
  383. data/plugins/xml_tests_report/xml_tests_report.rb +0 -110
  384. data/vendor/c_exception/vendor/unity/docs/Unity Summary.odt +0 -0
  385. data/vendor/c_exception/vendor/unity/docs/Unity Summary.pdf +0 -0
  386. data/vendor/c_exception/vendor/unity/docs/Unity Summary.txt +0 -224
  387. data/vendor/c_exception/vendor/unity/test/testdata/mocksample.c +0 -51
  388. data/vendor/c_exception/vendor/unity/test/testdata/sample.yml +0 -9
  389. data/vendor/c_exception/vendor/unity/test/testdata/testsample.c +0 -68
  390. data/vendor/cmock/vendor/c_exception/vendor/unity/docs/Unity Summary.odt +0 -0
  391. data/vendor/cmock/vendor/c_exception/vendor/unity/docs/Unity Summary.pdf +0 -0
  392. data/vendor/cmock/vendor/c_exception/vendor/unity/docs/Unity Summary.txt +0 -224
  393. data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/mocksample.c +0 -51
  394. data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/sample.yml +0 -9
  395. data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/testsample.c +0 -68
  396. data/vendor/cmock/vendor/unity/docs/Unity Summary.odt +0 -0
  397. data/vendor/cmock/vendor/unity/docs/Unity Summary.pdf +0 -0
  398. data/vendor/cmock/vendor/unity/docs/Unity Summary.txt +0 -224
  399. data/vendor/cmock/vendor/unity/test/testdata/mocksample.c +0 -51
  400. data/vendor/cmock/vendor/unity/test/testdata/sample.yml +0 -9
  401. data/vendor/cmock/vendor/unity/test/testdata/testsample.c +0 -68
  402. data/vendor/unity/docs/Unity Summary.odt +0 -0
  403. data/vendor/unity/docs/Unity Summary.pdf +0 -0
  404. data/vendor/unity/docs/Unity Summary.txt +0 -224
  405. data/vendor/unity/test/testdata/mocksample.c +0 -51
  406. data/vendor/unity/test/testdata/sample.yml +0 -9
  407. data/vendor/unity/test/testdata/testsample.c +0 -68
@@ -0,0 +1,9 @@
1
+ ceedling-gcov
2
+ =============
3
+
4
+ Plugin for integrating GNU GCov code coverage tool into Ceedling projects
5
+
6
+ # To-Do list
7
+
8
+ - Generate overall report (combined statistics from all files with coverage)
9
+ - Generate coverage output files
@@ -1,7 +1,7 @@
1
1
  % function_string = hash[:coverage][:functions].to_s
2
2
  % branch_string = hash[:coverage][:branches].to_s
3
3
  % format_string = "%#{[function_string.length, branch_string.length].max}i"
4
- <%=@ceedling[:plugin_reportinator].generate_banner("#{BULLSEYE_ROOT_NAME.upcase}: CODE COVERAGE SUMMARY")%>
4
+ <%=@ceedling[:plugin_reportinator].generate_banner("#{GCOV_ROOT_NAME.upcase}: CODE COVERAGE SUMMARY")%>
5
5
  % if (!hash[:coverage][:functions].nil?)
6
6
  FUNCTIONS: <%=sprintf(format_string, hash[:coverage][:functions])%>%
7
7
  % else
@@ -30,5 +30,14 @@
30
30
  - -b
31
31
  - -o "$": GCOV_BUILD_OUTPUT_PATH
32
32
  - "\"${1}\""
33
-
33
+ :gcov_post_report:
34
+ :executable: gcovr
35
+ :optional: TRUE
36
+ :arguments:
37
+ - -p
38
+ - -b
39
+ - -e '^vendor.*|^build.*|^test.*|^lib.*'
40
+ - --html
41
+ - -r .
42
+ - -o GcovCoverageResults.html
34
43
  ...
@@ -20,6 +20,7 @@ rule(/#{GCOV_BUILD_OUTPUT_PATH}\/#{'.+\\'+EXTENSION_OBJECT}$/ => [
20
20
  if (File.basename(object.source) =~ /^(#{PROJECT_TEST_FILE_PREFIX}|#{CMOCK_MOCK_PREFIX}|#{GCOV_IGNORE_SOURCES.join('|')})/i)
21
21
  @ceedling[:generator].generate_object_file(
22
22
  TOOLS_GCOV_COMPILER,
23
+ OPERATION_COMPILE_SYM,
23
24
  GCOV_SYM,
24
25
  object.source,
25
26
  object.name,
@@ -78,18 +79,18 @@ namespace GCOV_SYM do
78
79
  message = "\nOops! '#{GCOV_ROOT_NAME}:*' isn't a real task. " +
79
80
  "Use a real test or source file name (no path) in place of the wildcard.\n" +
80
81
  "Example: rake #{GCOV_ROOT_NAME}:foo.c\n\n"
81
-
82
+
82
83
  @ceedling[:streaminator].stdout_puts( message )
83
84
  end
84
-
85
+
85
86
  desc "Run tests by matching regular expression pattern."
86
87
  task :pattern, [:regex] => [:directories] do |t, args|
87
88
  matches = []
88
-
89
+
89
90
  COLLECTION_ALL_TESTS.each do |test|
90
91
  matches << test if test =~ /#{args.regex}/
91
92
  end
92
-
93
+
93
94
  if (matches.size > 0)
94
95
  @ceedling[:configurator].replace_flattened_config(@ceedling[GCOV_SYM].config)
95
96
  @ceedling[:test_invoker].setup_and_invoke(matches, GCOV_SYM, {:force_run => false})
@@ -102,11 +103,11 @@ namespace GCOV_SYM do
102
103
  desc "Run tests whose test path contains [dir] or [dir] substring."
103
104
  task :path, [:dir] => [:directories] do |t, args|
104
105
  matches = []
105
-
106
+
106
107
  COLLECTION_ALL_TESTS.each do |test|
107
108
  matches << test if File.dirname(test).include?(args.dir.gsub(/\\/, '/'))
108
109
  end
109
-
110
+
110
111
  if (matches.size > 0)
111
112
  @ceedling[:configurator].replace_flattened_config(@ceedling[GCOV_SYM].config)
112
113
  @ceedling[:test_invoker].setup_and_invoke(matches, GCOV_SYM, {:force_run => false})
@@ -122,7 +123,7 @@ namespace GCOV_SYM do
122
123
  @ceedling[:test_invoker].setup_and_invoke(COLLECTION_ALL_TESTS, GCOV_SYM, {:force_run => false})
123
124
  @ceedling[:configurator].restore_config
124
125
  end
125
-
126
+
126
127
  # use a rule to increase efficiency for large projects
127
128
  # gcov test tasks by regex
128
129
  rule(/^#{GCOV_TASK_ROOT}\S+$/ => [
@@ -137,7 +138,7 @@ namespace GCOV_SYM do
137
138
  @ceedling[:test_invoker].setup_and_invoke([test.source], GCOV_SYM)
138
139
  @ceedling[:configurator].restore_config
139
140
  end
140
-
141
+
141
142
  end
142
143
 
143
144
  if PROJECT_USE_DEEP_DEPENDENCIES
@@ -150,3 +151,14 @@ namespace REFRESH_SYM do
150
151
  end
151
152
  end
152
153
 
154
+ namespace UTILS_SYM do
155
+
156
+ desc "Create gcov code coverage html report"
157
+ task GCOV_SYM do
158
+ command = @ceedling[:tool_executor].build_command_line(TOOLS_GCOV_POST_REPORT, [])
159
+ puts 'Creating html report of gcov results...'
160
+ @ceedling[:tool_executor].exec(command[:line], command[:options])
161
+ end
162
+
163
+ end
164
+
@@ -19,8 +19,8 @@ class Gcov < Plugin
19
19
  attr_reader :config
20
20
 
21
21
  def setup
22
- @result_list = []
23
-
22
+ @result_list = []
23
+
24
24
  @config = {
25
25
  :project_test_build_output_path => GCOV_BUILD_OUTPUT_PATH,
26
26
  :project_test_results_path => GCOV_RESULTS_PATH,
@@ -28,14 +28,16 @@ class Gcov < Plugin
28
28
  :defines_test => DEFINES_TEST + ['CODE_COVERAGE'],
29
29
  :collection_defines_test_and_vendor => COLLECTION_DEFINES_TEST_AND_VENDOR + ['CODE_COVERAGE']
30
30
  }
31
-
32
- @coverage_template_all = @ceedling[:file_wrapper].read( File.join( PLUGINS_GCOV_PATH, 'template.erb') )
31
+
32
+ @plugin_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))
33
+ @coverage_template_all = @ceedling[:file_wrapper].read( File.join( @plugin_root, 'assets/template.erb') )
33
34
  end
34
35
 
35
36
  def generate_coverage_object_file(source, object)
36
- compile_command =
37
+ compile_command =
37
38
  @ceedling[:tool_executor].build_command_line(
38
39
  TOOLS_GCOV_COMPILER,
40
+ @ceedling[:flaginator].flag_down( OPERATION_COMPILE_SYM, GCOV_SYM, source),
39
41
  source,
40
42
  object,
41
43
  @ceedling[:file_path_utils].form_test_build_list_filepath( object ) )
@@ -45,12 +47,12 @@ class Gcov < Plugin
45
47
 
46
48
  def post_test_fixture_execute(arg_hash)
47
49
  result_file = arg_hash[:result_file]
48
-
50
+
49
51
  if ((result_file =~ /#{GCOV_RESULTS_PATH}/) and (not @result_list.include?(result_file)))
50
52
  @result_list << arg_hash[:result_file]
51
53
  end
52
54
  end
53
-
55
+
54
56
  def post_build
55
57
  return if (not @ceedling[:task_invoker].invoked?(/^#{GCOV_TASK_ROOT}/))
56
58
 
@@ -60,18 +62,14 @@ class Gcov < Plugin
60
62
  :header => GCOV_ROOT_NAME.upcase,
61
63
  :results => results
62
64
  }
63
-
65
+
64
66
  @ceedling[:plugin_reportinator].run_test_results_report(hash) do
65
67
  message = ''
66
68
  message = 'Unit test failures.' if (results[:counts][:failed] > 0)
67
69
  message
68
70
  end
69
-
70
- if (@ceedling[:task_invoker].invoked?(/^#{GCOV_TASK_ROOT}(all|delta)/))
71
- report_coverage_results_summary(@ceedling[:test_invoker].sources)
72
- else
73
- report_per_file_coverage_results(@ceedling[:test_invoker].sources)
74
- end
71
+
72
+ report_per_file_coverage_results(@ceedling[:test_invoker].sources)
75
73
  end
76
74
 
77
75
  def summary
@@ -85,19 +83,10 @@ class Gcov < Plugin
85
83
  }
86
84
 
87
85
  @ceedling[:plugin_reportinator].run_test_results_report(hash)
88
-
89
- # coverage results
90
- # command = @ceedling[:tool_executor].build_command_line(TOOLS_GCOV_REPORT_COVSRC)
91
- # shell_result = @ceedling[:tool_executor].exec(command[:line], command[:options])
92
- # report_coverage_results_all(shell_result[:output])
93
86
  end
94
87
 
95
88
  private ###################################
96
89
 
97
- def report_coverage_results_summary(sources)
98
-
99
- end
100
-
101
90
  def report_per_file_coverage_results(sources)
102
91
  banner = @ceedling[:plugin_reportinator].generate_banner "#{GCOV_ROOT_NAME.upcase}: CODE COVERAGE SUMMARY"
103
92
  @ceedling[:streaminator].stdout_puts "\n" + banner
@@ -108,7 +97,7 @@ class Gcov < Plugin
108
97
 
109
98
  coverage_sources.each do |source|
110
99
  basename = File.basename(source)
111
- command = @ceedling[:tool_executor].build_command_line(TOOLS_GCOV_REPORT, basename)
100
+ command = @ceedling[:tool_executor].build_command_line(TOOLS_GCOV_REPORT, [], [basename])
112
101
  shell_results = @ceedling[:tool_executor].exec(command[:line], command[:options])
113
102
  coverage_results = shell_results[:output]
114
103
 
@@ -3,12 +3,12 @@ namespace :module do
3
3
 
4
4
  desc "Generate module (source, header and test files)"
5
5
  task :create, :module_path do |t, args|
6
- @ceedling[:module_generator].create(args[:module_path])
6
+ args[:module_path].split(/,/).each {|v| @ceedling[:module_generator].create(v) }
7
7
  end
8
8
 
9
9
  desc "Destroy module (source, header and test files)"
10
10
  task :destroy, :module_path do |t, args|
11
- @ceedling[:module_generator].create(args[:module_path], {:destroy => true})
11
+ args[:module_path].split(/,/).each {|v| @ceedling[:module_generator].create(v, {:destroy => true}) }
12
12
  end
13
-
13
+
14
14
  end
@@ -0,0 +1,69 @@
1
+ require 'ceedling/plugin'
2
+ require 'ceedling/constants'
3
+
4
+ class WarningsReport < Plugin
5
+ def setup
6
+ @stderr_redirect = nil
7
+ @log_paths = {}
8
+ end
9
+
10
+ def pre_compile_execute(arg_hash)
11
+ # at beginning of compile, override tool's stderr_redirect so we can parse $stderr + $stdout
12
+ set_stderr_redirect(arg_hash)
13
+ end
14
+
15
+ def post_compile_execute(arg_hash)
16
+ # after compilation, grab output for parsing/logging, restore stderr_redirect, log warning if it exists
17
+ output = arg_hash[:shell_result][:output]
18
+ restore_stderr_redirect(arg_hash)
19
+ write_warning_log(arg_hash[:context], output)
20
+ end
21
+
22
+ def pre_link_execute(arg_hash)
23
+ # at beginning of link, override tool's stderr_redirect so we can parse $stderr + $stdout
24
+ set_stderr_redirect(arg_hash)
25
+ end
26
+
27
+ def post_link_execute(arg_hash)
28
+ # after linking, grab output for parsing/logging, restore stderr_redirect, log warning if it exists
29
+ output = arg_hash[:shell_result][:output]
30
+ restore_stderr_redirect(arg_hash)
31
+ write_warning_log(arg_hash[:context], output)
32
+ end
33
+
34
+ private
35
+
36
+ def set_stderr_redirect(hash)
37
+ @stderr_redirect = hash[:tool][:stderr_redirect]
38
+ hash[:tool][:stderr_redirect] = StdErrRedirect::AUTO
39
+ end
40
+
41
+ def restore_stderr_redirect(hash)
42
+ hash[:tool][:stderr_redirect] = @stderr_redirect
43
+ end
44
+
45
+ def write_warning_log(context, output)
46
+ # if $stderr/$stdout contain "warning", log it
47
+ if output =~ /warning/i
48
+ # generate a log path & file io write flags
49
+ logging = generate_log_path(context)
50
+ @ceedling[:file_wrapper].write(logging[:path], output + "\n", logging[:flags]) unless logging.nil?
51
+ end
52
+ end
53
+
54
+ def generate_log_path(context)
55
+ # if path has already been generated, return it & 'append' file io flags (append to log)
56
+ return { path: @log_paths[context], flags: 'a' } unless @log_paths[context].nil?
57
+
58
+ # first time through, generate path & 'write' file io flags (create new log)
59
+ base_path = File.join(PROJECT_BUILD_ARTIFACTS_ROOT, context.to_s)
60
+ file_path = File.join(base_path, 'warnings.log')
61
+
62
+ if @ceedling[:file_wrapper].exist?(base_path)
63
+ @log_paths[context] = file_path
64
+ return { path: file_path, flags: 'w' }
65
+ end
66
+
67
+ nil
68
+ end
69
+ end
@@ -0,0 +1,108 @@
1
+ require 'ceedling/plugin'
2
+ require 'ceedling/constants'
3
+
4
+ class XmlTestsReport < Plugin
5
+ def setup
6
+ @results_list = {}
7
+ @test_counter = 0
8
+ end
9
+
10
+ def post_test_fixture_execute(arg_hash)
11
+ context = arg_hash[:context]
12
+
13
+ @results_list[context] = [] if @results_list[context].nil?
14
+
15
+ @results_list[context] << arg_hash[:result_file]
16
+ end
17
+
18
+ def post_build
19
+ @results_list.each_key do |context|
20
+ results = @ceedling[:plugin_reportinator].assemble_test_results(@results_list[context])
21
+
22
+ file_path = File.join(PROJECT_BUILD_ARTIFACTS_ROOT, context.to_s, 'report.xml')
23
+
24
+ @ceedling[:file_wrapper].open(file_path, 'w') do |f|
25
+ @test_counter = 1
26
+ write_results(results, f)
27
+ end
28
+ end
29
+ end
30
+
31
+ private
32
+
33
+ def write_results(results, stream)
34
+ write_header(stream)
35
+ write_failures(results[:failures], stream)
36
+ write_tests(results[:successes], stream, 'SuccessfulTests')
37
+ write_tests(results[:ignores], stream, 'IgnoredTests')
38
+ write_statistics(results[:counts], stream)
39
+ write_footer(stream)
40
+ end
41
+
42
+ def write_header(stream)
43
+ stream.puts "<?xml version='1.0' encoding='utf-8' ?>"
44
+ stream.puts '<TestRun>'
45
+ end
46
+
47
+ def write_failures(results, stream)
48
+ if results.size.zero?
49
+ stream.puts "\t<FailedTests/>"
50
+ return
51
+ end
52
+
53
+ stream.puts "\t<FailedTests>"
54
+
55
+ results.each do |result|
56
+ result[:collection].each do |item|
57
+ filename = File.join(result[:source][:path], result[:source][:file])
58
+
59
+ stream.puts "\t\t<Test id=\"#{@test_counter}\">"
60
+ stream.puts "\t\t\t<Name>#{filename}::#{item[:test]}</Name>"
61
+ stream.puts "\t\t\t<FailureType>Assertion</FailureType>"
62
+ stream.puts "\t\t\t<Location>"
63
+ stream.puts "\t\t\t\t<File>#{filename}</File>"
64
+ stream.puts "\t\t\t\t<Line>#{item[:line]}</Line>"
65
+ stream.puts "\t\t\t</Location>"
66
+ stream.puts "\t\t\t<Message>#{item[:message]}</Message>"
67
+ stream.puts "\t\t</Test>"
68
+ @test_counter += 1
69
+ end
70
+ end
71
+
72
+ stream.puts "\t</FailedTests>"
73
+ end
74
+
75
+ def write_tests(results, stream, tag)
76
+ if results.size.zero?
77
+ stream.puts "\t<#{tag}/>"
78
+ return
79
+ end
80
+
81
+ stream.puts "\t<#{tag}>"
82
+
83
+ results.each do |result|
84
+ result[:collection].each do |item|
85
+ stream.puts "\t\t<Test id=\"#{@test_counter}\">"
86
+ stream.puts "\t\t\t<Name>#{File.join(result[:source][:path], result[:source][:file])}::#{item[:test]}</Name>"
87
+ stream.puts "\t\t</Test>"
88
+ @test_counter += 1
89
+ end
90
+ end
91
+
92
+ stream.puts "\t</#{tag}>"
93
+ end
94
+
95
+ def write_statistics(counts, stream)
96
+ stream.puts "\t<Statistics>"
97
+ stream.puts "\t\t<Tests>#{counts[:total]}</Tests>"
98
+ stream.puts "\t\t<Ignores>#{counts[:ignored]}</Ignores>"
99
+ stream.puts "\t\t<FailuresTotal>#{counts[:failed]}</FailuresTotal>"
100
+ stream.puts "\t\t<Errors>0</Errors>"
101
+ stream.puts "\t\t<Failures>#{counts[:failed]}</Failures>"
102
+ stream.puts "\t</Statistics>"
103
+ end
104
+
105
+ def write_footer(stream)
106
+ stream.puts '</TestRun>'
107
+ end
108
+ end
@@ -151,7 +151,7 @@ module CeedlingTestCases
151
151
  def contains_documentation
152
152
  @c.with_context do
153
153
  Dir.chdir @proj_name do
154
- expect(Dir["vendor/ceedling/docs/*.pdf"].length).to eq 4
154
+ expect(Dir["vendor/ceedling/docs/*.pdf"].length).to be >= 4
155
155
  end
156
156
  end
157
157
  end
@@ -72,7 +72,7 @@ extern volatile CEXCEPTION_FRAME_T CExceptionFrames[];
72
72
  { \
73
73
  jmp_buf *PrevFrame, NewFrame; \
74
74
  unsigned int MY_ID = CEXCEPTION_GET_ID; \
75
- PrevFrame = CExceptionFrames[CEXCEPTION_GET_ID].pFrame; \
75
+ PrevFrame = CExceptionFrames[MY_ID].pFrame; \
76
76
  CExceptionFrames[MY_ID].pFrame = (jmp_buf*)(&NewFrame); \
77
77
  CExceptionFrames[MY_ID].Exception = CEXCEPTION_NONE; \
78
78
  CEXCEPTION_HOOK_START_TRY; \
@@ -2,7 +2,7 @@
2
2
  # Unity Project - A Test Framework for C
3
3
  # Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams
4
4
  # [Released under MIT License. Please refer to license.txt for details]
5
- # ==========================================
5
+ # ==========================================
6
6
 
7
7
  # This script creates all the files with start code necessary for a new module.
8
8
  # A simple module only requires a source file, header file, and test file.
@@ -32,20 +32,20 @@ HELP_TEXT = [ "\nGENERATE MODULE\n-------- ------",
32
32
 
33
33
  #Built in patterns
34
34
  PATTERNS = { 'src' => {'' => { :inc => [] } },
35
- 'dh' => {'Driver' => { :inc => ['%1$sHardware.h'] },
36
- 'Hardware' => { :inc => [] }
35
+ 'dh' => {'Driver' => { :inc => ['%1$sHardware.h'] },
36
+ 'Hardware' => { :inc => [] }
37
37
  },
38
- 'dih' => {'Driver' => { :inc => ['%1$sHardware.h', '%1$sInterrupt.h'] },
38
+ 'dih' => {'Driver' => { :inc => ['%1$sHardware.h', '%1$sInterrupt.h'] },
39
39
  'Interrupt'=> { :inc => ['%1$sHardware.h'] },
40
- 'Hardware' => { :inc => [] }
40
+ 'Hardware' => { :inc => [] }
41
41
  },
42
- 'mch' => {'Model' => { :inc => [] },
42
+ 'mch' => {'Model' => { :inc => [] },
43
43
  'Conductor'=> { :inc => ['%1$sModel.h', '%1$sHardware.h'] },
44
- 'Hardware' => { :inc => [] }
44
+ 'Hardware' => { :inc => [] }
45
45
  },
46
- 'mvp' => {'Model' => { :inc => [] },
46
+ 'mvp' => {'Model' => { :inc => [] },
47
47
  'Presenter'=> { :inc => ['%1$sModel.h', '%1$sView.h'] },
48
- 'View' => { :inc => [] }
48
+ 'View' => { :inc => [] }
49
49
  }
50
50
  }
51
51
 
@@ -63,7 +63,7 @@ void tearDown(void)
63
63
 
64
64
  void test_%1$s_NeedToImplement(void)
65
65
  {
66
- TEST_IGNORE();
66
+ TEST_IGNORE_MESSAGE("Need to Implement %1$s");
67
67
  }
68
68
  ]
69
69
 
@@ -91,7 +91,7 @@ ARGV.each do |arg|
91
91
  when /^(\w+)/
92
92
  raise "ERROR: You can't have more than one Module name specified!" unless @module_name.nil?
93
93
  @module_name = arg
94
- when /^-(h|-help)/
94
+ when /^-(h|-help)/
95
95
  puts HELP_TEXT
96
96
  exit
97
97
  else
@@ -126,7 +126,7 @@ end
126
126
  @includes.merge!(@extra_inc) unless @extra_inc.nil?
127
127
 
128
128
  #create triad definition
129
- TRIAD = [ { :ext => '.c', :path => @path_src, :template => TEMPLATE_SRC, :inc => :src, :boilerplate => @boilerplates[:src] },
129
+ TRIAD = [ { :ext => '.c', :path => @path_src, :template => TEMPLATE_SRC, :inc => :src, :boilerplate => @boilerplates[:src] },
130
130
  { :ext => '.h', :path => @path_inc, :template => TEMPLATE_INC, :inc => :inc, :boilerplate => @boilerplates[:inc] },
131
131
  { :ext => '.c', :path => @path_tst+'Test', :template => TEMPLATE_TST, :inc => :tst, :boilerplate => @boilerplates[:tst] },
132
132
  ]
@@ -159,7 +159,7 @@ if @destroy
159
159
  file = filespec[:path]
160
160
  if File.exist?(file)
161
161
  if @update_svn
162
- `svn delete \"#{file}\" --force`
162
+ `svn delete \"#{file}\" --force`
163
163
  puts "File #{file} deleted and removed from source control"
164
164
  else
165
165
  FileUtils.remove(file)
@@ -182,13 +182,13 @@ end
182
182
  files.each_with_index do |file, i|
183
183
  File.open(file[:path], 'w') do |f|
184
184
  f.write(file[:boilerplate] % [file[:name]]) unless file[:boilerplate].nil?
185
- f.write(file[:template] % [ file[:name],
186
- file[:includes].map{|f| "#include \"#{f}\"\n"}.join,
185
+ f.write(file[:template] % [ file[:name],
186
+ file[:includes].map{|f| "#include \"#{f}\"\n"}.join,
187
187
  file[:name].upcase ]
188
188
  )
189
189
  end
190
190
  if (@update_svn)
191
- `svn add \"#{file[:path]}\"`
191
+ `svn add \"#{file[:path]}\"`
192
192
  if $?.exitstatus == 0
193
193
  puts "File #{file[:path]} created and added to source control"
194
194
  else