ceedling 0.29.1 → 0.30.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1267) hide show
  1. checksums.yaml +5 -5
  2. data/Gemfile +15 -16
  3. data/Gemfile.lock +1 -1
  4. data/README.md +108 -107
  5. data/Rakefile +11 -11
  6. data/assets/ceedling +3 -3
  7. data/assets/ceedling.cmd +0 -0
  8. data/assets/default_gitignore +5 -5
  9. data/assets/example_file.c +5 -5
  10. data/assets/example_file.h +6 -6
  11. data/assets/project_as_gem.yml +101 -97
  12. data/assets/project_with_guts.yml +102 -98
  13. data/assets/project_with_guts_gcov.yml +102 -98
  14. data/assets/project_with_guts_gcov_abortonuncovered.yml +93 -0
  15. data/assets/test_example_file.c +13 -13
  16. data/assets/test_example_file_boom.c +13 -13
  17. data/assets/test_example_file_success.c +14 -14
  18. data/assets/test_example_file_verbose.c +12 -12
  19. data/assets/uncovered_example_file.c +5 -0
  20. data/bin/ceedling +351 -339
  21. data/ceedling.gemspec +52 -36
  22. data/config/test_environment.rb +11 -11
  23. data/docs/Ceedling Basic Porting.pdf +0 -0
  24. data/docs/Ceedling Managing Release Code.pdf +0 -0
  25. data/docs/Ceedling Powerful Plugins.pdf +0 -0
  26. data/docs/Ceedling Working with IDEs.pdf +0 -0
  27. data/docs/CeedlingPacket.md +2213 -2134
  28. data/docs/CeedlingUpgrade.md +83 -83
  29. data/docs/ThrowTheSwitchCodingStandard.md +207 -207
  30. data/examples/blinky/project.yml +99 -99
  31. data/examples/blinky/rakefile.rb +31 -31
  32. data/examples/blinky/src/BlinkTask.c +21 -21
  33. data/examples/blinky/src/BlinkTask.h +6 -6
  34. data/examples/blinky/src/Configure.c +36 -36
  35. data/examples/blinky/src/Configure.h +6 -6
  36. data/examples/blinky/src/main.c +51 -51
  37. data/examples/blinky/src/main.h +9 -9
  38. data/examples/blinky/test/support/stub_interrupt.h +347 -347
  39. data/examples/blinky/test/support/stub_io.h +421 -421
  40. data/examples/blinky/test/support/stub_iom328p.h +883 -883
  41. data/examples/blinky/test/support/stub_sfr_defs.h +269 -269
  42. data/examples/blinky/test/test_BlinkTask.c +42 -42
  43. data/examples/blinky/test/test_Configure.c +29 -29
  44. data/examples/blinky/test/test_main.c +60 -60
  45. data/examples/temp_sensor/project.yml +66 -76
  46. data/examples/temp_sensor/rakefile.rb +6 -6
  47. data/examples/temp_sensor/src/AdcConductor.c +42 -42
  48. data/examples/temp_sensor/src/AdcConductor.h +13 -13
  49. data/examples/temp_sensor/src/AdcHardware.c +27 -27
  50. data/examples/temp_sensor/src/AdcHardware.h +11 -11
  51. data/examples/temp_sensor/src/AdcHardwareConfigurator.c +18 -18
  52. data/examples/temp_sensor/src/AdcHardwareConfigurator.h +10 -10
  53. data/examples/temp_sensor/src/AdcModel.c +33 -33
  54. data/examples/temp_sensor/src/AdcModel.h +13 -13
  55. data/examples/temp_sensor/src/AdcTemperatureSensor.c +51 -51
  56. data/examples/temp_sensor/src/AdcTemperatureSensor.h +10 -10
  57. data/examples/temp_sensor/src/Executor.c +25 -25
  58. data/examples/temp_sensor/src/Executor.h +9 -9
  59. data/examples/temp_sensor/src/IntrinsicsWrapper.c +18 -18
  60. data/examples/temp_sensor/src/IntrinsicsWrapper.h +7 -7
  61. data/examples/temp_sensor/src/Main.c +46 -46
  62. data/examples/temp_sensor/src/Main.h +7 -7
  63. data/examples/temp_sensor/src/Model.c +10 -10
  64. data/examples/temp_sensor/src/Model.h +8 -8
  65. data/examples/temp_sensor/src/ModelConfig.h +7 -7
  66. data/examples/temp_sensor/src/TaskScheduler.c +72 -72
  67. data/examples/temp_sensor/src/TaskScheduler.h +11 -11
  68. data/examples/temp_sensor/src/TemperatureCalculator.c +27 -27
  69. data/examples/temp_sensor/src/TemperatureCalculator.h +8 -8
  70. data/examples/temp_sensor/src/TemperatureFilter.c +38 -38
  71. data/examples/temp_sensor/src/TemperatureFilter.h +10 -10
  72. data/examples/temp_sensor/src/TimerConductor.c +15 -15
  73. data/examples/temp_sensor/src/TimerConductor.h +9 -9
  74. data/examples/temp_sensor/src/TimerConfigurator.c +51 -51
  75. data/examples/temp_sensor/src/TimerConfigurator.h +15 -15
  76. data/examples/temp_sensor/src/TimerHardware.c +15 -15
  77. data/examples/temp_sensor/src/TimerHardware.h +8 -8
  78. data/examples/temp_sensor/src/TimerInterruptConfigurator.c +55 -55
  79. data/examples/temp_sensor/src/TimerInterruptConfigurator.h +13 -13
  80. data/examples/temp_sensor/src/TimerInterruptHandler.c +25 -25
  81. data/examples/temp_sensor/src/TimerInterruptHandler.h +10 -10
  82. data/examples/temp_sensor/src/TimerModel.c +9 -9
  83. data/examples/temp_sensor/src/TimerModel.h +8 -8
  84. data/examples/temp_sensor/src/Types.h +90 -90
  85. data/examples/temp_sensor/src/UsartBaudRateRegisterCalculator.c +18 -18
  86. data/examples/temp_sensor/src/UsartBaudRateRegisterCalculator.h +8 -8
  87. data/examples/temp_sensor/src/UsartConductor.c +21 -21
  88. data/examples/temp_sensor/src/UsartConductor.h +7 -7
  89. data/examples/temp_sensor/src/UsartConfigurator.c +39 -39
  90. data/examples/temp_sensor/src/UsartConfigurator.h +13 -13
  91. data/examples/temp_sensor/src/UsartHardware.c +22 -22
  92. data/examples/temp_sensor/src/UsartHardware.h +9 -9
  93. data/examples/temp_sensor/src/UsartModel.c +34 -34
  94. data/examples/temp_sensor/src/UsartModel.h +10 -10
  95. data/examples/temp_sensor/src/UsartPutChar.c +16 -16
  96. data/examples/temp_sensor/src/UsartPutChar.h +8 -8
  97. data/examples/temp_sensor/src/UsartTransmitBufferStatus.c +7 -7
  98. data/examples/temp_sensor/src/UsartTransmitBufferStatus.h +8 -8
  99. data/examples/temp_sensor/test/TestAdcConductor.c +121 -121
  100. data/examples/temp_sensor/test/TestAdcHardware.c +44 -44
  101. data/examples/temp_sensor/test/TestAdcModel.c +33 -33
  102. data/examples/temp_sensor/test/TestExecutor.c +36 -36
  103. data/examples/temp_sensor/test/TestMain.c +24 -24
  104. data/examples/temp_sensor/test/TestModel.c +20 -20
  105. data/examples/temp_sensor/test/TestTaskScheduler.c +104 -104
  106. data/examples/temp_sensor/test/TestTemperatureCalculator.c +36 -36
  107. data/examples/temp_sensor/test/TestTemperatureFilter.c +79 -79
  108. data/examples/temp_sensor/test/TestTimerConductor.c +32 -32
  109. data/examples/temp_sensor/test/TestTimerHardware.c +26 -26
  110. data/examples/temp_sensor/test/TestTimerModel.c +18 -18
  111. data/examples/temp_sensor/test/TestUsartBaudRateRegisterCalculator.c +21 -21
  112. data/examples/temp_sensor/test/TestUsartConductor.c +40 -40
  113. data/examples/temp_sensor/test/TestUsartHardware.c +36 -36
  114. data/examples/temp_sensor/test/TestUsartModel.c +40 -40
  115. data/examples/temp_sensor/test/support/UnityHelper.c +12 -12
  116. data/examples/temp_sensor/test/support/UnityHelper.h +12 -12
  117. data/lib/ceedling.rb +99 -99
  118. data/lib/ceedling/build_invoker_utils.rb +39 -39
  119. data/lib/ceedling/cacheinator.rb +47 -47
  120. data/lib/ceedling/cacheinator_helper.rb +35 -31
  121. data/lib/ceedling/cmock_builder.rb +15 -15
  122. data/lib/ceedling/configurator.rb +372 -363
  123. data/lib/ceedling/configurator_builder.rb +463 -458
  124. data/lib/ceedling/configurator_plugins.rb +111 -111
  125. data/lib/ceedling/configurator_setup.rb +127 -127
  126. data/lib/ceedling/configurator_validator.rb +193 -193
  127. data/lib/ceedling/constants.rb +99 -97
  128. data/lib/ceedling/defaults.rb +447 -418
  129. data/lib/ceedling/dependinator.rb +97 -98
  130. data/lib/ceedling/erb_wrapper.rb +8 -8
  131. data/lib/ceedling/file_finder.rb +149 -149
  132. data/lib/ceedling/file_finder_helper.rb +56 -54
  133. data/lib/ceedling/file_path_utils.rb +202 -200
  134. data/lib/ceedling/file_system_utils.rb +69 -69
  135. data/lib/ceedling/file_system_wrapper.rb +9 -9
  136. data/lib/ceedling/file_wrapper.rb +83 -83
  137. data/lib/ceedling/flaginator.rb +74 -74
  138. data/lib/ceedling/generator.rb +186 -183
  139. data/lib/ceedling/generator_helper.rb +40 -40
  140. data/lib/ceedling/generator_test_results.rb +100 -100
  141. data/lib/ceedling/generator_test_results_sanity_checker.rb +65 -65
  142. data/lib/ceedling/generator_test_runner.rb +58 -56
  143. data/lib/ceedling/loginator.rb +31 -31
  144. data/lib/ceedling/makefile.rb +46 -46
  145. data/lib/ceedling/objects.yml +311 -310
  146. data/lib/ceedling/par_map.rb +19 -19
  147. data/lib/ceedling/plugin.rb +80 -80
  148. data/lib/ceedling/plugin_builder.rb +52 -52
  149. data/lib/ceedling/plugin_manager.rb +107 -107
  150. data/lib/ceedling/plugin_manager_helper.rb +19 -19
  151. data/lib/ceedling/plugin_reportinator.rb +76 -76
  152. data/lib/ceedling/plugin_reportinator_helper.rb +51 -51
  153. data/lib/ceedling/preprocessinator.rb +47 -42
  154. data/lib/ceedling/preprocessinator_extractor.rb +30 -30
  155. data/lib/ceedling/preprocessinator_file_handler.rb +21 -21
  156. data/lib/ceedling/preprocessinator_helper.rb +50 -46
  157. data/lib/ceedling/preprocessinator_includes_handler.rb +181 -181
  158. data/lib/ceedling/project_config_manager.rb +52 -46
  159. data/lib/ceedling/project_file_loader.rb +99 -99
  160. data/lib/ceedling/rake_utils.rb +17 -17
  161. data/lib/ceedling/rake_wrapper.rb +33 -33
  162. data/lib/ceedling/rakefile.rb +86 -86
  163. data/lib/ceedling/release_invoker.rb +98 -73
  164. data/lib/ceedling/release_invoker_helper.rb +19 -19
  165. data/lib/ceedling/reportinator.rb +26 -26
  166. data/lib/ceedling/rules_cmock.rake +9 -9
  167. data/lib/ceedling/rules_preprocess.rake +26 -26
  168. data/lib/ceedling/rules_release.rake +99 -86
  169. data/lib/ceedling/rules_release_deep_dependencies.rake +15 -15
  170. data/lib/ceedling/rules_tests.rake +73 -74
  171. data/lib/ceedling/rules_tests_deep_dependencies.rake +15 -15
  172. data/lib/ceedling/setupinator.rb +53 -53
  173. data/lib/ceedling/stream_wrapper.rb +28 -28
  174. data/lib/ceedling/streaminator.rb +40 -40
  175. data/lib/ceedling/streaminator_helper.rb +15 -15
  176. data/lib/ceedling/system_utils.rb +37 -37
  177. data/lib/ceedling/system_wrapper.rb +80 -80
  178. data/lib/ceedling/target_loader.rb +38 -38
  179. data/lib/ceedling/task_invoker.rb +122 -117
  180. data/lib/ceedling/tasks_base.rake +116 -105
  181. data/lib/ceedling/tasks_filesystem.rake +113 -112
  182. data/lib/ceedling/tasks_release.rake +30 -30
  183. data/lib/ceedling/tasks_release_deep_dependencies.rake +9 -9
  184. data/lib/ceedling/tasks_tests.rake +60 -60
  185. data/lib/ceedling/tasks_tests_deep_dependencies.rake +9 -9
  186. data/lib/ceedling/tasks_vendor.rake +35 -35
  187. data/lib/ceedling/test_includes_extractor.rb +111 -85
  188. data/lib/ceedling/test_invoker.rb +164 -188
  189. data/lib/ceedling/test_invoker_helper.rb +32 -32
  190. data/lib/ceedling/tool_executor.rb +229 -229
  191. data/lib/ceedling/tool_executor_helper.rb +164 -164
  192. data/lib/ceedling/verbosinator.rb +10 -10
  193. data/lib/ceedling/version.rb +50 -50
  194. data/lib/ceedling/yaml_wrapper.rb +17 -17
  195. data/license.txt +31 -31
  196. data/plugins/beep/README.md +22 -22
  197. data/plugins/beep/lib/beep.rb +40 -40
  198. data/plugins/bullseye/README.md +76 -0
  199. data/plugins/bullseye/assets/template.erb +15 -15
  200. data/plugins/bullseye/bullseye.rake +173 -169
  201. data/plugins/bullseye/config/defaults.yml +57 -57
  202. data/plugins/bullseye/lib/bullseye.rb +194 -194
  203. data/plugins/colour_report/README.md +20 -0
  204. data/plugins/colour_report/lib/colour_report.rb +16 -16
  205. data/plugins/command_hooks/README.md +53 -53
  206. data/plugins/command_hooks/lib/command_hooks.rb +92 -92
  207. data/plugins/compile_commands_json/README.md +29 -0
  208. data/plugins/compile_commands_json/lib/compile_commands_json.rb +35 -0
  209. data/plugins/dependencies/README.md +254 -0
  210. data/plugins/dependencies/config/defaults.yml +5 -0
  211. data/plugins/dependencies/dependencies.rake +144 -0
  212. data/plugins/dependencies/lib/dependencies.rb +231 -0
  213. data/plugins/fake_function_framework/README.md +250 -250
  214. data/plugins/fake_function_framework/Rakefile +18 -18
  215. data/plugins/fake_function_framework/examples/fff_example/project.yml +71 -71
  216. data/plugins/fake_function_framework/examples/fff_example/rakefile.rb +7 -7
  217. data/plugins/fake_function_framework/examples/fff_example/src/bar.c +1 -1
  218. data/plugins/fake_function_framework/examples/fff_example/src/bar.h +14 -14
  219. data/plugins/fake_function_framework/examples/fff_example/src/custom_types.h +6 -6
  220. data/plugins/fake_function_framework/examples/fff_example/src/display.c +6 -6
  221. data/plugins/fake_function_framework/examples/fff_example/src/display.h +16 -16
  222. data/plugins/fake_function_framework/examples/fff_example/src/event_processor.c +93 -93
  223. data/plugins/fake_function_framework/examples/fff_example/src/event_processor.h +11 -11
  224. data/plugins/fake_function_framework/examples/fff_example/src/foo.c +16 -16
  225. data/plugins/fake_function_framework/examples/fff_example/src/foo.h +8 -8
  226. data/plugins/fake_function_framework/examples/fff_example/src/subfolder/zzz.c +1 -1
  227. data/plugins/fake_function_framework/examples/fff_example/src/subfolder/zzz.h +6 -6
  228. data/plugins/fake_function_framework/examples/fff_example/test/test_event_processor.c +155 -155
  229. data/plugins/fake_function_framework/examples/fff_example/test/test_foo.c +47 -47
  230. data/plugins/fake_function_framework/lib/fake_function_framework.rb +87 -87
  231. data/plugins/fake_function_framework/lib/fff_mock_generator.rb +163 -163
  232. data/plugins/fake_function_framework/spec/fff_mock_header_generator_spec.rb +304 -304
  233. data/plugins/fake_function_framework/spec/fff_mock_source_generator_spec.rb +148 -148
  234. data/plugins/fake_function_framework/spec/header_generator.rb +50 -50
  235. data/plugins/fake_function_framework/spec/spec_helper.rb +96 -96
  236. data/plugins/fake_function_framework/src/fff_unity_helper.h +32 -32
  237. data/plugins/gcov/README.md +412 -101
  238. data/plugins/gcov/assets/template.erb +15 -15
  239. data/plugins/gcov/config/defaults.yml +51 -73
  240. data/plugins/gcov/gcov.rake +209 -220
  241. data/plugins/gcov/lib/gcov.rb +133 -113
  242. data/plugins/gcov/lib/gcov_constants.rb +48 -19
  243. data/plugins/gcov/lib/gcovr_reportinator.rb +331 -0
  244. data/plugins/gcov/lib/reportgenerator_reportinator.rb +153 -0
  245. data/plugins/gcov/lib/reportinator_helper.rb +15 -0
  246. data/plugins/json_tests_report/README.md +36 -0
  247. data/plugins/json_tests_report/lib/json_tests_report.rb +83 -0
  248. data/plugins/junit_tests_report/README.md +36 -36
  249. data/plugins/junit_tests_report/lib/junit_tests_report.rb +134 -130
  250. data/plugins/module_generator/README.md +105 -0
  251. data/plugins/module_generator/config/module_generator.yml +3 -3
  252. data/plugins/module_generator/lib/module_generator.rb +79 -70
  253. data/plugins/module_generator/module_generator.rake +62 -47
  254. data/plugins/raw_output_report/README.md +19 -0
  255. data/plugins/raw_output_report/lib/raw_output_report.rb +41 -41
  256. data/plugins/stdout_gtestlike_tests_report/README.md +19 -0
  257. data/plugins/stdout_gtestlike_tests_report/assets/template.erb +84 -84
  258. data/plugins/stdout_gtestlike_tests_report/assets/template.erb copy +59 -59
  259. data/plugins/stdout_gtestlike_tests_report/config/stdout_gtestlike_tests_report.yml +4 -4
  260. data/plugins/stdout_gtestlike_tests_report/lib/stdout_gtestlike_tests_report.rb +43 -43
  261. data/plugins/stdout_ide_tests_report/README.md +18 -0
  262. data/plugins/stdout_ide_tests_report/config/stdout_ide_tests_report.yml +4 -4
  263. data/plugins/stdout_ide_tests_report/lib/stdout_ide_tests_report.rb +44 -44
  264. data/plugins/stdout_pretty_tests_report/README.md +20 -0
  265. data/plugins/stdout_pretty_tests_report/assets/template.erb +59 -59
  266. data/plugins/stdout_pretty_tests_report/config/stdout_pretty_tests_report.yml +4 -4
  267. data/plugins/stdout_pretty_tests_report/lib/stdout_pretty_tests_report.rb +47 -47
  268. data/plugins/subprojects/README.md +63 -63
  269. data/plugins/subprojects/config/defaults.yml +33 -33
  270. data/plugins/subprojects/lib/subprojects.rb +92 -92
  271. data/plugins/subprojects/subprojects.rake +78 -78
  272. data/plugins/teamcity_tests_report/README.md +18 -0
  273. data/plugins/teamcity_tests_report/config/teamcity_tests_report.yml +4 -4
  274. data/plugins/teamcity_tests_report/lib/teamcity_tests_report.rb +57 -57
  275. data/plugins/warnings_report/README.md +19 -0
  276. data/plugins/warnings_report/lib/warnings_report.rb +69 -69
  277. data/plugins/xml_tests_report/README.md +36 -36
  278. data/plugins/xml_tests_report/lib/xml_tests_report.rb +110 -110
  279. data/spec/build_invoker_utils_spec.rb +54 -54
  280. data/spec/ceedling_spec.rb +154 -154
  281. data/spec/configurator_builder_spec.rb +6 -6
  282. data/spec/configurator_helper_spec.rb +4 -4
  283. data/spec/configurator_spec.rb +9 -9
  284. data/spec/file_finder_helper_spec.rb +53 -53
  285. data/spec/gcov/gcov_deployment_spec.rb +72 -70
  286. data/spec/gcov/gcov_test_cases_spec.rb +128 -91
  287. data/spec/generator_test_results_sanity_checker_spec.rb +88 -88
  288. data/spec/generator_test_results_spec.rb +107 -107
  289. data/spec/par_map_spec.rb +57 -57
  290. data/spec/preprocessinator_extractor_spec.rb +45 -45
  291. data/spec/preprocessinator_includes_handler_spec.rb +202 -202
  292. data/spec/reportinator_spec.rb +19 -19
  293. data/spec/spec_helper.rb +27 -27
  294. data/spec/spec_system_helper.rb +616 -615
  295. data/spec/support/test_example.fail +24 -24
  296. data/spec/support/test_example.pass +24 -24
  297. data/spec/support/test_example_empty.pass +14 -14
  298. data/spec/support/test_example_ignore.pass +24 -24
  299. data/spec/support/test_example_mangled.pass +21 -21
  300. data/spec/support/test_example_with_time.pass +24 -24
  301. data/spec/system/deployment_spec.rb +225 -225
  302. data/spec/system_utils_spec.rb +56 -56
  303. data/spec/target_loader_spec.rb +30 -30
  304. data/spec/tool_executor_helper_spec.rb +310 -310
  305. data/spec/uncatagorized_specs_spec.rb +8 -8
  306. data/vendor/behaviors/Manifest.txt +9 -9
  307. data/vendor/behaviors/Rakefile +19 -19
  308. data/vendor/behaviors/lib/behaviors.rb +76 -76
  309. data/vendor/behaviors/lib/behaviors/reporttask.rb +158 -158
  310. data/vendor/behaviors/test/behaviors_tasks_test.rb +73 -73
  311. data/vendor/behaviors/test/behaviors_test.rb +50 -50
  312. data/vendor/behaviors/test/tasks_test/Rakefile +19 -19
  313. data/vendor/behaviors/test/tasks_test/lib/user.rb +2 -2
  314. data/vendor/behaviors/test/tasks_test/test/user_test.rb +17 -17
  315. data/vendor/c_exception/Gemfile +4 -4
  316. data/vendor/c_exception/Gemfile.lock +12 -12
  317. data/vendor/c_exception/README.md +249 -162
  318. data/vendor/c_exception/docs/CException.md +332 -292
  319. data/vendor/c_exception/docs/ThrowTheSwitchCodingStandard.md +207 -207
  320. data/vendor/c_exception/lib/CException.c +46 -46
  321. data/vendor/c_exception/lib/CException.h +115 -115
  322. data/vendor/c_exception/lib/meson.build +11 -0
  323. data/vendor/c_exception/meson.build +48 -0
  324. data/vendor/c_exception/project.yml +37 -0
  325. data/vendor/c_exception/test/TestException.c +391 -391
  326. data/vendor/{cmock/vendor/c_exception/test → c_exception/test/support}/CExceptionConfig.h +46 -46
  327. data/vendor/c_exception/vendor/unity/README.md +220 -220
  328. data/vendor/c_exception/vendor/unity/auto/colour_prompt.rb +118 -118
  329. data/vendor/c_exception/vendor/unity/auto/colour_reporter.rb +39 -39
  330. data/vendor/c_exception/vendor/unity/auto/generate_config.yml +36 -36
  331. data/vendor/c_exception/vendor/unity/auto/generate_module.rb +308 -308
  332. data/vendor/c_exception/vendor/unity/auto/generate_test_runner.rb +437 -437
  333. data/vendor/c_exception/vendor/unity/auto/parse_output.rb +220 -220
  334. data/vendor/c_exception/vendor/unity/auto/stylize_as_junit.rb +252 -252
  335. data/vendor/c_exception/vendor/unity/auto/test_file_filter.rb +25 -25
  336. data/vendor/c_exception/vendor/unity/auto/type_sanitizer.rb +6 -6
  337. data/vendor/c_exception/vendor/unity/auto/unity_test_summary.py +139 -139
  338. data/vendor/c_exception/vendor/unity/auto/unity_test_summary.rb +136 -136
  339. data/vendor/c_exception/vendor/unity/auto/unity_to_junit.py +146 -146
  340. data/vendor/c_exception/vendor/unity/docs/ThrowTheSwitchCodingStandard.md +207 -207
  341. data/vendor/c_exception/vendor/unity/docs/UnityAssertionsReference.md +716 -716
  342. data/vendor/c_exception/vendor/unity/docs/UnityConfigurationGuide.md +398 -398
  343. data/vendor/c_exception/vendor/unity/docs/UnityGettingStartedGuide.md +191 -191
  344. data/vendor/c_exception/vendor/unity/docs/UnityHelperScriptsGuide.md +242 -242
  345. data/vendor/c_exception/vendor/unity/docs/license.txt +21 -21
  346. data/vendor/c_exception/vendor/unity/examples/example_1/makefile +71 -71
  347. data/vendor/c_exception/vendor/unity/examples/example_1/readme.txt +4 -4
  348. data/vendor/c_exception/vendor/unity/examples/example_1/src/ProductionCode.c +24 -24
  349. data/vendor/c_exception/vendor/unity/examples/example_1/src/ProductionCode.h +3 -3
  350. data/vendor/c_exception/vendor/unity/examples/example_1/src/ProductionCode2.c +11 -11
  351. data/vendor/c_exception/vendor/unity/examples/example_1/src/ProductionCode2.h +2 -2
  352. data/vendor/c_exception/vendor/unity/examples/example_1/test/TestProductionCode.c +62 -62
  353. data/vendor/c_exception/vendor/unity/examples/example_1/test/TestProductionCode2.c +31 -31
  354. data/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +53 -53
  355. data/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +57 -57
  356. data/vendor/c_exception/vendor/unity/examples/example_2/makefile +70 -70
  357. data/vendor/c_exception/vendor/unity/examples/example_2/readme.txt +4 -4
  358. data/vendor/c_exception/vendor/unity/examples/example_2/src/ProductionCode.c +24 -24
  359. data/vendor/c_exception/vendor/unity/examples/example_2/src/ProductionCode.h +3 -3
  360. data/vendor/c_exception/vendor/unity/examples/example_2/src/ProductionCode2.c +11 -11
  361. data/vendor/c_exception/vendor/unity/examples/example_2/src/ProductionCode2.h +2 -2
  362. data/vendor/c_exception/vendor/unity/examples/example_2/test/TestProductionCode.c +64 -64
  363. data/vendor/c_exception/vendor/unity/examples/example_2/test/TestProductionCode2.c +33 -33
  364. data/vendor/c_exception/vendor/unity/examples/example_2/test/test_runners/TestProductionCode2_Runner.c +8 -8
  365. data/vendor/c_exception/vendor/unity/examples/example_2/test/test_runners/TestProductionCode_Runner.c +10 -10
  366. data/vendor/c_exception/vendor/unity/examples/example_2/test/test_runners/all_tests.c +12 -12
  367. data/vendor/c_exception/vendor/unity/examples/example_3/helper/UnityHelper.c +10 -10
  368. data/vendor/c_exception/vendor/unity/examples/example_3/helper/UnityHelper.h +12 -12
  369. data/vendor/c_exception/vendor/unity/examples/example_3/rakefile.rb +43 -43
  370. data/vendor/c_exception/vendor/unity/examples/example_3/rakefile_helper.rb +249 -249
  371. data/vendor/c_exception/vendor/unity/examples/example_3/readme.txt +13 -13
  372. data/vendor/c_exception/vendor/unity/examples/example_3/src/ProductionCode.c +24 -24
  373. data/vendor/c_exception/vendor/unity/examples/example_3/src/ProductionCode.h +3 -3
  374. data/vendor/c_exception/vendor/unity/examples/example_3/src/ProductionCode2.c +11 -11
  375. data/vendor/c_exception/vendor/unity/examples/example_3/src/ProductionCode2.h +2 -2
  376. data/vendor/c_exception/vendor/unity/examples/example_3/target_gcc_32.yml +46 -46
  377. data/vendor/c_exception/vendor/unity/examples/example_3/test/TestProductionCode.c +62 -62
  378. data/vendor/c_exception/vendor/unity/examples/example_3/test/TestProductionCode2.c +31 -31
  379. data/vendor/c_exception/vendor/unity/examples/unity_config.h +237 -237
  380. data/vendor/c_exception/vendor/unity/extras/eclipse/error_parsers.txt +26 -26
  381. data/vendor/c_exception/vendor/unity/extras/fixture/rakefile.rb +48 -48
  382. data/vendor/c_exception/vendor/unity/extras/fixture/rakefile_helper.rb +178 -178
  383. data/vendor/c_exception/vendor/unity/extras/fixture/readme.txt +8 -8
  384. data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.c +432 -432
  385. data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.h +83 -83
  386. data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_internals.h +51 -51
  387. data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_malloc_overrides.h +47 -47
  388. data/vendor/c_exception/vendor/unity/extras/fixture/test/Makefile +74 -74
  389. data/vendor/c_exception/vendor/unity/extras/fixture/test/main/AllTests.c +22 -22
  390. data/vendor/c_exception/vendor/unity/extras/fixture/test/template_fixture_tests.c +39 -39
  391. data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_Test.c +543 -543
  392. data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_TestRunner.c +57 -57
  393. data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_output_Spy.c +57 -57
  394. data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_output_Spy.h +17 -17
  395. data/vendor/c_exception/vendor/unity/release/build.info +2 -2
  396. data/vendor/c_exception/vendor/unity/release/version.info +2 -2
  397. data/vendor/c_exception/vendor/unity/src/unity.c +1517 -1517
  398. data/vendor/c_exception/vendor/unity/src/unity.h +339 -339
  399. data/vendor/c_exception/vendor/unity/src/unity_internals.h +784 -784
  400. data/vendor/c_exception/vendor/unity/test/Makefile +63 -63
  401. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_cmd.c +61 -61
  402. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_def.c +57 -57
  403. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_head1.c +55 -55
  404. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_head1.h +15 -15
  405. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_cmd.c +80 -80
  406. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_def.c +76 -76
  407. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_head1.c +75 -75
  408. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_head1.h +13 -13
  409. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_new1.c +89 -89
  410. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_new2.c +89 -89
  411. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_param.c +77 -77
  412. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_run1.c +89 -89
  413. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_run2.c +89 -89
  414. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_yaml.c +90 -90
  415. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_new1.c +67 -67
  416. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_new2.c +70 -70
  417. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_param.c +58 -58
  418. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_run1.c +67 -67
  419. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_run2.c +70 -70
  420. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_yaml.c +71 -71
  421. data/vendor/c_exception/vendor/unity/test/rakefile +125 -125
  422. data/vendor/c_exception/vendor/unity/test/rakefile_helper.rb +260 -260
  423. data/vendor/c_exception/vendor/unity/test/spec/generate_module_existing_file_spec.rb +158 -158
  424. data/vendor/c_exception/vendor/unity/test/targets/clang_file.yml +78 -78
  425. data/vendor/c_exception/vendor/unity/test/targets/clang_strict.yml +78 -78
  426. data/vendor/c_exception/vendor/unity/test/targets/gcc_32.yml +49 -49
  427. data/vendor/c_exception/vendor/unity/test/targets/gcc_64.yml +50 -50
  428. data/vendor/c_exception/vendor/unity/test/targets/gcc_auto_limits.yml +47 -47
  429. data/vendor/c_exception/vendor/unity/test/targets/gcc_auto_stdint.yml +59 -59
  430. data/vendor/c_exception/vendor/unity/test/targets/gcc_manual_math.yml +47 -47
  431. data/vendor/c_exception/vendor/unity/test/targets/hitech_picc18.yml +101 -101
  432. data/vendor/c_exception/vendor/unity/test/targets/iar_arm_v4.yml +90 -90
  433. data/vendor/c_exception/vendor/unity/test/targets/iar_arm_v5.yml +80 -80
  434. data/vendor/c_exception/vendor/unity/test/targets/iar_arm_v5_3.yml +80 -80
  435. data/vendor/c_exception/vendor/unity/test/targets/iar_armcortex_LM3S9B92_v5_4.yml +94 -94
  436. data/vendor/c_exception/vendor/unity/test/targets/iar_cortexm3_v5.yml +84 -84
  437. data/vendor/c_exception/vendor/unity/test/targets/iar_msp430.yml +95 -95
  438. data/vendor/c_exception/vendor/unity/test/targets/iar_sh2a_v6.yml +86 -86
  439. data/vendor/c_exception/vendor/unity/test/testdata/CException.h +11 -11
  440. data/vendor/c_exception/vendor/unity/test/testdata/Defs.h +8 -8
  441. data/vendor/c_exception/vendor/unity/test/testdata/cmock.h +14 -14
  442. data/vendor/c_exception/vendor/unity/test/testdata/mockMock.h +13 -13
  443. data/vendor/c_exception/vendor/unity/test/testdata/testRunnerGenerator.c +183 -183
  444. data/vendor/c_exception/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +67 -67
  445. data/vendor/c_exception/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +192 -192
  446. data/vendor/c_exception/vendor/unity/test/tests/test_generate_test_runner.rb +1252 -1252
  447. data/vendor/c_exception/vendor/unity/test/tests/testparameterized.c +110 -110
  448. data/vendor/c_exception/vendor/unity/test/tests/testunity.c +4993 -4993
  449. data/vendor/cmock/Gemfile +8 -9
  450. data/vendor/cmock/LICENSE.txt +18 -18
  451. data/vendor/cmock/README.md +34 -34
  452. data/vendor/cmock/config/production_environment.rb +12 -14
  453. data/vendor/cmock/config/test_environment.rb +16 -16
  454. data/vendor/cmock/docs/CMock_Summary.md +806 -696
  455. data/vendor/cmock/docs/ThrowTheSwitchCodingStandard.md +207 -207
  456. data/vendor/cmock/examples/make_example/Makefile +30 -30
  457. data/vendor/cmock/examples/make_example/src/foo.c +5 -5
  458. data/vendor/cmock/examples/make_example/src/foo.h +5 -5
  459. data/vendor/cmock/examples/make_example/src/main.c +15 -15
  460. data/vendor/cmock/examples/make_example/test/test_foo.c +17 -17
  461. data/vendor/cmock/examples/make_example/test/test_main.c +15 -15
  462. data/vendor/cmock/examples/temp_sensor/gcc.yml +44 -44
  463. data/vendor/cmock/examples/temp_sensor/iar_v4.yml +92 -92
  464. data/vendor/cmock/examples/temp_sensor/iar_v5.yml +81 -81
  465. data/vendor/cmock/examples/temp_sensor/rakefile.rb +42 -42
  466. data/vendor/cmock/examples/temp_sensor/rakefile_helper.rb +268 -272
  467. data/vendor/cmock/examples/temp_sensor/src/AT91SAM7X256.h +2556 -2556
  468. data/vendor/cmock/examples/temp_sensor/src/AdcConductor.c +42 -42
  469. data/vendor/cmock/examples/temp_sensor/src/AdcConductor.h +11 -11
  470. data/vendor/cmock/examples/temp_sensor/src/AdcHardware.c +27 -27
  471. data/vendor/cmock/examples/temp_sensor/src/AdcHardware.h +9 -9
  472. data/vendor/cmock/examples/temp_sensor/src/AdcHardwareConfigurator.c +18 -18
  473. data/vendor/cmock/examples/temp_sensor/src/AdcHardwareConfigurator.h +10 -10
  474. data/vendor/cmock/examples/temp_sensor/src/AdcModel.c +33 -33
  475. data/vendor/cmock/examples/temp_sensor/src/AdcModel.h +13 -13
  476. data/vendor/cmock/examples/temp_sensor/src/AdcTemperatureSensor.c +51 -51
  477. data/vendor/cmock/examples/temp_sensor/src/AdcTemperatureSensor.h +10 -10
  478. data/vendor/cmock/examples/temp_sensor/src/Executor.c +25 -25
  479. data/vendor/cmock/examples/temp_sensor/src/Executor.h +9 -9
  480. data/vendor/cmock/examples/temp_sensor/src/IntrinsicsWrapper.c +18 -18
  481. data/vendor/cmock/examples/temp_sensor/src/IntrinsicsWrapper.h +7 -7
  482. data/vendor/cmock/examples/temp_sensor/src/Main.c +46 -46
  483. data/vendor/cmock/examples/temp_sensor/src/Main.h +7 -7
  484. data/vendor/cmock/examples/temp_sensor/src/Model.c +10 -10
  485. data/vendor/cmock/examples/temp_sensor/src/Model.h +8 -8
  486. data/vendor/cmock/examples/temp_sensor/src/ModelConfig.h +7 -7
  487. data/vendor/cmock/examples/temp_sensor/src/TaskScheduler.c +72 -72
  488. data/vendor/cmock/examples/temp_sensor/src/TaskScheduler.h +11 -11
  489. data/vendor/cmock/examples/temp_sensor/src/TemperatureCalculator.c +27 -27
  490. data/vendor/cmock/examples/temp_sensor/src/TemperatureCalculator.h +6 -6
  491. data/vendor/cmock/examples/temp_sensor/src/TemperatureFilter.c +39 -39
  492. data/vendor/cmock/examples/temp_sensor/src/TemperatureFilter.h +10 -10
  493. data/vendor/cmock/examples/temp_sensor/src/TimerConductor.c +15 -15
  494. data/vendor/cmock/examples/temp_sensor/src/TimerConductor.h +9 -9
  495. data/vendor/cmock/examples/temp_sensor/src/TimerConfigurator.c +51 -51
  496. data/vendor/cmock/examples/temp_sensor/src/TimerConfigurator.h +15 -15
  497. data/vendor/cmock/examples/temp_sensor/src/TimerHardware.c +15 -15
  498. data/vendor/cmock/examples/temp_sensor/src/TimerHardware.h +8 -8
  499. data/vendor/cmock/examples/temp_sensor/src/TimerInterruptConfigurator.c +55 -55
  500. data/vendor/cmock/examples/temp_sensor/src/TimerInterruptConfigurator.h +13 -13
  501. data/vendor/cmock/examples/temp_sensor/src/TimerInterruptHandler.c +25 -25
  502. data/vendor/cmock/examples/temp_sensor/src/TimerInterruptHandler.h +10 -10
  503. data/vendor/cmock/examples/temp_sensor/src/TimerModel.c +9 -9
  504. data/vendor/cmock/examples/temp_sensor/src/TimerModel.h +8 -8
  505. data/vendor/cmock/examples/temp_sensor/src/Types.h +103 -103
  506. data/vendor/cmock/examples/temp_sensor/src/UsartBaudRateRegisterCalculator.c +18 -18
  507. data/vendor/cmock/examples/temp_sensor/src/UsartBaudRateRegisterCalculator.h +6 -6
  508. data/vendor/cmock/examples/temp_sensor/src/UsartConductor.c +21 -21
  509. data/vendor/cmock/examples/temp_sensor/src/UsartConductor.h +7 -7
  510. data/vendor/cmock/examples/temp_sensor/src/UsartConfigurator.c +39 -39
  511. data/vendor/cmock/examples/temp_sensor/src/UsartConfigurator.h +13 -13
  512. data/vendor/cmock/examples/temp_sensor/src/UsartHardware.c +22 -22
  513. data/vendor/cmock/examples/temp_sensor/src/UsartHardware.h +9 -9
  514. data/vendor/cmock/examples/temp_sensor/src/UsartModel.c +34 -34
  515. data/vendor/cmock/examples/temp_sensor/src/UsartModel.h +10 -10
  516. data/vendor/cmock/examples/temp_sensor/src/UsartPutChar.c +16 -16
  517. data/vendor/cmock/examples/temp_sensor/src/UsartPutChar.h +8 -8
  518. data/vendor/cmock/examples/temp_sensor/src/UsartTransmitBufferStatus.c +7 -7
  519. data/vendor/cmock/examples/temp_sensor/src/UsartTransmitBufferStatus.h +8 -8
  520. data/vendor/cmock/examples/temp_sensor/test/TestAdcConductor.c +121 -121
  521. data/vendor/cmock/examples/temp_sensor/test/TestAdcHardware.c +44 -44
  522. data/vendor/cmock/examples/temp_sensor/test/TestAdcHardwareConfigurator.c +43 -43
  523. data/vendor/cmock/examples/temp_sensor/test/TestAdcModel.c +33 -33
  524. data/vendor/cmock/examples/temp_sensor/test/TestAdcTemperatureSensor.c +47 -47
  525. data/vendor/cmock/examples/temp_sensor/test/TestExecutor.c +36 -36
  526. data/vendor/cmock/examples/temp_sensor/test/TestMain.c +24 -24
  527. data/vendor/cmock/examples/temp_sensor/test/TestModel.c +20 -20
  528. data/vendor/cmock/examples/temp_sensor/test/TestTaskScheduler.c +104 -104
  529. data/vendor/cmock/examples/temp_sensor/test/TestTemperatureCalculator.c +33 -33
  530. data/vendor/cmock/examples/temp_sensor/test/TestTemperatureFilter.c +69 -69
  531. data/vendor/cmock/examples/temp_sensor/test/TestTimerConductor.c +32 -32
  532. data/vendor/cmock/examples/temp_sensor/test/TestTimerConfigurator.c +112 -112
  533. data/vendor/cmock/examples/temp_sensor/test/TestTimerHardware.c +26 -26
  534. data/vendor/cmock/examples/temp_sensor/test/TestTimerInterruptConfigurator.c +78 -78
  535. data/vendor/cmock/examples/temp_sensor/test/TestTimerInterruptHandler.c +66 -66
  536. data/vendor/cmock/examples/temp_sensor/test/TestTimerModel.c +18 -18
  537. data/vendor/cmock/examples/temp_sensor/test/TestUsartBaudRateRegisterCalculator.c +21 -21
  538. data/vendor/cmock/examples/temp_sensor/test/TestUsartConductor.c +40 -40
  539. data/vendor/cmock/examples/temp_sensor/test/TestUsartConfigurator.c +77 -77
  540. data/vendor/cmock/examples/temp_sensor/test/TestUsartHardware.c +37 -37
  541. data/vendor/cmock/examples/temp_sensor/test/TestUsartModel.c +40 -40
  542. data/vendor/cmock/examples/temp_sensor/test/TestUsartPutChar.c +43 -43
  543. data/vendor/cmock/examples/temp_sensor/test/TestUsartTransmitBufferStatus.c +22 -22
  544. data/vendor/cmock/lib/cmock.rb +104 -86
  545. data/vendor/cmock/lib/cmock_config.rb +173 -163
  546. data/vendor/cmock/lib/cmock_file_writer.rb +48 -44
  547. data/vendor/cmock/lib/cmock_generator.rb +333 -275
  548. data/vendor/cmock/lib/cmock_generator_plugin_array.rb +63 -63
  549. data/vendor/cmock/lib/cmock_generator_plugin_callback.rb +88 -88
  550. data/vendor/cmock/lib/cmock_generator_plugin_cexception.rb +49 -51
  551. data/vendor/cmock/lib/cmock_generator_plugin_expect.rb +100 -103
  552. data/vendor/cmock/lib/cmock_generator_plugin_expect_any_args.rb +50 -53
  553. data/vendor/cmock/lib/cmock_generator_plugin_ignore.rb +88 -75
  554. data/vendor/cmock/lib/cmock_generator_plugin_ignore_arg.rb +42 -42
  555. data/vendor/cmock/lib/cmock_generator_plugin_return_thru_ptr.rb +79 -79
  556. data/vendor/cmock/lib/cmock_generator_utils.rb +247 -253
  557. data/vendor/cmock/lib/cmock_header_parser.rb +595 -474
  558. data/vendor/cmock/lib/cmock_plugin_manager.rb +50 -55
  559. data/vendor/cmock/lib/cmock_unityhelper_parser.rb +77 -75
  560. data/vendor/cmock/meson.build +53 -72
  561. data/vendor/cmock/scripts/create_makefile.rb +203 -202
  562. data/vendor/cmock/scripts/create_mock.rb +8 -8
  563. data/vendor/cmock/scripts/create_runner.rb +18 -20
  564. data/vendor/cmock/scripts/test_summary.rb +18 -19
  565. data/vendor/cmock/src/cmock.c +216 -216
  566. data/vendor/cmock/src/cmock.h +41 -40
  567. data/vendor/cmock/src/cmock_internals.h +91 -91
  568. data/vendor/cmock/src/meson.build +12 -17
  569. data/vendor/cmock/test/c/TestCMockC.c +333 -333
  570. data/vendor/cmock/test/c/TestCMockC.yml +14 -14
  571. data/vendor/cmock/test/c/TestCMockCDynamic.c +186 -186
  572. data/vendor/cmock/test/c/TestCMockCDynamic.yml +12 -12
  573. data/vendor/cmock/test/c/TestCMockCDynamic_Runner.c +36 -36
  574. data/vendor/cmock/test/c/TestCMockC_Runner.c +41 -41
  575. data/vendor/cmock/test/iar/iar_v4/Resource/at91SAM7X256_FLASH.xcl +185 -185
  576. data/vendor/cmock/test/iar/iar_v4/Resource/at91SAM7X256_RAM.xcl +185 -185
  577. data/vendor/cmock/test/iar/iar_v4/Resource/ioat91sam7x256.ddf +2259 -2259
  578. data/vendor/cmock/test/iar/iar_v4/cmock_demo.dep +3691 -3691
  579. data/vendor/cmock/test/iar/iar_v4/cmock_demo.ewp +2581 -2581
  580. data/vendor/cmock/test/iar/iar_v4/incIAR/AT91SAM7X-EK.h +61 -61
  581. data/vendor/cmock/test/iar/iar_v4/incIAR/AT91SAM7X256.inc +2314 -2314
  582. data/vendor/cmock/test/iar/iar_v4/incIAR/AT91SAM7X256.rdf +4704 -4704
  583. data/vendor/cmock/test/iar/iar_v4/incIAR/AT91SAM7X256.tcl +3407 -3407
  584. data/vendor/cmock/test/iar/iar_v4/incIAR/AT91SAM7X256_inc.h +2268 -2268
  585. data/vendor/cmock/test/iar/iar_v4/incIAR/ioat91sam7x256.h +4380 -4380
  586. data/vendor/cmock/test/iar/iar_v4/incIAR/lib_AT91SAM7X256.h +4211 -4211
  587. data/vendor/cmock/test/iar/iar_v4/settings/cmock_demo.cspy.bat +32 -32
  588. data/vendor/cmock/test/iar/iar_v4/srcIAR/Cstartup.s79 +265 -265
  589. data/vendor/cmock/test/iar/iar_v4/srcIAR/Cstartup_SAM7.c +98 -98
  590. data/vendor/cmock/test/iar/iar_v5/Resource/at91SAM7X256_FLASH.icf +43 -43
  591. data/vendor/cmock/test/iar/iar_v5/Resource/at91SAM7X256_RAM.icf +42 -42
  592. data/vendor/cmock/test/iar/iar_v5/cmock_demo.dep +4204 -4204
  593. data/vendor/cmock/test/iar/iar_v5/cmock_demo.ewp +2426 -2426
  594. data/vendor/cmock/test/iar/iar_v5/incIAR/AT91SAM7X-EK.h +61 -61
  595. data/vendor/cmock/test/iar/iar_v5/incIAR/AT91SAM7X256_inc.h +2268 -2268
  596. data/vendor/cmock/test/iar/iar_v5/incIAR/lib_AT91SAM7X256.h +4211 -4211
  597. data/vendor/cmock/test/iar/iar_v5/incIAR/project.h +30 -30
  598. data/vendor/cmock/test/iar/iar_v5/settings/BasicInterrupt_SAM7X.cspy.bat +33 -33
  599. data/vendor/cmock/test/iar/iar_v5/settings/BasicInterrupt_SAM7X_FLASH_Debug.jlink +12 -12
  600. data/vendor/cmock/test/iar/iar_v5/settings/cmock_demo.cspy.bat +33 -33
  601. data/vendor/cmock/test/iar/iar_v5/settings/cmock_demo_Binary.jlink +12 -12
  602. data/vendor/cmock/test/iar/iar_v5/settings/cmock_demo_FLASH_Debug.jlink +12 -12
  603. data/vendor/cmock/test/iar/iar_v5/settings/cmock_demo_RAM_Debug.jlink +12 -12
  604. data/vendor/cmock/test/iar/iar_v5/srcIAR/Cstartup.s +299 -299
  605. data/vendor/cmock/test/iar/iar_v5/srcIAR/Cstartup_SAM7.c +98 -98
  606. data/vendor/cmock/test/rakefile +147 -106
  607. data/vendor/cmock/test/rakefile_helper.rb +403 -382
  608. data/vendor/cmock/test/system/systest_generator.rb +205 -193
  609. data/vendor/cmock/test/system/test_compilation/callingconv.h +11 -11
  610. data/vendor/cmock/test/system/test_compilation/config.yml +10 -10
  611. data/vendor/cmock/test/system/test_compilation/const.h +37 -37
  612. data/vendor/cmock/test/system/test_compilation/inline.h +23 -23
  613. data/vendor/cmock/test/system/test_compilation/osek.h +275 -275
  614. data/vendor/cmock/test/system/test_compilation/parsing.h +89 -89
  615. data/vendor/cmock/test/system/test_interactions/all_plugins_but_other_limits.yml +375 -375
  616. data/vendor/cmock/test/system/test_interactions/all_plugins_coexist.yml +460 -460
  617. data/vendor/cmock/test/system/test_interactions/array_and_pointer_handling.yml +446 -446
  618. data/vendor/cmock/test/system/test_interactions/basic_expect_and_return.yml +124 -124
  619. data/vendor/cmock/test/system/test_interactions/const_primitives_handling.yml +87 -87
  620. data/vendor/cmock/test/system/test_interactions/doesnt_leave_details_behind.yml +308 -308
  621. data/vendor/cmock/test/system/test_interactions/enforce_strict_ordering.yml +247 -247
  622. data/vendor/cmock/test/system/test_interactions/expect_and_return_custom_types.yml +108 -108
  623. data/vendor/cmock/test/system/test_interactions/expect_and_return_treat_as.yml +173 -173
  624. data/vendor/cmock/test/system/test_interactions/expect_and_throw.yml +170 -170
  625. data/vendor/cmock/test/system/test_interactions/expect_any_args.yml +238 -238
  626. data/vendor/cmock/test/system/test_interactions/fancy_pointer_handling.yml +210 -210
  627. data/vendor/cmock/test/system/test_interactions/function_pointer_handling.yml +83 -82
  628. data/vendor/cmock/test/system/test_interactions/ignore_and_return.yml +329 -329
  629. data/vendor/cmock/test/system/test_interactions/ignore_strict_mock_calling.yml +37 -37
  630. data/vendor/cmock/test/system/test_interactions/newer_standards_stuff1.yml +52 -52
  631. data/vendor/cmock/test/system/test_interactions/nonstandard_parsed_stuff_1.yml +91 -91
  632. data/vendor/cmock/test/system/test_interactions/nonstandard_parsed_stuff_2.yml +59 -59
  633. data/vendor/cmock/test/system/test_interactions/out_of_memory.yml +65 -65
  634. data/vendor/cmock/test/system/test_interactions/parsing_challenges.yml +242 -242
  635. data/vendor/cmock/test/system/test_interactions/return_thru_ptr_and_expect_any_args.yml +235 -235
  636. data/vendor/cmock/test/system/test_interactions/return_thru_ptr_ignore_arg.yml +231 -231
  637. data/vendor/cmock/test/system/test_interactions/skeleton.yml +55 -0
  638. data/vendor/cmock/test/system/test_interactions/skeleton_update.yml +76 -0
  639. data/vendor/cmock/test/system/test_interactions/struct_union_enum_expect_and_return.yml +277 -277
  640. data/vendor/cmock/test/system/test_interactions/struct_union_enum_expect_and_return_with_plugins.yml +280 -280
  641. data/vendor/cmock/test/system/test_interactions/stubs_with_callbacks.yml +221 -221
  642. data/vendor/cmock/test/system/test_interactions/unity_64bit_support.yml +77 -77
  643. data/vendor/cmock/test/system/test_interactions/unity_ignores.yml +139 -139
  644. data/vendor/cmock/test/system/test_interactions/unity_void_pointer_compare.yml +91 -91
  645. data/vendor/cmock/test/targets/clang_strict.yml +90 -90
  646. data/vendor/cmock/test/targets/gcc.yml +58 -58
  647. data/vendor/cmock/test/targets/gcc_64.yml +58 -58
  648. data/vendor/cmock/test/targets/gcc_tiny.yml +80 -80
  649. data/vendor/cmock/test/targets/iar_arm_v4.yml +110 -110
  650. data/vendor/cmock/test/targets/iar_arm_v5.yml +95 -95
  651. data/vendor/cmock/test/test_helper.rb +44 -44
  652. data/vendor/cmock/test/unit/cmock_config_test.rb +126 -123
  653. data/vendor/cmock/test/unit/cmock_config_test.yml +7 -6
  654. data/vendor/cmock/test/unit/cmock_file_writer_test.rb +27 -27
  655. data/vendor/cmock/test/unit/cmock_generator_main_test.rb +686 -551
  656. data/vendor/cmock/test/unit/cmock_generator_plugin_array_test.rb +141 -141
  657. data/vendor/cmock/test/unit/cmock_generator_plugin_callback_test.rb +281 -281
  658. data/vendor/cmock/test/unit/cmock_generator_plugin_cexception_test.rb +96 -96
  659. data/vendor/cmock/test/unit/cmock_generator_plugin_expect_a_test.rb +185 -183
  660. data/vendor/cmock/test/unit/cmock_generator_plugin_expect_any_args_test.rb +67 -67
  661. data/vendor/cmock/test/unit/cmock_generator_plugin_expect_b_test.rb +201 -200
  662. data/vendor/cmock/test/unit/cmock_generator_plugin_ignore_arg_test.rb +116 -116
  663. data/vendor/cmock/test/unit/cmock_generator_plugin_ignore_test.rb +119 -105
  664. data/vendor/cmock/test/unit/cmock_generator_plugin_return_thru_ptr_test.rb +136 -136
  665. data/vendor/cmock/test/unit/cmock_generator_utils_test.rb +398 -415
  666. data/vendor/cmock/test/unit/cmock_header_parser_test.rb +2717 -2000
  667. data/vendor/cmock/test/unit/cmock_plugin_manager_test.rb +100 -100
  668. data/vendor/cmock/test/unit/cmock_unityhelper_parser_test.rb +223 -223
  669. data/vendor/cmock/vendor/behaviors/Manifest.txt +9 -9
  670. data/vendor/cmock/vendor/behaviors/Rakefile +19 -19
  671. data/vendor/cmock/vendor/behaviors/lib/behaviors.rb +76 -76
  672. data/vendor/cmock/vendor/behaviors/lib/behaviors/reporttask.rb +158 -158
  673. data/vendor/cmock/vendor/behaviors/test/behaviors_tasks_test.rb +73 -73
  674. data/vendor/cmock/vendor/behaviors/test/behaviors_test.rb +50 -50
  675. data/vendor/cmock/vendor/behaviors/test/tasks_test/Rakefile +19 -19
  676. data/vendor/cmock/vendor/behaviors/test/tasks_test/lib/user.rb +2 -2
  677. data/vendor/cmock/vendor/behaviors/test/tasks_test/test/user_test.rb +17 -17
  678. data/vendor/cmock/vendor/c_exception/Gemfile +4 -4
  679. data/vendor/cmock/vendor/c_exception/Gemfile.lock +12 -12
  680. data/vendor/cmock/vendor/c_exception/README.md +249 -162
  681. data/vendor/cmock/vendor/c_exception/docs/CException.md +332 -292
  682. data/vendor/cmock/vendor/c_exception/docs/ThrowTheSwitchCodingStandard.md +207 -207
  683. data/vendor/cmock/vendor/c_exception/lib/CException.c +46 -46
  684. data/vendor/cmock/vendor/c_exception/lib/CException.h +115 -115
  685. data/vendor/cmock/vendor/c_exception/lib/meson.build +11 -0
  686. data/vendor/cmock/vendor/c_exception/meson.build +48 -0
  687. data/vendor/cmock/vendor/c_exception/project.yml +37 -0
  688. data/vendor/cmock/vendor/c_exception/test/TestException.c +391 -391
  689. data/vendor/{c_exception/test → cmock/vendor/c_exception/test/support}/CExceptionConfig.h +46 -46
  690. data/vendor/cmock/vendor/c_exception/vendor/unity/README.md +220 -0
  691. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/colour_prompt.rb +118 -0
  692. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/colour_reporter.rb +39 -0
  693. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/generate_config.yml +36 -0
  694. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/generate_module.rb +308 -0
  695. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/generate_test_runner.rb +437 -0
  696. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/parse_output.rb +220 -0
  697. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/stylize_as_junit.rb +252 -0
  698. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/test_file_filter.rb +25 -0
  699. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/type_sanitizer.rb +6 -0
  700. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/unity_test_summary.py +139 -0
  701. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/unity_test_summary.rb +136 -0
  702. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/unity_to_junit.py +146 -0
  703. data/vendor/cmock/vendor/c_exception/vendor/unity/docs/ThrowTheSwitchCodingStandard.md +207 -0
  704. data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf +0 -0
  705. data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityAssertionsReference.md +716 -0
  706. data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityConfigurationGuide.md +398 -0
  707. data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityGettingStartedGuide.md +191 -0
  708. data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityHelperScriptsGuide.md +242 -0
  709. data/vendor/cmock/vendor/c_exception/vendor/unity/docs/license.txt +21 -0
  710. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/makefile +71 -0
  711. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/readme.txt +5 -0
  712. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/src/ProductionCode.c +24 -0
  713. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/src/ProductionCode.h +3 -0
  714. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/src/ProductionCode2.c +11 -0
  715. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/src/ProductionCode2.h +2 -0
  716. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/test/TestProductionCode.c +62 -0
  717. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/test/TestProductionCode2.c +31 -0
  718. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +53 -0
  719. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +57 -0
  720. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_2/makefile +70 -0
  721. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_2/readme.txt +5 -0
  722. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_2/src/ProductionCode.c +24 -0
  723. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_2/src/ProductionCode.h +3 -0
  724. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_2/src/ProductionCode2.c +11 -0
  725. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_2/src/ProductionCode2.h +2 -0
  726. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_2/test/TestProductionCode.c +64 -0
  727. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_2/test/TestProductionCode2.c +33 -0
  728. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_2/test/test_runners/TestProductionCode2_Runner.c +9 -0
  729. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_2/test/test_runners/TestProductionCode_Runner.c +11 -0
  730. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_2/test/test_runners/all_tests.c +12 -0
  731. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/helper/UnityHelper.c +10 -0
  732. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/helper/UnityHelper.h +12 -0
  733. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/rakefile.rb +43 -0
  734. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/rakefile_helper.rb +249 -0
  735. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/readme.txt +13 -0
  736. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/src/ProductionCode.c +24 -0
  737. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/src/ProductionCode.h +3 -0
  738. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/src/ProductionCode2.c +11 -0
  739. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/src/ProductionCode2.h +2 -0
  740. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/target_gcc_32.yml +46 -0
  741. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/test/TestProductionCode.c +62 -0
  742. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/test/TestProductionCode2.c +31 -0
  743. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/unity_config.h +237 -0
  744. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/eclipse/error_parsers.txt +26 -0
  745. data/vendor/cmock/vendor/{unity → c_exception/vendor/unity}/extras/fixture/rakefile.rb +48 -44
  746. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/rakefile_helper.rb +178 -0
  747. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/readme.txt +9 -0
  748. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.c +432 -0
  749. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.h +83 -0
  750. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_internals.h +51 -0
  751. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_malloc_overrides.h +47 -0
  752. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/Makefile +74 -0
  753. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/main/AllTests.c +22 -0
  754. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/template_fixture_tests.c +39 -0
  755. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_Test.c +543 -0
  756. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_TestRunner.c +57 -0
  757. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/unity_output_Spy.c +57 -0
  758. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/unity_output_Spy.h +17 -0
  759. data/vendor/cmock/vendor/c_exception/vendor/unity/release/build.info +2 -0
  760. data/vendor/cmock/vendor/c_exception/vendor/unity/release/version.info +2 -0
  761. data/vendor/cmock/vendor/c_exception/vendor/unity/src/unity.c +1517 -0
  762. data/vendor/cmock/vendor/c_exception/vendor/unity/src/unity.h +339 -0
  763. data/vendor/cmock/vendor/c_exception/vendor/unity/src/unity_internals.h +784 -0
  764. data/vendor/cmock/vendor/c_exception/vendor/unity/test/Makefile +63 -0
  765. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_cmd.c +61 -0
  766. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_def.c +57 -0
  767. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_head1.c +55 -0
  768. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_head1.h +15 -0
  769. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_cmd.c +80 -0
  770. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_def.c +76 -0
  771. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_head1.c +75 -0
  772. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_head1.h +13 -0
  773. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_new1.c +89 -0
  774. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_new2.c +89 -0
  775. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_param.c +77 -0
  776. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_run1.c +89 -0
  777. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_run2.c +89 -0
  778. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_yaml.c +90 -0
  779. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_new1.c +67 -0
  780. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_new2.c +70 -0
  781. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_param.c +58 -0
  782. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_run1.c +67 -0
  783. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_run2.c +70 -0
  784. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_yaml.c +71 -0
  785. data/vendor/cmock/vendor/c_exception/vendor/unity/test/rakefile +125 -0
  786. data/vendor/cmock/vendor/c_exception/vendor/unity/test/rakefile_helper.rb +260 -0
  787. data/vendor/cmock/vendor/c_exception/vendor/unity/test/spec/generate_module_existing_file_spec.rb +158 -0
  788. data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/clang_file.yml +78 -0
  789. data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/clang_strict.yml +78 -0
  790. data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/gcc_32.yml +49 -0
  791. data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/gcc_64.yml +50 -0
  792. data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/gcc_auto_limits.yml +47 -0
  793. data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/gcc_auto_stdint.yml +59 -0
  794. data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/gcc_manual_math.yml +47 -0
  795. data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/hitech_picc18.yml +101 -0
  796. data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/iar_arm_v4.yml +90 -0
  797. data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/iar_arm_v5.yml +80 -0
  798. data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/iar_arm_v5_3.yml +80 -0
  799. data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/iar_armcortex_LM3S9B92_v5_4.yml +94 -0
  800. data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/iar_cortexm3_v5.yml +84 -0
  801. data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/iar_msp430.yml +95 -0
  802. data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/iar_sh2a_v6.yml +86 -0
  803. data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/CException.h +11 -0
  804. data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/Defs.h +8 -0
  805. data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/cmock.h +14 -0
  806. data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/mockMock.h +13 -0
  807. data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/testRunnerGenerator.c +183 -0
  808. data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +67 -0
  809. data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +192 -0
  810. data/vendor/cmock/vendor/c_exception/vendor/unity/test/tests/test_generate_test_runner.rb +1252 -0
  811. data/vendor/cmock/vendor/c_exception/vendor/unity/test/tests/testparameterized.c +110 -0
  812. data/vendor/cmock/vendor/{unity → c_exception/vendor/unity}/test/tests/testunity.c +4993 -8168
  813. data/vendor/cmock/vendor/unity/CMakeLists.txt +133 -31
  814. data/vendor/cmock/vendor/unity/LICENSE.txt +21 -21
  815. data/vendor/cmock/vendor/unity/README.md +191 -191
  816. data/vendor/cmock/vendor/unity/auto/colour_prompt.rb +119 -119
  817. data/vendor/cmock/vendor/unity/auto/colour_reporter.rb +39 -39
  818. data/vendor/cmock/vendor/unity/auto/generate_config.yml +36 -36
  819. data/vendor/cmock/vendor/unity/auto/generate_module.rb +312 -309
  820. data/vendor/cmock/vendor/unity/auto/generate_test_runner.rb +511 -495
  821. data/vendor/cmock/vendor/unity/auto/parse_output.rb +322 -322
  822. data/vendor/cmock/vendor/unity/auto/run_test.erb +37 -36
  823. data/vendor/cmock/vendor/unity/auto/stylize_as_junit.rb +251 -251
  824. data/vendor/cmock/vendor/unity/auto/test_file_filter.rb +25 -25
  825. data/vendor/cmock/vendor/unity/auto/type_sanitizer.rb +6 -6
  826. data/vendor/cmock/vendor/unity/auto/unity_test_summary.py +139 -139
  827. data/vendor/cmock/vendor/unity/auto/unity_test_summary.rb +135 -135
  828. data/vendor/cmock/vendor/unity/auto/unity_to_junit.py +146 -146
  829. data/vendor/cmock/vendor/unity/docs/ThrowTheSwitchCodingStandard.md +206 -206
  830. data/vendor/cmock/vendor/unity/docs/UnityAssertionsReference.md +831 -850
  831. data/vendor/cmock/vendor/unity/docs/UnityConfigurationGuide.md +563 -541
  832. data/vendor/cmock/vendor/unity/docs/UnityGettingStartedGuide.md +251 -251
  833. data/vendor/cmock/vendor/unity/docs/UnityHelperScriptsGuide.md +278 -266
  834. data/vendor/cmock/vendor/unity/examples/example_1/makefile +72 -72
  835. data/vendor/cmock/vendor/unity/examples/example_1/readme.txt +4 -4
  836. data/vendor/cmock/vendor/unity/examples/example_1/src/ProductionCode.c +24 -24
  837. data/vendor/cmock/vendor/unity/examples/example_1/src/ProductionCode.h +3 -3
  838. data/vendor/cmock/vendor/unity/examples/example_1/src/ProductionCode2.c +11 -11
  839. data/vendor/cmock/vendor/unity/examples/example_1/src/ProductionCode2.h +2 -2
  840. data/vendor/cmock/vendor/unity/examples/example_1/test/TestProductionCode.c +62 -62
  841. data/vendor/cmock/vendor/unity/examples/example_1/test/TestProductionCode2.c +31 -31
  842. data/vendor/cmock/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +53 -53
  843. data/vendor/cmock/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +57 -57
  844. data/vendor/cmock/vendor/unity/examples/example_2/makefile +71 -71
  845. data/vendor/cmock/vendor/unity/examples/example_2/readme.txt +4 -4
  846. data/vendor/cmock/vendor/unity/examples/example_2/src/ProductionCode.c +24 -24
  847. data/vendor/cmock/vendor/unity/examples/example_2/src/ProductionCode.h +3 -3
  848. data/vendor/cmock/vendor/unity/examples/example_2/src/ProductionCode2.c +11 -11
  849. data/vendor/cmock/vendor/unity/examples/example_2/src/ProductionCode2.h +2 -2
  850. data/vendor/cmock/vendor/unity/examples/example_2/test/TestProductionCode.c +64 -64
  851. data/vendor/cmock/vendor/unity/examples/example_2/test/TestProductionCode2.c +33 -33
  852. data/vendor/cmock/vendor/unity/examples/example_2/test/test_runners/TestProductionCode2_Runner.c +8 -8
  853. data/vendor/cmock/vendor/unity/examples/example_2/test/test_runners/TestProductionCode_Runner.c +10 -10
  854. data/vendor/cmock/vendor/unity/examples/example_2/test/test_runners/all_tests.c +12 -12
  855. data/vendor/cmock/vendor/unity/examples/example_3/helper/UnityHelper.c +10 -10
  856. data/vendor/cmock/vendor/unity/examples/example_3/helper/UnityHelper.h +12 -12
  857. data/vendor/cmock/vendor/unity/examples/example_3/rakefile.rb +38 -38
  858. data/vendor/cmock/vendor/unity/examples/example_3/rakefile_helper.rb +250 -250
  859. data/vendor/cmock/vendor/unity/examples/example_3/readme.txt +13 -13
  860. data/vendor/cmock/vendor/unity/examples/example_3/src/ProductionCode.c +24 -24
  861. data/vendor/cmock/vendor/unity/examples/example_3/src/ProductionCode.h +3 -3
  862. data/vendor/cmock/vendor/unity/examples/example_3/src/ProductionCode2.c +11 -11
  863. data/vendor/cmock/vendor/unity/examples/example_3/src/ProductionCode2.h +2 -2
  864. data/vendor/cmock/vendor/unity/examples/example_3/target_gcc_32.yml +47 -47
  865. data/vendor/cmock/vendor/unity/examples/example_3/test/TestProductionCode.c +62 -62
  866. data/vendor/cmock/vendor/unity/examples/example_3/test/TestProductionCode2.c +31 -31
  867. data/vendor/cmock/vendor/unity/examples/example_4/meson.build +12 -17
  868. data/vendor/cmock/vendor/unity/examples/example_4/readme.txt +14 -14
  869. data/vendor/cmock/vendor/unity/examples/example_4/src/ProductionCode.c +24 -24
  870. data/vendor/cmock/vendor/unity/examples/example_4/src/ProductionCode.h +3 -3
  871. data/vendor/cmock/vendor/unity/examples/example_4/src/ProductionCode2.c +11 -11
  872. data/vendor/cmock/vendor/unity/examples/example_4/src/ProductionCode2.h +2 -2
  873. data/vendor/cmock/vendor/unity/examples/example_4/src/meson.build +16 -21
  874. data/vendor/cmock/vendor/unity/examples/example_4/subprojects/unity.wrap +4 -4
  875. data/vendor/cmock/vendor/unity/examples/example_4/test/TestProductionCode.c +63 -63
  876. data/vendor/cmock/vendor/unity/examples/example_4/test/TestProductionCode2.c +35 -35
  877. data/vendor/cmock/vendor/unity/examples/example_4/test/meson.build +7 -12
  878. data/vendor/cmock/vendor/unity/examples/example_4/test/test_runners/TestProductionCode2_Runner.c +53 -53
  879. data/vendor/cmock/vendor/unity/examples/example_4/test/test_runners/TestProductionCode_Runner.c +57 -57
  880. data/vendor/cmock/vendor/unity/examples/example_4/test/test_runners/meson.build +13 -16
  881. data/vendor/cmock/vendor/unity/examples/unity_config.h +244 -263
  882. data/vendor/cmock/vendor/unity/extras/eclipse/error_parsers.txt +26 -26
  883. data/vendor/cmock/vendor/unity/extras/fixture/readme.md +29 -17
  884. data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture.c +310 -275
  885. data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture.h +83 -83
  886. data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture_internals.h +50 -50
  887. data/vendor/cmock/vendor/unity/extras/fixture/test/Makefile +72 -72
  888. data/vendor/cmock/vendor/unity/extras/fixture/test/main/AllTests.c +20 -20
  889. data/vendor/cmock/vendor/unity/extras/fixture/test/template_fixture_tests.c +39 -39
  890. data/vendor/cmock/vendor/unity/extras/fixture/test/unity_fixture_Test.c +245 -245
  891. data/vendor/cmock/vendor/unity/extras/fixture/test/unity_fixture_TestRunner.c +32 -32
  892. data/vendor/cmock/vendor/unity/extras/memory/readme.md +49 -49
  893. data/vendor/cmock/vendor/unity/extras/memory/src/unity_memory.c +202 -202
  894. data/vendor/cmock/vendor/unity/extras/memory/src/unity_memory.h +60 -60
  895. data/vendor/cmock/vendor/unity/extras/memory/test/Makefile +78 -78
  896. data/vendor/cmock/vendor/unity/extras/memory/test/unity_memory_Test.c +325 -325
  897. data/vendor/cmock/vendor/unity/extras/memory/test/unity_memory_TestRunner.c +49 -49
  898. data/vendor/cmock/vendor/unity/extras/memory/test/unity_output_Spy.c +56 -56
  899. data/vendor/cmock/vendor/unity/extras/memory/test/unity_output_Spy.h +16 -16
  900. data/vendor/cmock/vendor/unity/meson.build +48 -69
  901. data/vendor/cmock/vendor/unity/src/meson.build +11 -16
  902. data/vendor/cmock/vendor/unity/src/unity.c +2109 -2085
  903. data/vendor/cmock/vendor/unity/src/unity.h +661 -617
  904. data/vendor/cmock/vendor/unity/src/unity_internals.h +1030 -1002
  905. data/vendor/cmock/vendor/unity/test/Makefile +159 -67
  906. data/vendor/cmock/vendor/unity/test/expectdata/testsample_cmd.c +61 -61
  907. data/vendor/cmock/vendor/unity/test/expectdata/testsample_def.c +57 -57
  908. data/vendor/cmock/vendor/unity/test/expectdata/testsample_head1.c +55 -55
  909. data/vendor/cmock/vendor/unity/test/expectdata/testsample_head1.h +15 -15
  910. data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_cmd.c +80 -80
  911. data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_def.c +76 -76
  912. data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_head1.c +75 -75
  913. data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_head1.h +13 -13
  914. data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_new1.c +89 -89
  915. data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_new2.c +89 -89
  916. data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_param.c +77 -77
  917. data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_run1.c +89 -89
  918. data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_run2.c +89 -89
  919. data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_yaml.c +90 -90
  920. data/vendor/cmock/vendor/unity/test/expectdata/testsample_new1.c +67 -67
  921. data/vendor/cmock/vendor/unity/test/expectdata/testsample_new2.c +70 -70
  922. data/vendor/cmock/vendor/unity/test/expectdata/testsample_param.c +58 -58
  923. data/vendor/cmock/vendor/unity/test/expectdata/testsample_run1.c +67 -67
  924. data/vendor/cmock/vendor/unity/test/expectdata/testsample_run2.c +70 -70
  925. data/vendor/cmock/vendor/unity/test/expectdata/testsample_yaml.c +71 -71
  926. data/vendor/cmock/vendor/unity/test/rakefile +163 -124
  927. data/vendor/cmock/vendor/unity/test/rakefile_helper.rb +315 -269
  928. data/vendor/cmock/vendor/unity/test/spec/generate_module_existing_file_spec.rb +158 -158
  929. data/vendor/cmock/vendor/unity/test/targets/ansi.yml +44 -49
  930. data/vendor/cmock/vendor/unity/test/targets/clang_file.yml +72 -78
  931. data/vendor/cmock/vendor/unity/test/targets/clang_strict.yml +71 -78
  932. data/vendor/cmock/vendor/unity/test/targets/gcc_32.yml +45 -49
  933. data/vendor/cmock/vendor/unity/test/targets/gcc_64.yml +46 -50
  934. data/vendor/cmock/vendor/unity/test/targets/gcc_auto_limits.yml +43 -47
  935. data/vendor/cmock/vendor/unity/test/targets/gcc_auto_stdint.yml +55 -59
  936. data/vendor/cmock/vendor/unity/test/targets/gcc_manual_math.yml +43 -47
  937. data/vendor/cmock/vendor/unity/test/targets/hitech_picc18.yml +91 -101
  938. data/vendor/cmock/vendor/unity/test/targets/iar_arm_v4.yml +98 -90
  939. data/vendor/cmock/vendor/unity/test/targets/iar_arm_v5.yml +92 -80
  940. data/vendor/cmock/vendor/unity/test/targets/iar_arm_v5_3.yml +92 -80
  941. data/vendor/cmock/vendor/unity/test/targets/iar_armcortex_LM3S9B92_v5_4.yml +90 -94
  942. data/vendor/cmock/vendor/unity/test/targets/iar_cortexm3_v5.yml +94 -84
  943. data/vendor/cmock/vendor/unity/test/targets/iar_msp430.yml +112 -95
  944. data/vendor/cmock/vendor/unity/test/targets/iar_sh2a_v6.yml +99 -86
  945. data/vendor/cmock/vendor/unity/test/testdata/CException.h +11 -11
  946. data/vendor/cmock/vendor/unity/test/testdata/Defs.h +8 -8
  947. data/vendor/cmock/vendor/unity/test/testdata/cmock.h +14 -14
  948. data/vendor/cmock/vendor/unity/test/testdata/mockMock.h +13 -13
  949. data/vendor/cmock/vendor/unity/test/testdata/testRunnerGenerator.c +189 -189
  950. data/vendor/cmock/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +70 -70
  951. data/vendor/cmock/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +197 -197
  952. data/vendor/cmock/vendor/unity/test/tests/self_assessment_utils.h +144 -0
  953. data/vendor/cmock/vendor/unity/test/tests/test_generate_test_runner.rb +1260 -1268
  954. data/vendor/cmock/vendor/unity/test/tests/test_unity_arrays.c +2874 -0
  955. data/vendor/cmock/vendor/unity/test/tests/test_unity_core.c +371 -0
  956. data/vendor/cmock/vendor/unity/test/tests/test_unity_doubles.c +773 -0
  957. data/vendor/cmock/vendor/unity/test/tests/test_unity_floats.c +884 -0
  958. data/vendor/cmock/vendor/unity/test/tests/test_unity_integers.c +2847 -0
  959. data/vendor/cmock/vendor/unity/test/tests/test_unity_integers_64.c +773 -0
  960. data/vendor/cmock/vendor/unity/test/tests/test_unity_memory.c +81 -0
  961. data/vendor/{unity/test/tests/testparameterized.c → cmock/vendor/unity/test/tests/test_unity_parameterized.c} +171 -171
  962. data/vendor/cmock/vendor/unity/test/tests/test_unity_strings.c +329 -0
  963. data/vendor/cmock/vendor/unity/unityConfig.cmake +1 -0
  964. data/vendor/deep_merge/MIT-LICENSE +20 -20
  965. data/vendor/deep_merge/README +94 -94
  966. data/vendor/deep_merge/Rakefile +28 -28
  967. data/vendor/deep_merge/lib/deep_merge.rb +211 -211
  968. data/vendor/deep_merge/test/test_deep_merge.rb +553 -553
  969. data/vendor/diy/History.txt +28 -28
  970. data/vendor/diy/README.rdoc +233 -233
  971. data/vendor/diy/Rakefile +33 -33
  972. data/vendor/diy/TODO.txt +9 -9
  973. data/vendor/diy/diy.gemspec +131 -131
  974. data/vendor/diy/lib/diy.rb +403 -403
  975. data/vendor/diy/lib/diy/factory.rb +36 -36
  976. data/vendor/diy/sample_code/car.rb +7 -7
  977. data/vendor/diy/sample_code/chassis.rb +5 -5
  978. data/vendor/diy/sample_code/diy_example.rb +26 -26
  979. data/vendor/diy/sample_code/engine.rb +5 -5
  980. data/vendor/diy/sample_code/objects.yml +10 -10
  981. data/vendor/diy/test/constructor.rb +119 -119
  982. data/vendor/diy/test/diy_test.rb +608 -608
  983. data/vendor/diy/test/factory_test.rb +79 -79
  984. data/vendor/diy/test/files/broken_construction.yml +7 -7
  985. data/vendor/diy/test/files/cat/cat.rb +3 -3
  986. data/vendor/diy/test/files/cat/extra_conflict.yml +5 -5
  987. data/vendor/diy/test/files/cat/heritage.rb +2 -2
  988. data/vendor/diy/test/files/cat/needs_input.yml +3 -3
  989. data/vendor/diy/test/files/cat/the_cat_lineage.rb +1 -1
  990. data/vendor/diy/test/files/dog/dog_model.rb +3 -3
  991. data/vendor/diy/test/files/dog/dog_presenter.rb +3 -3
  992. data/vendor/diy/test/files/dog/dog_view.rb +2 -2
  993. data/vendor/diy/test/files/dog/file_resolver.rb +2 -2
  994. data/vendor/diy/test/files/dog/other_thing.rb +2 -2
  995. data/vendor/diy/test/files/dog/simple.yml +11 -11
  996. data/vendor/diy/test/files/donkey/foo.rb +8 -8
  997. data/vendor/diy/test/files/donkey/foo/bar/qux.rb +7 -7
  998. data/vendor/diy/test/files/factory/beef.rb +5 -5
  999. data/vendor/diy/test/files/factory/dog.rb +6 -6
  1000. data/vendor/diy/test/files/factory/factory.yml +19 -19
  1001. data/vendor/diy/test/files/factory/farm/llama.rb +7 -7
  1002. data/vendor/diy/test/files/factory/farm/pork.rb +7 -7
  1003. data/vendor/diy/test/files/factory/kitten.rb +13 -13
  1004. data/vendor/diy/test/files/fud/objects.yml +13 -13
  1005. data/vendor/diy/test/files/fud/toy.rb +14 -14
  1006. data/vendor/diy/test/files/functions/attached_things_builder.rb +1 -1
  1007. data/vendor/diy/test/files/functions/invalid_method.yml +4 -4
  1008. data/vendor/diy/test/files/functions/method_extractor.rb +2 -2
  1009. data/vendor/diy/test/files/functions/nonsingleton_objects.yml +5 -5
  1010. data/vendor/diy/test/files/functions/objects.yml +21 -21
  1011. data/vendor/diy/test/files/functions/thing.rb +2 -2
  1012. data/vendor/diy/test/files/functions/thing_builder.rb +24 -24
  1013. data/vendor/diy/test/files/functions/things_builder.rb +2 -2
  1014. data/vendor/diy/test/files/gnu/objects.yml +14 -14
  1015. data/vendor/diy/test/files/gnu/thinger.rb +7 -7
  1016. data/vendor/diy/test/files/goat/base.rb +8 -8
  1017. data/vendor/diy/test/files/goat/can.rb +6 -6
  1018. data/vendor/diy/test/files/goat/goat.rb +6 -6
  1019. data/vendor/diy/test/files/goat/objects.yml +12 -12
  1020. data/vendor/diy/test/files/goat/paper.rb +6 -6
  1021. data/vendor/diy/test/files/goat/plane.rb +7 -7
  1022. data/vendor/diy/test/files/goat/shirt.rb +6 -6
  1023. data/vendor/diy/test/files/goat/wings.rb +8 -8
  1024. data/vendor/diy/test/files/horse/holder_thing.rb +3 -3
  1025. data/vendor/diy/test/files/horse/objects.yml +7 -7
  1026. data/vendor/diy/test/files/namespace/animal/bird.rb +5 -5
  1027. data/vendor/diy/test/files/namespace/animal/cat.rb +5 -5
  1028. data/vendor/diy/test/files/namespace/animal/reptile/hardshell/turtle.rb +8 -8
  1029. data/vendor/diy/test/files/namespace/animal/reptile/lizard.rb +7 -7
  1030. data/vendor/diy/test/files/namespace/bad_module_specified.yml +8 -8
  1031. data/vendor/diy/test/files/namespace/class_name_combine.yml +8 -8
  1032. data/vendor/diy/test/files/namespace/no_module_specified.yml +8 -8
  1033. data/vendor/diy/test/files/namespace/objects.yml +21 -21
  1034. data/vendor/diy/test/files/namespace/road.rb +2 -2
  1035. data/vendor/diy/test/files/namespace/sky.rb +2 -2
  1036. data/vendor/diy/test/files/namespace/subcontext.yml +22 -22
  1037. data/vendor/diy/test/files/non_singleton/air.rb +2 -2
  1038. data/vendor/diy/test/files/non_singleton/fat_cat.rb +3 -3
  1039. data/vendor/diy/test/files/non_singleton/objects.yml +19 -19
  1040. data/vendor/diy/test/files/non_singleton/pig.rb +3 -3
  1041. data/vendor/diy/test/files/non_singleton/thread_spinner.rb +3 -3
  1042. data/vendor/diy/test/files/non_singleton/tick.rb +3 -3
  1043. data/vendor/diy/test/files/non_singleton/yard.rb +2 -2
  1044. data/vendor/diy/test/files/yak/core_model.rb +3 -3
  1045. data/vendor/diy/test/files/yak/core_presenter.rb +3 -3
  1046. data/vendor/diy/test/files/yak/core_view.rb +1 -1
  1047. data/vendor/diy/test/files/yak/data_source.rb +1 -1
  1048. data/vendor/diy/test/files/yak/fringe_model.rb +3 -3
  1049. data/vendor/diy/test/files/yak/fringe_presenter.rb +3 -3
  1050. data/vendor/diy/test/files/yak/fringe_view.rb +1 -1
  1051. data/vendor/diy/test/files/yak/giant_squid.rb +3 -3
  1052. data/vendor/diy/test/files/yak/krill.rb +2 -2
  1053. data/vendor/diy/test/files/yak/my_objects.yml +21 -21
  1054. data/vendor/diy/test/files/yak/sub_sub_context_test.yml +27 -27
  1055. data/vendor/diy/test/test_helper.rb +55 -55
  1056. data/vendor/hardmock/CHANGES +78 -78
  1057. data/vendor/hardmock/LICENSE +7 -7
  1058. data/vendor/hardmock/README +70 -70
  1059. data/vendor/hardmock/Rakefile +8 -8
  1060. data/vendor/hardmock/config/environment.rb +12 -12
  1061. data/vendor/hardmock/lib/assert_error.rb +23 -23
  1062. data/vendor/hardmock/lib/extend_test_unit.rb +14 -14
  1063. data/vendor/hardmock/lib/hardmock.rb +86 -86
  1064. data/vendor/hardmock/lib/hardmock/errors.rb +22 -22
  1065. data/vendor/hardmock/lib/hardmock/expectation.rb +229 -229
  1066. data/vendor/hardmock/lib/hardmock/expectation_builder.rb +9 -9
  1067. data/vendor/hardmock/lib/hardmock/expector.rb +26 -26
  1068. data/vendor/hardmock/lib/hardmock/method_cleanout.rb +33 -33
  1069. data/vendor/hardmock/lib/hardmock/mock.rb +180 -180
  1070. data/vendor/hardmock/lib/hardmock/mock_control.rb +53 -53
  1071. data/vendor/hardmock/lib/hardmock/stubbing.rb +210 -210
  1072. data/vendor/hardmock/lib/hardmock/trapper.rb +31 -31
  1073. data/vendor/hardmock/lib/hardmock/utils.rb +9 -9
  1074. data/vendor/hardmock/lib/test_unit_before_after.rb +169 -169
  1075. data/vendor/hardmock/rake_tasks/rdoc.rake +19 -19
  1076. data/vendor/hardmock/rake_tasks/rdoc_options.rb +4 -4
  1077. data/vendor/hardmock/rake_tasks/test.rake +22 -22
  1078. data/vendor/hardmock/test/functional/assert_error_test.rb +52 -52
  1079. data/vendor/hardmock/test/functional/auto_verify_test.rb +178 -178
  1080. data/vendor/hardmock/test/functional/direct_mock_usage_test.rb +396 -396
  1081. data/vendor/hardmock/test/functional/hardmock_test.rb +434 -434
  1082. data/vendor/hardmock/test/functional/stubbing_test.rb +479 -479
  1083. data/vendor/hardmock/test/test_helper.rb +43 -43
  1084. data/vendor/hardmock/test/unit/expectation_builder_test.rb +19 -19
  1085. data/vendor/hardmock/test/unit/expectation_test.rb +372 -372
  1086. data/vendor/hardmock/test/unit/expector_test.rb +57 -57
  1087. data/vendor/hardmock/test/unit/method_cleanout_test.rb +36 -36
  1088. data/vendor/hardmock/test/unit/mock_control_test.rb +175 -175
  1089. data/vendor/hardmock/test/unit/mock_test.rb +279 -279
  1090. data/vendor/hardmock/test/unit/test_unit_before_after_test.rb +452 -452
  1091. data/vendor/hardmock/test/unit/trapper_test.rb +62 -62
  1092. data/vendor/hardmock/test/unit/verify_error_test.rb +40 -40
  1093. data/vendor/unity/CMakeLists.txt +133 -31
  1094. data/vendor/unity/LICENSE.txt +21 -21
  1095. data/vendor/unity/README.md +191 -191
  1096. data/vendor/unity/auto/colour_prompt.rb +119 -119
  1097. data/vendor/unity/auto/colour_reporter.rb +39 -39
  1098. data/vendor/unity/auto/generate_config.yml +36 -36
  1099. data/vendor/unity/auto/generate_module.rb +312 -309
  1100. data/vendor/unity/auto/generate_test_runner.rb +511 -495
  1101. data/vendor/unity/auto/parse_output.rb +322 -322
  1102. data/vendor/unity/auto/run_test.erb +37 -36
  1103. data/vendor/unity/auto/stylize_as_junit.rb +251 -251
  1104. data/vendor/unity/auto/test_file_filter.rb +25 -25
  1105. data/vendor/unity/auto/type_sanitizer.rb +6 -6
  1106. data/vendor/unity/auto/unity_test_summary.py +139 -139
  1107. data/vendor/unity/auto/unity_test_summary.rb +135 -135
  1108. data/vendor/unity/auto/unity_to_junit.py +146 -146
  1109. data/vendor/unity/docs/ThrowTheSwitchCodingStandard.md +206 -206
  1110. data/vendor/unity/docs/UnityAssertionsReference.md +831 -850
  1111. data/vendor/unity/docs/UnityConfigurationGuide.md +563 -541
  1112. data/vendor/unity/docs/UnityGettingStartedGuide.md +251 -251
  1113. data/vendor/unity/docs/UnityHelperScriptsGuide.md +278 -266
  1114. data/vendor/unity/examples/example_1/makefile +72 -72
  1115. data/vendor/unity/examples/example_1/readme.txt +4 -4
  1116. data/vendor/unity/examples/example_1/src/ProductionCode.c +24 -24
  1117. data/vendor/unity/examples/example_1/src/ProductionCode.h +3 -3
  1118. data/vendor/unity/examples/example_1/src/ProductionCode2.c +11 -11
  1119. data/vendor/unity/examples/example_1/src/ProductionCode2.h +2 -2
  1120. data/vendor/unity/examples/example_1/test/TestProductionCode.c +62 -62
  1121. data/vendor/unity/examples/example_1/test/TestProductionCode2.c +31 -31
  1122. data/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +53 -53
  1123. data/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +57 -57
  1124. data/vendor/unity/examples/example_2/makefile +71 -71
  1125. data/vendor/unity/examples/example_2/readme.txt +4 -4
  1126. data/vendor/unity/examples/example_2/src/ProductionCode.c +24 -24
  1127. data/vendor/unity/examples/example_2/src/ProductionCode.h +3 -3
  1128. data/vendor/unity/examples/example_2/src/ProductionCode2.c +11 -11
  1129. data/vendor/unity/examples/example_2/src/ProductionCode2.h +2 -2
  1130. data/vendor/unity/examples/example_2/test/TestProductionCode.c +64 -64
  1131. data/vendor/unity/examples/example_2/test/TestProductionCode2.c +33 -33
  1132. data/vendor/unity/examples/example_2/test/test_runners/TestProductionCode2_Runner.c +8 -8
  1133. data/vendor/unity/examples/example_2/test/test_runners/TestProductionCode_Runner.c +10 -10
  1134. data/vendor/unity/examples/example_2/test/test_runners/all_tests.c +12 -12
  1135. data/vendor/unity/examples/example_3/helper/UnityHelper.c +10 -10
  1136. data/vendor/unity/examples/example_3/helper/UnityHelper.h +12 -12
  1137. data/vendor/unity/examples/example_3/rakefile.rb +38 -38
  1138. data/vendor/unity/examples/example_3/rakefile_helper.rb +250 -250
  1139. data/vendor/unity/examples/example_3/readme.txt +13 -13
  1140. data/vendor/unity/examples/example_3/src/ProductionCode.c +24 -24
  1141. data/vendor/unity/examples/example_3/src/ProductionCode.h +3 -3
  1142. data/vendor/unity/examples/example_3/src/ProductionCode2.c +11 -11
  1143. data/vendor/unity/examples/example_3/src/ProductionCode2.h +2 -2
  1144. data/vendor/unity/examples/example_3/target_gcc_32.yml +47 -47
  1145. data/vendor/unity/examples/example_3/test/TestProductionCode.c +62 -62
  1146. data/vendor/unity/examples/example_3/test/TestProductionCode2.c +31 -31
  1147. data/vendor/unity/examples/example_4/meson.build +12 -17
  1148. data/vendor/unity/examples/example_4/readme.txt +14 -14
  1149. data/vendor/unity/examples/example_4/src/ProductionCode.c +24 -24
  1150. data/vendor/unity/examples/example_4/src/ProductionCode.h +3 -3
  1151. data/vendor/unity/examples/example_4/src/ProductionCode2.c +11 -11
  1152. data/vendor/unity/examples/example_4/src/ProductionCode2.h +2 -2
  1153. data/vendor/unity/examples/example_4/src/meson.build +16 -21
  1154. data/vendor/unity/examples/example_4/subprojects/unity.wrap +4 -4
  1155. data/vendor/unity/examples/example_4/test/TestProductionCode.c +63 -63
  1156. data/vendor/unity/examples/example_4/test/TestProductionCode2.c +35 -35
  1157. data/vendor/unity/examples/example_4/test/meson.build +7 -12
  1158. data/vendor/unity/examples/example_4/test/test_runners/TestProductionCode2_Runner.c +53 -53
  1159. data/vendor/unity/examples/example_4/test/test_runners/TestProductionCode_Runner.c +57 -57
  1160. data/vendor/unity/examples/example_4/test/test_runners/meson.build +13 -16
  1161. data/vendor/unity/examples/unity_config.h +244 -263
  1162. data/vendor/unity/extras/eclipse/error_parsers.txt +26 -26
  1163. data/vendor/unity/extras/fixture/readme.md +29 -17
  1164. data/vendor/unity/extras/fixture/src/unity_fixture.c +310 -275
  1165. data/vendor/unity/extras/fixture/src/unity_fixture.h +83 -83
  1166. data/vendor/unity/extras/fixture/src/unity_fixture_internals.h +50 -50
  1167. data/vendor/unity/extras/fixture/test/Makefile +72 -72
  1168. data/vendor/unity/extras/fixture/test/main/AllTests.c +20 -20
  1169. data/vendor/unity/extras/fixture/test/template_fixture_tests.c +39 -39
  1170. data/vendor/unity/extras/fixture/test/unity_fixture_Test.c +245 -245
  1171. data/vendor/unity/extras/fixture/test/unity_fixture_TestRunner.c +32 -32
  1172. data/vendor/unity/extras/memory/readme.md +49 -49
  1173. data/vendor/unity/extras/memory/src/unity_memory.c +202 -202
  1174. data/vendor/unity/extras/memory/src/unity_memory.h +60 -60
  1175. data/vendor/unity/extras/memory/test/Makefile +78 -78
  1176. data/vendor/unity/extras/memory/test/unity_memory_Test.c +325 -325
  1177. data/vendor/unity/extras/memory/test/unity_memory_TestRunner.c +49 -49
  1178. data/vendor/unity/extras/memory/test/unity_output_Spy.c +56 -56
  1179. data/vendor/unity/extras/memory/test/unity_output_Spy.h +16 -16
  1180. data/vendor/unity/meson.build +48 -69
  1181. data/vendor/unity/src/meson.build +11 -16
  1182. data/vendor/unity/src/unity.c +2109 -2085
  1183. data/vendor/unity/src/unity.h +661 -617
  1184. data/vendor/unity/src/unity_internals.h +1030 -1002
  1185. data/vendor/unity/test/Makefile +159 -67
  1186. data/vendor/unity/test/expectdata/testsample_cmd.c +61 -61
  1187. data/vendor/unity/test/expectdata/testsample_def.c +57 -57
  1188. data/vendor/unity/test/expectdata/testsample_head1.c +55 -55
  1189. data/vendor/unity/test/expectdata/testsample_head1.h +15 -15
  1190. data/vendor/unity/test/expectdata/testsample_mock_cmd.c +80 -80
  1191. data/vendor/unity/test/expectdata/testsample_mock_def.c +76 -76
  1192. data/vendor/unity/test/expectdata/testsample_mock_head1.c +75 -75
  1193. data/vendor/unity/test/expectdata/testsample_mock_head1.h +13 -13
  1194. data/vendor/unity/test/expectdata/testsample_mock_new1.c +89 -89
  1195. data/vendor/unity/test/expectdata/testsample_mock_new2.c +89 -89
  1196. data/vendor/unity/test/expectdata/testsample_mock_param.c +77 -77
  1197. data/vendor/unity/test/expectdata/testsample_mock_run1.c +89 -89
  1198. data/vendor/unity/test/expectdata/testsample_mock_run2.c +89 -89
  1199. data/vendor/unity/test/expectdata/testsample_mock_yaml.c +90 -90
  1200. data/vendor/unity/test/expectdata/testsample_new1.c +67 -67
  1201. data/vendor/unity/test/expectdata/testsample_new2.c +70 -70
  1202. data/vendor/unity/test/expectdata/testsample_param.c +58 -58
  1203. data/vendor/unity/test/expectdata/testsample_run1.c +67 -67
  1204. data/vendor/unity/test/expectdata/testsample_run2.c +70 -70
  1205. data/vendor/unity/test/expectdata/testsample_yaml.c +71 -71
  1206. data/vendor/unity/test/rakefile +163 -124
  1207. data/vendor/unity/test/rakefile_helper.rb +315 -269
  1208. data/vendor/unity/test/spec/generate_module_existing_file_spec.rb +158 -158
  1209. data/vendor/unity/test/targets/ansi.yml +44 -49
  1210. data/vendor/unity/test/targets/clang_file.yml +72 -78
  1211. data/vendor/unity/test/targets/clang_strict.yml +71 -78
  1212. data/vendor/unity/test/targets/gcc_32.yml +45 -49
  1213. data/vendor/unity/test/targets/gcc_64.yml +46 -50
  1214. data/vendor/unity/test/targets/gcc_auto_limits.yml +43 -47
  1215. data/vendor/unity/test/targets/gcc_auto_stdint.yml +55 -59
  1216. data/vendor/unity/test/targets/gcc_manual_math.yml +43 -47
  1217. data/vendor/unity/test/targets/hitech_picc18.yml +91 -101
  1218. data/vendor/unity/test/targets/iar_arm_v4.yml +98 -90
  1219. data/vendor/unity/test/targets/iar_arm_v5.yml +92 -80
  1220. data/vendor/unity/test/targets/iar_arm_v5_3.yml +92 -80
  1221. data/vendor/unity/test/targets/iar_armcortex_LM3S9B92_v5_4.yml +90 -94
  1222. data/vendor/unity/test/targets/iar_cortexm3_v5.yml +94 -84
  1223. data/vendor/unity/test/targets/iar_msp430.yml +112 -95
  1224. data/vendor/unity/test/targets/iar_sh2a_v6.yml +99 -86
  1225. data/vendor/unity/test/testdata/CException.h +11 -11
  1226. data/vendor/unity/test/testdata/Defs.h +8 -8
  1227. data/vendor/unity/test/testdata/cmock.h +14 -14
  1228. data/vendor/unity/test/testdata/mockMock.h +13 -13
  1229. data/vendor/unity/test/testdata/testRunnerGenerator.c +189 -189
  1230. data/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +70 -70
  1231. data/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +197 -197
  1232. data/vendor/unity/test/tests/self_assessment_utils.h +144 -0
  1233. data/vendor/unity/test/tests/test_generate_test_runner.rb +1260 -1268
  1234. data/vendor/unity/test/tests/test_unity_arrays.c +2874 -0
  1235. data/vendor/unity/test/tests/test_unity_core.c +371 -0
  1236. data/vendor/unity/test/tests/test_unity_doubles.c +773 -0
  1237. data/vendor/unity/test/tests/test_unity_floats.c +884 -0
  1238. data/vendor/unity/test/tests/test_unity_integers.c +2847 -0
  1239. data/vendor/unity/test/tests/test_unity_integers_64.c +773 -0
  1240. data/vendor/unity/test/tests/test_unity_memory.c +81 -0
  1241. data/vendor/{cmock/vendor/unity/test/tests/testparameterized.c → unity/test/tests/test_unity_parameterized.c} +171 -171
  1242. data/vendor/unity/test/tests/test_unity_strings.c +329 -0
  1243. data/vendor/unity/unityConfig.cmake +1 -0
  1244. metadata +225 -62
  1245. data/ceedling.sublime-project +0 -28
  1246. data/ceedling.sublime-workspace +0 -1276
  1247. data/docs/CeedlingPacket.odt +0 -0
  1248. data/docs/CeedlingPacket.pdf +0 -0
  1249. data/plugins/bullseye/readme.txt +0 -0
  1250. data/vendor/c_exception/LICENSE.txt +0 -30
  1251. data/vendor/c_exception/Rakefile +0 -42
  1252. data/vendor/c_exception/makefile +0 -24
  1253. data/vendor/c_exception/test/TestException_Runner.c +0 -67
  1254. data/vendor/cmock/vendor/c_exception/LICENSE.txt +0 -30
  1255. data/vendor/cmock/vendor/c_exception/Rakefile +0 -42
  1256. data/vendor/cmock/vendor/c_exception/makefile +0 -24
  1257. data/vendor/cmock/vendor/c_exception/test/TestException_Runner.c +0 -67
  1258. data/vendor/cmock/vendor/unity/extras/fixture/rakefile_helper.rb +0 -183
  1259. data/vendor/cmock/vendor/unity/extras/memory/rakefile.rb +0 -45
  1260. data/vendor/cmock/vendor/unity/extras/memory/rakefile_helper.rb +0 -187
  1261. data/vendor/cmock/vendor/unity/src/CMakeLists.txt +0 -22
  1262. data/vendor/unity/extras/fixture/rakefile.rb +0 -44
  1263. data/vendor/unity/extras/fixture/rakefile_helper.rb +0 -183
  1264. data/vendor/unity/extras/memory/rakefile.rb +0 -45
  1265. data/vendor/unity/extras/memory/rakefile_helper.rb +0 -187
  1266. data/vendor/unity/src/CMakeLists.txt +0 -22
  1267. data/vendor/unity/test/tests/testunity.c +0 -8168
@@ -1,36 +1,52 @@
1
- # -*- encoding: utf-8 -*-
2
- $LOAD_PATH << File.expand_path(File.join(File.dirname(__FILE__), 'lib'))
3
- require "ceedling/version"
4
- require 'date'
5
-
6
- Gem::Specification.new do |s|
7
- s.name = "ceedling"
8
- s.version = Ceedling::Version::GEM
9
- s.platform = Gem::Platform::RUBY
10
- s.authors = ["Mike Karlesky, Mark VanderVoord", "Greg Williams", "Matt Fletcher"]
11
- s.email = ["michael@karlesky.net, mvandervoord@gmail.com, williams@atomicobject.com, fletcher@atomicobject.com"]
12
- s.homepage = "http://throwtheswitch.org/"
13
- s.summary = %q{Ceedling is a set of tools for the automation of builds and test running for C}
14
- s.description = %q{Ceedling provides a set of tools to deploy its guts in a folder or which can be required in a Rakefile}
15
- s.licenses = ['MIT']
16
-
17
- s.add_dependency "thor", ">= 0.14.5"
18
- s.add_dependency "rake", ">= 12.2.1"
19
- s.add_runtime_dependency "constructor", ">= 1.0.4"
20
-
21
- # Files needed from submodules
22
- s.files = []
23
- s.files += Dir['vendor/**/docs/**/*.pdf', 'docs/**/*.pdf', 'vendor/**/docs/**/*.md', 'docs/**/*.md']
24
- s.files += Dir['vendor/cmock/lib/**/*.rb']
25
- s.files += Dir['vendor/cmock/config/**/*.rb']
26
- s.files += Dir['vendor/cmock/src/**/*.[ch]']
27
- s.files += Dir['vendor/c_exception/lib/**/*.[ch]']
28
- s.files += Dir['vendor/unity/auto/**/*.rb']
29
- s.files += Dir['vendor/unity/src/**/*.[ch]']
30
-
31
- s.files += Dir['**/*']
32
- s.test_files = Dir['test/**/*', 'spec/**/*', 'features/**/*']
33
- s.executables = Dir['bin/**/*'].map{|f| File.basename(f)}
34
-
35
- s.require_paths = ["lib", "vendor/cmock/lib"]
36
- end
1
+ # -*- encoding: utf-8 -*-
2
+ $LOAD_PATH << File.expand_path(File.join(File.dirname(__FILE__), 'lib'))
3
+ require "ceedling/version"
4
+ require 'date'
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = "ceedling"
8
+ s.version = Ceedling::Version::GEM
9
+ s.platform = Gem::Platform::RUBY
10
+ s.authors = ["Mark VanderVoord", "Michael Karlesky", "Greg Williams"]
11
+ s.email = ["mvandervoord@gmail.com", "michael@karlesky.net", "barney.williams@gmail.com"]
12
+ s.homepage = "http://throwtheswitch.org/ceedling"
13
+ s.summary = "Ceedling is a build automation tool for C unit test suites that packages up Unity, CMock, and Rake-based build management functionality"
14
+ s.description = <<-DESC
15
+ Ceedling is a build automation tool that helps you create and run C unit test suites.
16
+
17
+ Ceedling provides two core functions: [1] It packages up several tools including the C unit test framework Unity, the Ruby-based mock generation tool CMock, and a C exception library CException. [2] It extends Rake with functionality specific to generating, building, and executing C test suites.
18
+
19
+ Ceedling projects are created with a YAML configuration file. A variety of conventions within the tool simplify generating mocks from C files and assembling suites of unit test functions.
20
+ DESC
21
+ s.licenses = ['MIT']
22
+
23
+ s.metadata = {
24
+ "homepage_uri" => s.homepage,
25
+ "bug_tracker_uri" => "https://github.com/ThrowTheSwitch/Ceedling/issues",
26
+ "documentation_uri" => "https://github.com/ThrowTheSwitch/Ceedling/blob/master/docs/CeedlingPacket.md",
27
+ "mailing_list_uri" => "https://groups.google.com/forum/#!categories/throwtheswitch/ceedling",
28
+ "source_code_uri" => "https://github.com/ThrowTheSwitch/Ceedling"
29
+ }
30
+
31
+ s.required_ruby_version = ">= 2.4.0"
32
+
33
+ s.add_dependency "thor", ">= 0.14.5"
34
+ s.add_dependency "rake", ">= 12.2.1"
35
+ s.add_runtime_dependency "constructor", ">= 1.0.4"
36
+
37
+ # Files needed from submodules
38
+ s.files = []
39
+ s.files += Dir['vendor/**/docs/**/*.pdf', 'docs/**/*.pdf', 'vendor/**/docs/**/*.md', 'docs/**/*.md']
40
+ s.files += Dir['vendor/cmock/lib/**/*.rb']
41
+ s.files += Dir['vendor/cmock/config/**/*.rb']
42
+ s.files += Dir['vendor/cmock/src/**/*.[ch]']
43
+ s.files += Dir['vendor/c_exception/lib/**/*.[ch]']
44
+ s.files += Dir['vendor/unity/auto/**/*.rb']
45
+ s.files += Dir['vendor/unity/src/**/*.[ch]']
46
+
47
+ s.files += Dir['**/*']
48
+ s.test_files = Dir['test/**/*', 'spec/**/*', 'features/**/*']
49
+ s.executables = Dir['bin/**/*'].map{|f| File.basename(f)}
50
+
51
+ s.require_paths = ["lib", "vendor/cmock/lib"]
52
+ end
@@ -1,11 +1,11 @@
1
-
2
- # Setup our load path:
3
- [
4
- 'lib',
5
- 'test',
6
- 'vendor/behaviors/lib',
7
- 'vendor/hardmock/lib',
8
- 'vendor/deep_merge/lib',
9
- ].each do |dir|
10
- $LOAD_PATH.unshift( File.join( File.expand_path(File.dirname(__FILE__) + "/../"), dir) )
11
- end
1
+
2
+ # Setup our load path:
3
+ [
4
+ 'lib',
5
+ 'test',
6
+ 'vendor/behaviors/lib',
7
+ 'vendor/hardmock/lib',
8
+ 'vendor/deep_merge/lib',
9
+ ].each do |dir|
10
+ $LOAD_PATH.unshift( File.join( File.expand_path(File.dirname(__FILE__) + "/../"), dir) )
11
+ end
@@ -1,2134 +1,2213 @@
1
- [All code is copyright © 2010-2012 Ceedling Project
2
- by Mike Karlesky, Mark VanderVoord, and Greg Williams.
3
-
4
- This Documentation Is Released Under a
5
- Creative Commons 3.0 Attribution Share-Alike License]
6
-
7
- What the What?
8
-
9
- Assembling build environments for C projects - especially with
10
- automated unit tests - is a pain. Whether it's Make or Rake or Premake
11
- or what-have-you, set up with an all-purpose build environment
12
- tool is tedious and requires considerable glue code to pull together
13
- the necessary tools and libraries. Ceedling allows you to generate
14
- an entire test and build environment for a C project from a single
15
- YAML configuration file. Ceedling is written in Ruby and works
16
- with the Rake build tool plus other goodness like Unity and CMock —
17
- the unit testing and mocking frameworks for C. Ceedling and
18
- its complementary tools can support the tiniest of embedded
19
- processors, the beefiest 64 bit power houses available, and
20
- everything in between.
21
-
22
- For a build project including unit tests and using the default
23
- toolchain gcc, the configuration file could be as simple as this:
24
-
25
- ```yaml
26
- :project:
27
- :build_root: project/build/
28
- :release_build: TRUE
29
-
30
- :paths:
31
- :test:
32
- - tests/**
33
- :source:
34
- - source/**
35
- ```
36
-
37
- From the command line, to build the release version of your project,
38
- you would simply run `ceedling release`. To run all your unit tests,
39
- you would run `ceedling test:all`. That's it!
40
-
41
- Of course, many more advanced options allow you to configure
42
- your project with a variety of features to meet a variety of needs.
43
- Ceedling can work with practically any command line toolchain
44
- and directory structure – all by way of the configuration file.
45
- Further, because Ceedling piggy backs on Rake, you can add your
46
- own Rake tasks to accomplish project tasks outside of testing
47
- and release builds. A facility for plugins also allows you to
48
- extend Ceedling's capabilities for needs such as custom code
49
- metrics reporting and coverage testing.
50
-
51
- What's with this Name?
52
-
53
- Glad you asked. Ceedling is tailored for unit tested C projects
54
- and is built upon / around Rake (Rake is a Make replacement implemented
55
- in the Ruby scripting language). So, we've got C, our Rake, and
56
- the fertile soil of a build environment in which to grow and tend
57
- your project and its unit tests. Ta da - _Ceedling_.
58
-
59
- What Do You Mean "tailored for unit tested C projects"?
60
-
61
- Well, we like to write unit tests for our C code to make it lean and
62
- mean (that whole [Test-Driven Development][tdd]
63
- thing). Along the way, this style of writing C code spawned two
64
- tools to make the job easier: a unit test framework for C called
65
- _Unity_ and a mocking library called _CMock_. And, though it's
66
- not directly related to testing, a C framework for exception
67
- handling called _CException_ also came along.
68
-
69
- [tdd]: http://en.wikipedia.org/wiki/Test-driven_development
70
-
71
- These tools and frameworks are great, but they require quite
72
- a bit of environment support to pull them all together in a convenient,
73
- usable fashion. We started off with Rakefiles to assemble everything.
74
- These ended up being quite complicated and had to be hand-edited
75
- or created anew for each new project. Ceedling replaces all that
76
- tedium and rework with a configuration file that ties everything
77
- together.
78
-
79
- Though Ceedling is tailored for unit testing, it can also go right ahead
80
- and build your final binary release artifact for you as well. Or,
81
- Ceedling and your tests can live alongside your existing release build
82
- setup. That said, Ceedling is more powerful as a unit test build
83
- environment than it is a general purpose release build environment;
84
- complicated projects including separate bootloaders or multiple library
85
- builds, etc. are not its strong suit.
86
-
87
- Hold on. Back up. Ruby? Rake? YAML? Unity? CMock? CException?
88
-
89
- Seem overwhelming? It's not bad at all, and for the benefits tests
90
- bring us, it's all worth it.
91
-
92
- [Ruby][] is a handy scripting
93
- language like Perl or Python. It's a modern, full featured language
94
- that happens to be quite handy for accomplishing tasks like code
95
- generation or automating one's workflow while developing in
96
- a compiled language such as C.
97
-
98
- [Ruby]: http://www.ruby-lang.org/en/
99
-
100
- [Rake][] is a utility written in Ruby
101
- for accomplishing dependency tracking and task automation
102
- common to building software. It's a modern, more flexible replacement
103
- for [Make][]).
104
- Rakefiles are Ruby files, but they contain build targets similar
105
- in nature to that of Makefiles (but you can also run Ruby code in
106
- your Rakefile).
107
-
108
- [Rake]: http://rubyrake.org/
109
- [Make]: http://en.wikipedia.org/wiki/Make_(software)
110
-
111
- [YAML][] is a "human friendly data serialization standard for all
112
- programming languages." It's kinda like a markup language, but don't
113
- call it that. With a YAML library, you can [serialize][] data structures
114
- to and from the file system in a textual, human readable form. Ceedling
115
- uses a serialized data structure as its configuration input.
116
-
117
- [YAML]: http://en.wikipedia.org/wiki/Yaml
118
- [serialize]: http://en.wikipedia.org/wiki/Serialization
119
-
120
- [Unity] is a [unit test framework][test] for C. It provides facilities
121
- for test assertions, executing tests, and collecting / reporting test
122
- results. Unity derives its name from its implementation in a single C
123
- source file (plus two C header files) and from the nature of its
124
- implementation - Unity will build in any C toolchain and is configurable
125
- for even the very minimalist of processors.
126
-
127
- [Unity]: http://github.com/ThrowTheSwitch/Unity
128
- [test]: http://en.wikipedia.org/wiki/Unit_testing
129
-
130
- [CMock] is a tool written in Ruby able to generate entire
131
- [mock functions][mock] in C code from a given C header file. Mock
132
- functions are invaluable in [interaction-based unit testing][ut].
133
- CMock's generated C code uses Unity.
134
-
135
- [CMock]: http://github.com/ThrowTheSwitch/CMock
136
- [mock]: http://en.wikipedia.org/wiki/Mock_object
137
- [ut]: http://martinfowler.com/articles/mocksArentStubs.html
138
-
139
- [CException] is a C source and header file that provide a simple
140
- [exception mechanism][exn] for C by way of wrapping up the
141
- [setjmp / longjmp][setjmp] standard library calls. Exceptions are a much
142
- cleaner and preferable alternative to managing and passing error codes
143
- up your return call trace.
144
-
145
- [CException]: http://github.com/ThrowTheSwitch/CException
146
- [exn]: http://en.wikipedia.org/wiki/Exception_handling
147
- [setjmp]: http://en.wikipedia.org/wiki/Setjmp.h
148
-
149
- Notes
150
- -----
151
-
152
- * YAML support is included with Ruby - requires no special installation
153
- or configuration.
154
-
155
- * Unity, CMock, and CException are bundled with Ceedling, and
156
- Ceedling is designed to glue them all together for your project
157
- as seamlessly as possible.
158
-
159
-
160
- Installation & Setup: What Exactly Do I Need to Get Started?
161
- ------------------------------------------------------------
162
-
163
- As a [Ruby gem](http://docs.rubygems.org/read/chapter/1):
164
-
165
- 1. [Download and install Ruby](http://www.ruby-lang.org/en/downloads/)
166
-
167
- 2. Use Ruby's command line gem package manager to install Ceedling:
168
- `gem install ceedling`
169
- (Unity, CMock, and CException come along with Ceedling for free)
170
-
171
- 3. Execute Ceedling at command line to create example project
172
- or an empty Ceedling project in your filesystem (executing
173
- `ceedling help` first is, well, helpful).
174
-
175
- Gem install notes:
176
-
177
- 1. Steps 1-2 are a one time affair for your local environment.
178
- When steps 1-2 are completed once, only step 3 is needed for
179
- each new project.
180
-
181
- Getting Started after Ceedling is installed:
182
-
183
- 1. Once Ceedling is installed, you'll want to start to integrate it with new
184
- and old projects alike. If you wanted to start to work on a new project
185
- named `foo`, Ceedling can create the skeleton of the project using `ceedling
186
- new foo`. Likewise if you already have a project named `bar` and you want to
187
- integrate Ceedling into it, you would run `ceedling new bar` and Ceedling
188
- will create any files and directories it needs to run.
189
-
190
- 2. Now that you have Ceedling integrated with a project, you can start using it.
191
- A good starting point to get use to Ceedling either in a new project or an
192
- existing project is creating a new module to get use to Ceedling by issuing
193
- the command `ceedling module:create[unicorn]`.
194
-
195
- General notes:
196
-
197
- 1. Certain advanced features of Ceedling rely on gcc and cpp
198
- as preprocessing tools. In most *nix systems, these tools
199
- are already available. For Windows environments, we recommend
200
- the [mingw project](http://www.mingw.org/) (Minimalist
201
- GNU for Windows). This represents an optional, additional
202
- setup / installation step to complement the list above. Upon
203
- installing mingw ensure your system path is updated or set
204
- [:environment][:path] in your `project.yml` file (see
205
- environment section later in this document).
206
-
207
- 2. To use a project file name other than the default `project.yml`
208
- or place the project file in a directory other than the one
209
- in which you'll run Rake, create an environment variable
210
- `CEEDLING_MAIN_PROJECT_FILE` with your desired project
211
- file path.
212
-
213
- 3. To better understand Rake conventions, Rake execution,
214
- and Rakefiles, consult the [Rake tutorial, examples, and
215
- user guide](http://rubyrake.org/).
216
-
217
- 4. When using Ceedling in Windows environments, a test file name may
218
- not include the sequences “patch” or “setup”. The Windows Installer
219
- Detection Technology (part of UAC), requires administrator
220
- privileges to execute file names with these strings.
221
-
222
- Now What? How Do I Make It GO?
223
- ------------------------------
224
-
225
- We're getting a little ahead of ourselves here, but it's good
226
- context on how to drive this bus. Everything is done via the command
227
- line. We'll cover conventions and how to actually configure
228
- your project in later sections.
229
-
230
- To run tests, build your release artifact, etc., you will be interacting
231
- with Rake on the command line. Ceedling works with Rake to present
232
- you with named tasks that coordinate the file generation and
233
- build steps needed to accomplish something useful. You can also
234
- add your own independent Rake tasks or create plugins to extend
235
- Ceedling (more on this later).
236
-
237
- * `ceedling [no arguments]`:
238
-
239
- Run the default Rake task (conveniently recognized by the name default
240
- by Rake). Neither Rake nor Ceedling provide a default task. Rake will
241
- abort if run without arguments when no default task is defined. You can
242
- conveniently define a default task in the Rakefile discussed in the
243
- preceding setup & installation section of this document.
244
-
245
- * `ceedling -T`:
246
-
247
- List all available Rake tasks with descriptions (Rake tasks without
248
- descriptions are not listed). -T is a command line switch for Rake and
249
- not the same as tasks that follow.
250
-
251
- * `ceedling <tasks...> --trace`:
252
-
253
- For advanced users troubleshooting a confusing build error, debug
254
- Ceedling or a plugin, --trace provides a stack trace of dependencies
255
- walked during task execution and any Ruby failures along the way. Note
256
- that --trace is a command line switch for Rake and is not the same as
257
- tasks that follow.
258
-
259
- * `ceedling environment`:
260
-
261
- List all configured environment variable names and string values. This
262
- task is helpful in verifying the evaluation of any Ruby expressions in
263
- the [:environment] section of your config file.`: Note: Ceedling may
264
- set some convenience environment variables by default.
265
-
266
- * `ceedling paths:*`:
267
-
268
- List all paths collected from [:paths] entries in your YAML config
269
- file where * is the name of any section contained in [:paths]. This
270
- task is helpful in verifying the expansion of path wildcards / globs
271
- specified in the [:paths] section of your config file.
272
-
273
- * `ceedling files:assembly`
274
- * `ceedling files:header`
275
- * `ceedling files:source`
276
- * `ceedling files:test`
277
-
278
- List all files and file counts collected from the relevant search
279
- paths specified by the [:paths] entries of your YAML config file. The
280
- files:assembly task will only be available if assembly support is
281
- enabled in the [:release_build] section of your configuration file.
282
-
283
- * `ceedling options:*`:
284
-
285
- Load and merge configuration settings into the main project
286
- configuration. Each task is named after a *.yml file found in the
287
- configured options directory. See documentation for the configuration
288
- setting [:project][:options_paths] and for options files in advanced
289
- topics.
290
-
291
- * `ceedling test:all`:
292
-
293
- Run all unit tests (rebuilding anything that's changed along the way).
294
-
295
- * `ceedling test:build_only`:
296
-
297
- Build all unit tests, object files and executable but not run them.
298
-
299
- * `ceedling test:delta`:
300
-
301
- Run only those unit tests for which the source or test files have
302
- changed (i.e. incremental build). Note: with the
303
- [:project][:use_test_preprocessor] configuration file option set,
304
- runner files are always regenerated limiting the total efficiency this
305
- text execution option can afford.
306
-
307
- * `ceedling test:*`:
308
-
309
- Execute the named test file or the named source file that has an
310
- accompanying test. No path. Examples: ceedling test:foo.c or ceedling
311
- test:test_foo.c
312
-
313
- * `ceedling test:pattern[*]`:
314
-
315
- Execute any tests whose name and/or path match the regular expression
316
- pattern (case sensitive). Example: ceedling "test:pattern[(I|i)nit]" will
317
- execute all tests named for initialization testing. Note: quotes may
318
- be necessary around the ceedling parameter to distinguish regex characters
319
- from command line operators.
320
-
321
- * `ceedling test:path[*]`:
322
-
323
- Execute any tests whose path contains the given string (case
324
- sensitive). Example: ceedling test:path[foo/bar] will execute all tests
325
- whose path contains foo/bar. Note: both directory separator characters
326
- / and \ are valid.
327
-
328
- * `ceedling release`:
329
-
330
- Build all source into a release artifact (if the release build option
331
- is configured).
332
-
333
- * `ceedling release:compile:*`:
334
-
335
- Sometimes you just need to compile a single file dagnabit. Example:
336
- ceedling release:compile:foo.c
337
-
338
- * `ceedling release:assemble:*`:
339
-
340
- Sometimes you just need to assemble a single file doggonit. Example:
341
- ceedling release:assemble:foo.s
342
-
343
- * `ceedling module:create[Filename]`:
344
- * `ceedling module:create[<Path:>Filename]`:
345
-
346
- It's often helpful to create a file automatically. What's better than
347
- that? Creating a source file, a header file, and a corresponding test
348
- file all in one step!
349
-
350
- There are also patterns which can be specified to automatically generate
351
- a bunch of files. Try `ceedling module:create[Poodles,mch]` for example!
352
-
353
- The module generator has several options you can configure.
354
- F.e. Generating the source/header/test file in a subdirectory (by adding <Path> when calling module:create).
355
- For more info, refer to the [Module Generator](https://github.com/ThrowTheSwitch/Ceedling/blob/master/docs/CeedlingPacket.md#module-generator) section.
356
-
357
- * `ceedling logging <tasks...>`:
358
-
359
- Enable logging to <build path>/logs. Must come before test and release
360
- tasks to log their steps and output. Log names are a concatenation of
361
- project, user, and option files loaded. User and option files are
362
- documented in the advanced topics section of this document.
363
-
364
- * `ceedling verbosity[x] <tasks...>`:
365
-
366
- Change the default verbosity level. [x] ranges from 0 (quiet) to 4
367
- (obnoxious). Level [3] is the default. The verbosity task must precede
368
- all tasks in the command line list for which output is desired to be
369
- seen. Verbosity settings are generally most meaningful in conjunction
370
- with test and release tasks.
371
-
372
- * `ceedling summary`:
373
-
374
- If plugins are enabled, this task will execute the summary method of
375
- any plugins supporting it. This task is intended to provide a quick
376
- roundup of build artifact metrics without re-running any part of the
377
- build.
378
-
379
- * `ceedling clean`:
380
-
381
- Deletes all toolchain binary artifacts (object files, executables),
382
- test results, and any temporary files. Clean produces no output at the
383
- command line unless verbosity has been set to an appreciable level.
384
-
385
- * `ceedling clobber`:
386
-
387
- Extends clean task's behavior to also remove generated files: test
388
- runners, mocks, preprocessor output. Clobber produces no output at the
389
- command line unless verbosity has been set to an appreciable level.
390
-
391
- To better understand Rake conventions, Rake execution, and
392
- Rakefiles, consult the [Rake tutorial, examples, and user guide][guide].
393
-
394
- [guide]: http://rubyrake.org/
395
-
396
- At present, none of Ceedling's commands provide persistence.
397
- That is, they must each be specified at the command line each time
398
- they are needed. For instance, Ceedling's verbosity command
399
- only affects output at the time it's run.
400
-
401
- Individual test and release file tasks
402
- are not listed in `-T` output. Because so many files may be present
403
- it's unwieldy to list them all.
404
-
405
- Multiple rake tasks can be executed at the command line (order
406
- is executed as provided). For example, `ceed
407
- clobber test:all release` will removed all generated files;
408
- build and run all tests; and then build all source - in that order.
409
- If any Rake task fails along the way, execution halts before the
410
- next task.
411
-
412
- The `clobber` task removes certain build directories in the
413
- course of deleting generated files. In general, it's best not
414
- to add to source control any Ceedling generated directories
415
- below the root of your top-level build directory. That is, leave
416
- anything Ceedling & its accompanying tools generate out of source
417
- control (but go ahead and add the top-level build directory that
418
- holds all that stuff). Also, since Ceedling is pretty smart about
419
- what it rebuilds and regenerates, you needn't clobber often.
420
-
421
- Important Conventions
422
- =====================
423
-
424
- Directory Structure, Filenames & Extensions
425
- -------------------------------------------
426
-
427
- Much of Ceedling's functionality is driven by collecting files
428
- matching certain patterns inside the paths it's configured
429
- to search. See the documentation for the [:extensions] section
430
- of your configuration file (found later in this document) to
431
- configure the file extensions Ceedling uses to match and collect
432
- files. Test file naming is covered later in this section.
433
-
434
- Test files and source files must be segregated by directories.
435
- Any directory structure will do. Tests can be held in subdirectories
436
- within source directories, or tests and source directories
437
- can be wholly separated at the top of your project's directory
438
- tree.
439
-
440
- Search Path Order
441
- -----------------
442
-
443
- When Ceedling searches for files (e.g. looking for header files
444
- to mock) or when it provides search paths to any of the default
445
- gcc toolchain executables, it organizes / prioritizes its search
446
- paths. The order is always: test paths, support paths, source
447
- paths, and then include paths. This can be useful, for instance,
448
- in certain testing scenarios where we desire Ceedling or a compiler
449
- to find a stand-in header file in our support directory before
450
- the actual source header file of the same name.
451
-
452
- This convention only holds when Ceedling is using its default
453
- tool configurations and / or when tests are involved. If you define
454
- your own tools in the configuration file (see the [:tools] section
455
- documented later in this here document), you have complete control
456
- over what directories are searched and in what order. Further,
457
- test and support directories are only searched when appropriate.
458
- That is, when running a release build, test and support directories
459
- are not used at all.
460
-
461
- Source Files & Binary Release Artifacts
462
- ---------------------------------------
463
-
464
- Your binary release artifact results from the compilation and
465
- linking of all source files Ceedling finds in the specified source
466
- directories. At present only source files with a single (configurable)
467
- extension are recognized. That is, *.c and *.cc files will not
468
- both be recognized - only one or the other. See the configuration
469
- options and defaults in the documentation for the [:extensions]
470
- sections of your configuration file (found later in this document).
471
-
472
- Test Files & Executable Test Fixtures
473
- -------------------------------------
474
-
475
- Ceedling builds each individual test file with its accompanying
476
- source file(s) into a single, monolithic test fixture executable.
477
- Test files are recognized by a naming convention: a (configurable)
478
- prefix such as "`test_`" in the file name with the same file extension
479
- as used by your C source files. See the configuration options
480
- and defaults in the documentation for the [:project] and [:extensions]
481
- sections of your configuration file (found later in this document).
482
- Depending on your configuration options, Ceedling can recognize
483
- a variety of test file naming patterns in your test search paths.
484
- For example: `test_some_super_functionality.c`, `TestYourSourceFile.cc`,
485
- or `testing_MyAwesomeCode.C` could each be valid test file
486
- names. Note, however, that Ceedling can recognize only one test
487
- file naming convention per project.
488
-
489
- Ceedling knows what files to compile and link into each individual
490
- test executable by way of the #include list contained in each
491
- test file. Any C source files in the configured search directories
492
- that correspond to the header files included in a test file will
493
- be compiled and linked into the resulting test fixture executable.
494
- From this same #include list, Ceedling knows which files to mock
495
- and compile and link into the test executable (if you use mocks
496
- in your tests). That was a lot of clauses and information in a very
497
- few sentences; the example that follows in a bit will make it clearer.
498
-
499
- By naming your test functions according to convention, Ceedling
500
- will extract and collect into a runner C file calls to all your
501
- test case functions. This runner file handles all the execution
502
- minutiae so that your test file can be quite simple and so that
503
- you never forget to wire up a test function to be executed. In this
504
- generated runner lives the `main()` entry point for the resulting
505
- test executable. There are no configuration options for the
506
- naming convention of your test case functions. A test case function
507
- signature must have these three elements: void return, void
508
- parameter list, and the function name prepended with lowercase
509
- "`test`". In other words, a test function signature should look
510
- like this: `void test``[any name you like]``(void)`.
511
-
512
- A commented sample test file follows on the next page. Also, see
513
- the sample project contained in the Ceedling documentation
514
- bundle.
515
-
516
- ```c
517
- // test_foo.c -----------------------------------------------
518
- #include "unity.h" // compile/link in Unity test framework
519
- #include "types.h" // header file with no *.c file -- no compilation/linking
520
- #include "foo.h" // source file foo.c under test
521
- #include "mock_bar.h" // bar.h will be found and mocked as mock_bar.c + compiled/linked in;
522
- // foo.c includes bar.h and uses functions declared in it
523
- #include "mock_baz.h" // baz.h will be found and mocked as mock_baz.c + compiled/linked in
524
- // foo.c includes baz.h and uses functions declared in it
525
-
526
-
527
- void setUp(void) {} // every test file requires this function;
528
- // setUp() is called by the generated runner before each test case function
529
-
530
- void tearDown(void) {} // every test file requires this function;
531
- // tearDown() is called by the generated runner after each test case function
532
-
533
- // a test case function
534
- void test_Foo_Function1_should_Call_Bar_AndGrill(void)
535
- {
536
- Bar_AndGrill_Expect(); // setup function from mock_bar.c that instructs our
537
- // framework to expect Bar_AndGrill() to be called once
538
- TEST_ASSERT_EQUAL(0xFF, Foo_Function1()); // assertion provided by Unity
539
- // Foo_Function1() calls Bar_AndGrill() & returns a byte
540
- }
541
-
542
- // another test case function
543
- void test_Foo_Function2_should_Call_Baz_Tec(void)
544
- {
545
- Baz_Tec_ExpectAnd_Return(1); // setup function provided by mock_baz.c that instructs our
546
- // framework to expect Baz_Tec() to be called once and return 1
547
- TEST_ASSERT_TRUE(Foo_Function2()); // assertion provided by Unity
548
- }
549
-
550
- // end of test_foo.c ----------------------------------------
551
- ```
552
-
553
- From the test file specified above Ceedling will generate `test_foo_runner.c`;
554
- this runner file will contain `main()` and call both of the example
555
- test case functions.
556
-
557
- The final test executable will be `test_foo.exe` (for Windows
558
- machines or `test_foo.out` for *nix systems - depending on default
559
- or configured file extensions). Based on the #include list above,
560
- the test executable will be the output of the linker having processed
561
- `unity.o`, `foo.o`, `mock_bar.o`, `mock_baz.o`, `test_foo.o`,
562
- and `test_foo_runner.o`. Ceedling finds the files, generates
563
- mocks, generates a runner, compiles all the files, and links
564
- everything into the test executable. Ceedling will then run
565
- the test executable and collect test results from it to be reported
566
- to the developer at the command line.
567
-
568
- For more on the assertions and mocks shown, consult the documentation
569
- for Unity and CMock.
570
-
571
- The Magic of Dependency Tracking
572
- --------------------------------
573
-
574
- Ceedling is pretty smart in using Rake to build up your project's
575
- dependencies. This means that Ceedling automagically rebuilds
576
- all the appropriate files in your project when necessary: when
577
- your configuration changes, Ceedling or any of the other tools
578
- are updated, or your source or test files change. For instance,
579
- if you modify a header file that is mocked, Ceedling will ensure
580
- that the mock is regenerated and all tests that use that mock are
581
- rebuilt and re-run when you initiate a relevant testing task.
582
- When you see things rebuilding, it's for a good reason. Ceedling
583
- attempts to regenerate and rebuild only what's needed for a given
584
- execution of a task. In the case of large projects, assembling
585
- dependencies and acting upon them can cause some delay in executing
586
- tasks.
587
-
588
- With one exception, the trigger to rebuild or regenerate a file
589
- is always a disparity in timestamps between a target file and
590
- its source - if an input file is newer than its target dependency,
591
- the target is rebuilt or regenerated. For example, if the C source
592
- file from which an object file is compiled is newer than that object
593
- file on disk, recompilation will occur (of course, if no object
594
- file exists on disk, compilation will always occur). The one
595
- exception to this dependency behavior is specific to your input
596
- configuration. Only if your logical configuration changes
597
- will a system-wide rebuild occur. Reorganizing your input configuration
598
- or otherwise updating its file timestamp without modifying
599
- the values within the file will not trigger a rebuild. This behavior
600
- handles the various ways in which your input configuration can
601
- change (discussed later in this document) without having changed
602
- your actual project YAML file.
603
-
604
- Ceedling needs a bit of help to accomplish its magic with deep
605
- dependencies. Shallow dependencies are straightforward:
606
- a mock is dependent on the header file from which it's generated,
607
- a test file is dependent upon the source files it includes (see
608
- the preceding conventions section), etc. Ceedling handles
609
- these "out of the box." Deep dependencies are specifically a
610
- C-related phenomenon and occur as a consequence of include statements
611
- within C source files. Say a source file includes a header file
612
- and that header file in turn includes another header file which
613
- includes still another header file. A change to the deepest header
614
- file should trigger a recompilation of the source file, a relinking
615
- of all the object files comprising a test fixture, and a new execution
616
- of that test fixture.
617
-
618
- Ceedling can handle deep dependencies but only with the help
619
- of a C preprocessor. Ceedling is quite capable, but a full C preprocessor
620
- it ain't. Your project can be configured to use a C preprocessor
621
- or not. Simple projects or large projects constructed so as to
622
- be quite flat in their include structure generally don't need
623
- deep dependency preprocessing - and can enjoy the benefits of
624
- faster execution. Legacy code, on the other hand, will almost
625
- always want to be tested with deep preprocessing enabled. Set
626
- up of the C preprocessor is covered in the documentation for the
627
- [:project] and [:tools] section of the configuration file (later
628
- in this document). Ceedling contains all the configuration
629
- necessary to use the gcc preprocessor by default. That is, as
630
- long as gcc is in your system search path, deep preprocessing
631
- of deep dependencies is available to you by simply enabling it
632
- in your project configuration file.
633
-
634
- Ceedling's Build Output
635
- -----------------------
636
-
637
- Ceedling requires a top-level build directory for all the stuff
638
- that it, the accompanying test tools, and your toolchain generate.
639
- That build directory's location is configured in the [:project]
640
- section of your configuration file (discussed later). There
641
- can be a ton of generated files. By and large, you can live a full
642
- and meaningful life knowing absolutely nothing at all about
643
- the files and directories generated below the root build directory.
644
-
645
- As noted already, it's good practice to add your top-level build
646
- directory to source control but nothing generated beneath it.
647
- You'll spare yourself headache if you let Ceedling delete and
648
- regenerate files and directories in a non-versioned corner
649
- of your project's filesystem beneath the top-level build directory.
650
-
651
- The `artifacts` directory is the one and only directory you may
652
- want to know about beneath the top-level build directory. The
653
- subdirectories beneath `artifacts` will hold your binary release
654
- target output (if your project is configured for release builds)
655
- and will serve as the conventional location for plugin output.
656
- This directory structure was chosen specifically because it
657
- tends to work nicely with Continuous Integration setups that
658
- recognize and list build artifacts for retrieval / download.
659
-
660
- The Almighty Project Configuration File (in Glorious YAML)
661
- ----------------------------------------------------------
662
-
663
- Please consult YAML documentation for the finer points of format
664
- and to understand details of our YAML-based configuration file.
665
- We recommend [Wikipedia's entry on YAML](http://en.wikipedia.org/wiki/Yaml)
666
- for this. A few highlights from that reference page:
667
-
668
- * YAML streams are encoded using the set of printable Unicode
669
- characters, either in UTF-8 or UTF-16
670
-
671
- * Whitespace indentation is used to denote structure; however
672
- tab characters are never allowed as indentation
673
-
674
- * Comments begin with the number sign ( # ), can start anywhere
675
- on a line, and continue until the end of the line unless enclosed
676
- by quotes
677
-
678
- * List members are denoted by a leading hyphen ( - ) with one member
679
- per line, or enclosed in square brackets ( [ ] ) and separated
680
- by comma space ( , )
681
-
682
- * Hashes are represented using the colon space ( : ) in the form
683
- key: value, either one per line or enclosed in curly braces
684
- ( { } ) and separated by comma space ( , )
685
-
686
- * Strings (scalars) are ordinarily unquoted, but may be enclosed
687
- in double-quotes ( " ), or single-quotes ( ' )
688
-
689
- * YAML requires that colons and commas used as list separators
690
- be followed by a space so that scalar values containing embedded
691
- punctuation can generally be represented without needing
692
- to be enclosed in quotes
693
-
694
- * Repeated nodes are initially denoted by an ampersand ( & ) and
695
- thereafter referenced with an asterisk ( * )
696
-
697
- Notes on what follows:
698
-
699
- * Each of the following sections represent top-level entries
700
- in the YAML configuration file.
701
-
702
- * Unless explicitly specified in the configuration file, default
703
- values are used by Ceedling.
704
-
705
- * These three settings, at minimum, must be specified:
706
- * [:project][:build_root]
707
- * [:paths][:source]
708
- * [:paths][:test]
709
-
710
- * As much as is possible, Ceedling validates your settings in
711
- properly formed YAML.
712
-
713
- * Improperly formed YAML will cause a Ruby error when the YAML
714
- is parsed. This is usually accompanied by a complaint with
715
- line and column number pointing into the project file.
716
-
717
- * Certain advanced features rely on gcc and cpp as preprocessing
718
- tools. In most *nix systems, these tools are already available.
719
- For Windows environments, we recommend the [mingw project](http://www.mingw.org/)
720
- (Minimalist GNU for Windows).
721
-
722
- * Ceedling is primarily meant as a build tool to support automated
723
- unit testing. All the heavy lifting is involved there. Creating
724
- a simple binary release build artifact is quite trivial in
725
- comparison. Consequently, most default options and the construction
726
- of Ceedling itself is skewed towards supporting testing though
727
- Ceedling can, of course, build your binary release artifact
728
- as well. Note that complex binary release artifacts (e.g.
729
- application + bootloader or multiple libraries) are beyond
730
- Ceedling's release build ability.
731
-
732
- Conventions / features of Ceedling-specific YAML:
733
-
734
- * Any second tier setting keys anywhere in YAML whose names end
735
- in `_path` or `_paths` are automagically processed like all
736
- Ceedling-specific paths in the YAML to have consistent directory
737
- separators (i.e. "/") and to take advantage of inline Ruby
738
- string expansion (see [:environment] setting below for further
739
- explanation of string expansion).
740
-
741
- **Let's Be Careful Out There:** Ceedling performs validation
742
- on the values you set in your configuration file (this assumes
743
- your YAML is correct and will not fail format parsing, of course).
744
- That said, validation is limited to only those settings Ceedling
745
- uses and those that can be reasonably validated. Ceedling does
746
- not limit what can exist within your configuration file. In this
747
- way, you can take full advantage of YAML as well as add sections
748
- and values for use in your own custom plugins (documented later).
749
- The consequence of this is simple but important. A misspelled
750
- configuration section name or value name is unlikely to cause
751
- Ceedling any trouble. Ceedling will happily process that section
752
- or value and simply use the properly spelled default maintained
753
- internally - thus leading to unexpected behavior without warning.
754
-
755
- project: global project settings
756
-
757
- * `build_root`:
758
-
759
- Top level directory into which generated path structure and files are
760
- placed. Note: this is one of the handful of configuration values that
761
- must be set. The specified path can be absolute or relative to your
762
- working directory.
763
-
764
- **Default**: (none)
765
-
766
- * `use_exceptions`:
767
-
768
- Configures the build environment to make use of CException. Note that
769
- if you do not use exceptions, there's no harm in leaving this as its
770
- default value.
771
-
772
- **Default**: TRUE
773
-
774
- * `use_mocks`:
775
-
776
- Configures the build environment to make use of CMock. Note that if
777
- you do not use mocks, there's no harm in leaving this setting as its
778
- default value.
779
-
780
- **Default**: TRUE
781
-
782
- * `use_test_preprocessor`:
783
-
784
- This option allows Ceedling to work with test files that contain
785
- conditional compilation statements (e.g. #ifdef) and header files you
786
- wish to mock that contain conditional preprocessor statements and/or
787
- macros.
788
-
789
- Ceedling and CMock are advanced tools with sophisticated parsers.
790
- However, they do not include entire C language preprocessors.
791
- Consequently, with this option enabled, Ceedling will use gcc's
792
- preprocessing mode and the cpp preprocessor tool to strip down /
793
- expand test files and headers to their applicable content which can
794
- then be processed by Ceedling and CMock.
795
-
796
- With this option enabled, the gcc & cpp tools must exist in an
797
- accessible system search path and test runner files are always
798
- regenerated.
799
-
800
- **Default**: FALSE
801
-
802
- * `use_deep_dependencies`:
803
-
804
- The base rules and tasks that Ceedling creates using Rake capture most
805
- of the dependencies within a standard project (e.g. when the source
806
- file accompanying a test file changes, the corresponding test fixture
807
- executable will be rebuilt when tests are re-run). However, deep
808
- dependencies cannot be captured this way. If a typedef or macro
809
- changes in a header file three levels of #include statements deep,
810
- this option allows the appropriate incremental build actions to occur
811
- for both test execution and release builds.
812
-
813
- This is accomplished by using the dependencies discovery mode of gcc.
814
- With this option enabled, gcc must exist in an accessible system
815
- search path.
816
-
817
- **Default**: FALSE
818
-
819
- * `generate_deep_dependencies`:
820
-
821
- When `use_deep_dependencies` is set to TRUE, Ceedling will run a separate
822
- build step to generate the deep dependencies. If you are using gcc as your
823
- primary compiler, or another compiler that can generate makefile rules as
824
- a side effect of compilation, then you can set this to FALSE to avoid the
825
- extra build step but still use the deep dependencies data when deciding
826
- which source files to rebuild.
827
-
828
- **Default**: TRUE
829
-
830
- * `test_file_prefix`:
831
-
832
- Ceedling collects test files by convention from within the test file
833
- search paths. The convention includes a unique name prefix and a file
834
- extension matching that of source files.
835
-
836
- Why not simply recognize all files in test directories as test files?
837
- By using the given convention, we have greater flexibility in what we
838
- do with C files in the test directories.
839
-
840
- **Default**: "test_"
841
-
842
- * `options_paths`:
843
-
844
- Just as you may have various build configurations for your source
845
- codebase, you may need variations of your project configuration.
846
-
847
- By specifying options paths, Ceedling will search for other project
848
- YAML files, make command line tasks available (ceedling options:variation
849
- for a variation.yml file), and merge the project configuration of
850
- these option files in with the main project file at runtime. See
851
- advanced topics.
852
-
853
- Note these Rake tasks at the command line - like verbosity or logging
854
- control - must come before the test or release task they are meant to
855
- modify.
856
-
857
- **Default**: [] (empty)
858
-
859
- * `release_build`:
860
-
861
- When enabled, a release Rake task is exposed. This configuration
862
- option requires a corresponding release compiler and linker to be
863
- defined (gcc is used as the default).
864
-
865
- More release configuration options are available in the release_build
866
- section.
867
-
868
- **Default**: FALSE
869
-
870
-
871
- Example `[:project]` YAML blurb
872
-
873
- ```yaml
874
- :project:
875
- :build_root: project_awesome/build
876
- :use_exceptions: FALSE
877
- :use_test_preprocessor: TRUE
878
- :use_deep_dependencies: TRUE
879
- :options_paths:
880
- - project/options
881
- - external/shared/options
882
- :release_build: TRUE
883
- ```
884
-
885
- Ceedling is primarily concerned with facilitating the somewhat
886
- complicated mechanics of automating unit tests. The same mechanisms
887
- are easily capable of building a final release binary artifact
888
- (i.e. non test code; the thing that is your final working software
889
- that you execute on target hardware).
890
-
891
-
892
- * `output`:
893
-
894
- The name of your release build binary artifact to be found in <build
895
- path>/artifacts/release. Ceedling sets the default artifact file
896
- extension to that as is explicitly specified in the [:extensions]
897
- section or as is system specific otherwise.
898
-
899
- **Default**: `project.exe` or `project.out`
900
-
901
- * `use_assembly`:
902
-
903
- If assembly code is present in the source tree, this option causes
904
- Ceedling to create appropriate build directories and use an assembler
905
- tool (default is the GNU tool as - override available in the [:tools]
906
- section.
907
-
908
- **Default**: FALSE
909
-
910
- * `artifacts`:
911
-
912
- By default, Ceedling copies to the <build path>/artifacts/release
913
- directory the output of the release linker and (optionally) a map
914
- file. Many toolchains produce other important output files as well.
915
- Adding a file path to this list will cause Ceedling to copy that file
916
- to the artifacts directory. The artifacts directory is helpful for
917
- organizing important build output files and provides a central place
918
- for tools such as Continuous Integration servers to point to build
919
- output. Selectively copying files prevents incidental build cruft from
920
- needlessly appearing in the artifacts directory. Note that inline Ruby
921
- string replacement is available in the artifacts paths (see discussion
922
- in the [:environment] section).
923
-
924
- **Default**: [] (empty)
925
-
926
- Example `[:release_build]` YAML blurb
927
-
928
- ```yaml
929
- :release_build:
930
- :output: top_secret.bin
931
- :use_assembly: TRUE
932
- :artifacts:
933
- - build/release/out/c/top_secret.s19
934
- ```
935
-
936
- **paths**: options controlling search paths for source and header
937
- (and assembly) files
938
-
939
- * `test`:
940
-
941
- All C files containing unit test code. Note: this is one of the
942
- handful of configuration values that must be set.
943
-
944
- **Default**: [] (empty)
945
-
946
- * `source`:
947
-
948
- All C files containing release code (code to be tested). Note: this is
949
- one of the handful of configuration values that must be set.
950
-
951
- **Default**: [] (empty)
952
-
953
- * `support`:
954
-
955
- Any C files you might need to aid your unit testing. For example, on
956
- occasion, you may need to create a header file containing a subset of
957
- function signatures matching those elsewhere in your code (e.g. a
958
- subset of your OS functions, a portion of a library API, etc.). Why?
959
- To provide finer grained control over mock function substitution or
960
- limiting the size of the generated mocks.
961
-
962
- **Default**: [] (empty)
963
-
964
- * `include`:
965
-
966
- Any header files not already in the source search path. Note there's
967
- no practical distinction between this search path and the source
968
- search path; it's merely to provide options or to support any
969
- peculiar source tree organization.
970
-
971
- **Default**: [] (empty)
972
-
973
- * `test_toolchain_include`:
974
-
975
- System header files needed by the test toolchain - should your
976
- compiler be unable to find them, finds the wrong system include search
977
- path, or you need a creative solution to a tricky technical problem.
978
- Note that if you configure your own toolchain in the [:tools] section,
979
- this search path is largely meaningless to you. However, this is a
980
- convenient way to control the system include path should you rely on
981
- the default gcc tools.
982
-
983
- **Default**: [] (empty)
984
-
985
- * `release_toolchain_include`:
986
-
987
- Same as preceding albeit related to the release toolchain.
988
-
989
- **Default**: [] (empty)
990
-
991
- * `<custom>`
992
-
993
- Any paths you specify for custom list. List is available to tool
994
- configurations and/or plugins. Note a distinction. The preceding names
995
- are recognized internally to Ceedling and the path lists are used to
996
- build collections of files contained in those paths. A custom list is
997
- just that - a custom list of paths.
998
-
999
- Notes on path grammar within the [:paths] section:
1000
-
1001
- * Order of search paths listed in [:paths] is preserved when used by an
1002
- entry in the [:tools] section
1003
-
1004
- * Wherever multiple path lists are combined for use Ceedling prioritizes
1005
- path groups as follows:
1006
- test paths, support paths, source paths, include paths.
1007
-
1008
- This can be useful, for instance, in certain testing scenarios where
1009
- we desire Ceedling or the compiler to find a stand-in header file before
1010
- the actual source header file of the same name.
1011
-
1012
- * Paths:
1013
-
1014
- 1. can be absolute or relative
1015
-
1016
- 2. can be singly explicit - a single fully specified path
1017
-
1018
- 3. can include a glob operator (more on this below)
1019
-
1020
- 4. can use inline Ruby string replacement (see [:environment]
1021
- section for more)
1022
-
1023
- 5. default as an addition to a specific search list (more on this
1024
- in the examples)
1025
-
1026
- 6. can act to subtract from a glob included in the path list (more
1027
- on this in the examples)
1028
-
1029
- [Globs](http://ruby.about.com/od/beginningruby/a/dir2.htm)
1030
- as used by Ceedling are wildcards for specifying directories
1031
- without the need to list each and every required search path.
1032
- Ceedling globs operate just as Ruby globs except that they are
1033
- limited to matching directories and not files. Glob operators
1034
- include the following * ** ? [-] {,} (note: this list is space separated
1035
- and not comma separated as commas are used within the bracket
1036
- operators).
1037
-
1038
- * `*`:
1039
-
1040
- All subdirectories of depth 1 below the parent path and including the
1041
- parent path
1042
-
1043
- * `**`:
1044
-
1045
- All subdirectories recursively discovered below the parent path and
1046
- including the parent path
1047
-
1048
- * `?`:
1049
-
1050
- Single alphanumeric character wildcard
1051
-
1052
- * `[x-y]`:
1053
-
1054
- Single alphanumeric character as found in the specified range
1055
-
1056
- * `{x,y}`:
1057
-
1058
- Single alphanumeric character from the specified list
1059
-
1060
- Example [:paths] YAML blurbs
1061
-
1062
- ```yaml
1063
- :paths:
1064
- :source: #together the following comprise all source search paths
1065
- - project/source/* #expansion yields all subdirectories of depth 1 plus parent directory
1066
- - project/lib #single path
1067
- :test: #all test search paths
1068
- - project/**/test? #expansion yields any subdirectory found anywhere in the project that
1069
- #begins with "test" and contains 5 characters
1070
-
1071
- :paths:
1072
- :source: #all source search paths
1073
- - +:project/source/** #all subdirectories recursively discovered plus parent directory
1074
- - -:project/source/os/generated #subtract os/generated directory from expansion of above glob
1075
- #note that '+:' notation is merely aesthetic; default is to add
1076
-
1077
- :test: #all test search paths
1078
- - project/test/bootloader #explicit, single search paths (searched in the order specified)
1079
- - project/test/application
1080
- - project/test/utilities
1081
-
1082
- :custom: #custom path list
1083
- - "#{PROJECT_ROOT}/other" #inline Ruby string expansion
1084
- ```
1085
-
1086
- Globs and inline Ruby string expansion can require trial and
1087
- error to arrive at your intended results. Use the `ceedling paths:*`
1088
- command line options (documented in preceding section) to verify
1089
- your settings.
1090
-
1091
- Ceedling relies on file collections automagically assembled
1092
- from paths, globs, and file extensions. File collections greatly
1093
- simplify project set up. However, sometimes you need to remove
1094
- from or add individual files to those collections.
1095
-
1096
-
1097
- * `test`:
1098
-
1099
- Modify the collection of unit test C files.
1100
-
1101
- **Default**: [] (empty)
1102
-
1103
- * `source`:
1104
-
1105
- Modify the collection of all source files used in unit test builds and release builds.
1106
-
1107
- **Default**: [] (empty)
1108
-
1109
- * `assembly`:
1110
-
1111
- Modify the (optional) collection of assembly files used in release builds.
1112
-
1113
- **Default**: [] (empty)
1114
-
1115
- * `include`:
1116
-
1117
- Modify the collection of all source header files used in unit test builds (e.g. for mocking) and release builds.
1118
-
1119
- **Default**: [] (empty)
1120
-
1121
- * `support`:
1122
-
1123
- Modify the collection of supporting C files available to unit tests builds.
1124
-
1125
- **Default**: [] (empty)
1126
-
1127
-
1128
- Note: All path grammar documented in [:paths] section applies
1129
- to [:files] path entries - albeit at the file path level and not
1130
- the directory level.
1131
-
1132
- Example [:files] YAML blurb
1133
-
1134
- ```yaml
1135
- :files:
1136
- :source:
1137
- - callbacks/comm.c # entry defaults to file addition
1138
- - +:callbacks/comm*.c # add all comm files matching glob pattern
1139
- - -:source/board/atm134.c # not our board
1140
- :test:
1141
- - -:test/io/test_output_manager.c # remove unit tests from test build
1142
- ```
1143
-
1144
- **environment:** inserts environment variables into the shell
1145
- instance executing configured tools
1146
-
1147
- Ceedling creates environment variables from any key / value
1148
- pairs in the environment section. Keys become an environment
1149
- variable name in uppercase. The values are strings assigned
1150
- to those environment variables. These value strings are either
1151
- simple string values in YAML or the concatenation of a YAML array.
1152
-
1153
- Ceedling is able to execute inline Ruby string substitution
1154
- code to set environment variables. This evaluation occurs when
1155
- the project file is first processed for any environment pair's
1156
- value string including the Ruby string substitution pattern
1157
- `#{…}`. Note that environment value strings that _begin_ with
1158
- this pattern should always be enclosed in quotes. YAML defaults
1159
- to processing unquoted text as a string; quoting text is optional.
1160
- If an environment pair's value string begins with the Ruby string
1161
- substitution pattern, YAML will interpret the string as a Ruby
1162
- comment (because of the `#`). Enclosing each environment value
1163
- string in quotes is a safe practice.
1164
-
1165
- [:environment] entries are processed in the configured order
1166
- (later entries can reference earlier entries).
1167
-
1168
- Special case: PATH handling
1169
-
1170
- In the specific case of specifying an environment key named _path_,
1171
- an array of string values will be concatenated with the appropriate
1172
- platform-specific path separation character (e.g. ':' on *nix,
1173
- ';' on Windows). All other instances of environment keys assigned
1174
- YAML arrays use simple concatenation.
1175
-
1176
- Example [:environment] YAML blurb
1177
-
1178
- ```yaml
1179
- :environment:
1180
- - :license_server: gizmo.intranet #LICENSE_SERVER set with value "gizmo.intranet"
1181
- - :license: "#{`license.exe`}" #LICENSE set to string generated from shelling out to
1182
- #execute license.exe; note use of enclosing quotes
1183
-
1184
- - :path: #concatenated with path separator (see special case above)
1185
- - Tools/gizmo/bin #prepend existing PATH with gizmo path
1186
- - "#{ENV['PATH']}" #pattern #{…} triggers ruby evaluation string substitution
1187
- #note: value string must be quoted because of '#'
1188
-
1189
- - :logfile: system/logs/thingamabob.log #LOGFILE set with path for a log file
1190
- ```
1191
-
1192
- **extension**: configure file name extensions used to collect lists of files searched in [:paths]
1193
-
1194
- * `header`:
1195
-
1196
- C header files
1197
-
1198
- **Default**: .h
1199
-
1200
- * `source`:
1201
-
1202
- C code files (whether source or test files)
1203
-
1204
- **Default**: .c
1205
-
1206
- * `assembly`:
1207
-
1208
- Assembly files (contents wholly assembly instructions)
1209
-
1210
- **Default**: .s
1211
-
1212
- * `object`:
1213
-
1214
- Resulting binary output of C code compiler (and assembler)
1215
-
1216
- **Default**: .o
1217
-
1218
- * `executable`:
1219
-
1220
- Binary executable to be loaded and executed upon target hardware
1221
-
1222
- **Default**: .exe or .out (Win or *nix)
1223
-
1224
- * `testpass`:
1225
-
1226
- Test results file (not likely to ever need a new value)
1227
-
1228
- **Default**: .pass
1229
-
1230
- * `testfail`:
1231
-
1232
- Test results file (not likely to ever need a new value)
1233
-
1234
- **Default**: .fail
1235
-
1236
- * `dependencies`:
1237
-
1238
- File containing make-style dependency rules created by gcc preprocessor
1239
-
1240
- **Default**: .d
1241
-
1242
-
1243
- Example [:extension] YAML blurb
1244
-
1245
- :extension:
1246
- :source: .cc
1247
- :executable: .bin
1248
-
1249
- **defines**: command line defines used in test and release compilation by configured tools
1250
-
1251
- * `test`:
1252
-
1253
- Defines needed for testing. Useful for:
1254
-
1255
- 1. test files containing conditional compilation statements (i.e.
1256
- tests active in only certain contexts)
1257
-
1258
- 2. testing legacy source wherein the isolation of source under test
1259
- afforded by Ceedling and its complementary tools leaves certain
1260
- symbols unset when source files are compiled in isolation
1261
-
1262
- **Default**: [] (empty)
1263
-
1264
- * `test_preprocess`:
1265
-
1266
- If [:project][:use_test_preprocessor] or
1267
- [:project][:use_deep_dependencies] is set and code is structured in a
1268
- certain way, the gcc preprocessor may need symbol definitions to
1269
- properly preprocess files to extract function signatures for mocking
1270
- and extract deep dependencies for incremental builds.
1271
-
1272
- **Default**: [] (empty)
1273
-
1274
- * `<test_name>`:
1275
-
1276
- Add preprocessor definitions for specified `<test_name>`. For example:
1277
- ```yaml
1278
- :defines:
1279
- :test_foo_config:
1280
- - FOO_SPECIFIC_FEATURE
1281
- ```
1282
- `ceedling test:foo_config` will now have `FOO_SPECIFIC_FEATURE` defined, none of the other tests will.
1283
-
1284
- **Default**: [] (empty)
1285
-
1286
- * `release`:
1287
-
1288
- Defines needed for the release build binary artifact.
1289
-
1290
- **Default**: [] (empty)
1291
-
1292
- * `release_preprocess`:
1293
-
1294
- If [:project][:use_deep_dependencies] is set and code is structured in
1295
- a certain way, the gcc preprocessor may need symbol definitions to
1296
- properly preprocess files for incremental release builds due to deep
1297
- dependencies.
1298
-
1299
- **Default**: [] (empty)
1300
-
1301
- * `use_test_definition`:
1302
-
1303
- When this option is used the `-D<test_name>` flag is added to the build option of your test file.
1304
-
1305
- **Default**: FALSE
1306
-
1307
- Example [:defines] YAML blurb
1308
-
1309
- ```yaml
1310
- :defines:
1311
- :test:
1312
- - UNIT_TESTING #for select cases in source to allow testing with a changed behavior or interface
1313
- - OFF=0
1314
- - ON=1
1315
- - FEATURE_X=ON
1316
- :source:
1317
- - FEATURE_X=ON
1318
- ```
1319
-
1320
-
1321
- **libraries**: command line defines used in test and release compilation by configured tools
1322
-
1323
- Ceedling allows you to pull in specific libraries for the purpose of release and test builds.
1324
- It has a few levels of support for this. Start by adding a :libraries main section in your
1325
- configuration. In this section, you can optionally have the following subsections:
1326
-
1327
- * `test`:
1328
-
1329
- Library files that should be injected into your tests when linking occurs.
1330
- These can be specified as either relative or absolute paths. These files MUST
1331
- exist when the test attempts to build.
1332
-
1333
- * `source`:
1334
-
1335
- Library files that should be injected into your release when linking occurs. These
1336
- can be specified as either relative or absolute paths. These files MUST exist when
1337
- the release attempts to build UNLESS you are using the subprojects plugin. In that
1338
- case, it will attempt to build that library for you as a dynamic dependency.
1339
-
1340
- * `system`:
1341
-
1342
- These libraries are assumed to be in the tool path somewhere and shouldn't need to be
1343
- specified. The libraries added here will be injected into releases and tests.
1344
-
1345
- * `flag`:
1346
-
1347
- This is the method of adding an argument for each library. For example, gcc really likes
1348
- it when you specify “-l${1}”
1349
-
1350
- Notes:
1351
-
1352
- * If you've specified your own link step, you are going to want to add ${4} to your argument
1353
- list in the place where library files should be added to the command call. For gcc, this is
1354
- often the very end. Other tools may vary.
1355
-
1356
-
1357
- **flags**: configure per-file compilation and linking flags
1358
-
1359
- Ceedling tools (see later [:tools] section) are used to configure
1360
- compilation and linking of test and source files. These tool
1361
- configurations are a one-size-fits-all approach. Should individual files
1362
- require special compilation or linking flags, the settings in the
1363
- [:flags] section work in conjunction with tool definitions by way of
1364
- argument substitution to achieve this.
1365
-
1366
- * `release`:
1367
-
1368
- [:compile] or [:link] flags for release build
1369
-
1370
- * `test`:
1371
-
1372
- [:compile] or [:link] flags for test build
1373
-
1374
- Notes:
1375
-
1376
- * Ceedling works with the [:release] and [:test] build contexts
1377
- as-is; plugins can add additional contexts
1378
-
1379
- * Only [:compile] and [:link] are recognized operations beneath
1380
- a context
1381
-
1382
- * File specifiers do not include a path or file extension
1383
-
1384
- * File specifiers are case sensitive (must match original file
1385
- name)
1386
-
1387
- * File specifiers do support regular expressions if encased in quotes
1388
-
1389
- * '*' is a special (optional) file specifier to provide flags
1390
- to all files not otherwise specified
1391
-
1392
-
1393
- Example [:flags] YAML blurb
1394
-
1395
- ```yaml
1396
- :flags:
1397
- :release:
1398
- :compile:
1399
- :main: # add '-Wall' to compilation of main.c
1400
- - -Wall
1401
- :fan: # add '--O2' to compilation of fan.c
1402
- - --O2
1403
- :'test_.+': # add '-pedantic' to all test-files
1404
- - -pedantic
1405
- :*: # add '-foo' to compilation of all files not main.c or fan.c
1406
- - -foo
1407
- :test:
1408
- :compile:
1409
- :main: # add '--O1' to compilation of main.c as part of test builds including main.c
1410
- - --O1
1411
- :link:
1412
- :test_main: # add '--bar --baz' to linking of test_main.exe
1413
- - --bar
1414
- - --baz
1415
- ```
1416
-
1417
- **import**: allow to load other config files
1418
-
1419
- In some cases it is nice to have config files (project.yml, options files) which can
1420
- load other config files, for commonly re-used definitions (target processor,
1421
- common code modules, etc).
1422
- These can be recursively nested, the included files can include other files.
1423
-
1424
- Example [:import] YAML blurb
1425
-
1426
- ```yaml
1427
- :import:
1428
- - path/to/config.yml
1429
- - path/to/another/config.yml
1430
- ```
1431
-
1432
- Ceedling sets values for a subset of CMock settings. All CMock
1433
- options are available to be set, but only those options set by
1434
- Ceedling in an automated fashion are documented below. See CMock
1435
- documentation.
1436
-
1437
- **cmock**: configure CMock's code generation options and set symbols used to modify CMock's compiled features
1438
- Ceedling sets values for a subset of CMock settings. All CMock options are available to be set, but only those options set by Ceedling in an automated fashion are documented below. See CMock documentation.
1439
-
1440
- * `enforce_strict_ordering`:
1441
-
1442
- Tests fail if expected call order is not same as source order
1443
-
1444
- **Default**: TRUE
1445
-
1446
- * `mock_path`:
1447
-
1448
- Path for generated mocks
1449
-
1450
- **Default**: <build path>/tests/mocks
1451
-
1452
- * `defines`:
1453
-
1454
- List of conditional compilation symbols used to configure CMock's
1455
- compiled features. See CMock documentation to understand available
1456
- options. No symbols must be set unless defaults are inappropriate for
1457
- your specific environment. All symbols are used only by Ceedling to
1458
- compile CMock C code; contents of [:defines] are ignored by CMock's
1459
- Ruby code when instantiated.
1460
-
1461
- **Default**: [] (empty)
1462
-
1463
- * `verbosity`:
1464
-
1465
- If not set, defaults to Ceedling's verbosity level
1466
-
1467
- * `plugins`:
1468
-
1469
- If [:project][:use_exceptions] is enabled, the internal plugins list is pre-populated with 'cexception'.
1470
-
1471
- Whether or not you have included [:cmock][:plugins] in your
1472
- configuration file, Ceedling automatically adds 'cexception' to the
1473
- plugin list if exceptions are enabled. To add to the list Ceedling
1474
- provides CMock, simply add [:cmock][:plugins] to your configuration
1475
- and specify your desired additional plugins.
1476
-
1477
- * `includes`:
1478
-
1479
- If [:cmock][:unity_helper] set, pre-populated with unity_helper file
1480
- name (no path).
1481
-
1482
- The [:cmock][:includes] list works identically to the plugins list
1483
- above with regard to adding additional files to be inserted within
1484
- mocks as #include statements.
1485
-
1486
-
1487
- The last four settings above are directly tied to other Ceedling
1488
- settings; hence, why they are listed and explained here. The
1489
- first setting above, [:enforce_strict_ordering], defaults
1490
- to FALSE within CMock. It is set to TRUE by default in Ceedling
1491
- as our way of encouraging you to use strict ordering. It's a teeny
1492
- bit more expensive in terms of code generated, test execution
1493
- time, and complication in deciphering test failures. However,
1494
- it's good practice. And, of course, you can always disable it
1495
- by overriding the value in the Ceedling YAML configuration file.
1496
-
1497
-
1498
- **cexception**: configure symbols used to modify CException's compiled features
1499
-
1500
- * `defines`:
1501
-
1502
- List of conditional compilation symbols used to configure CException's
1503
- features in its source and header files. See CException documentation
1504
- to understand available options. No symbols must be set unless the
1505
- defaults are inappropriate for your specific environment.
1506
-
1507
- **Default**: [] (empty)
1508
-
1509
-
1510
- **unity**: configure symbols used to modify Unity's compiled features
1511
-
1512
- * `defines`:
1513
-
1514
- List of conditional compilation symbols used to configure Unity's
1515
- features in its source and header files. See Unity documentation to
1516
- understand available options. No symbols must be set unless the
1517
- defaults are inappropriate for your specific environment. Most Unity
1518
- defines can be easily configured through the YAML file.
1519
-
1520
- **Default**: [] (empty)
1521
-
1522
- Example [:unity] YAML blurbs
1523
- ```yaml
1524
- :unity: #itty bitty processor & toolchain with limited test execution options
1525
- :defines:
1526
- - UNITY_INT_WIDTH=16 #16 bit processor without support for 32 bit instructions
1527
- - UNITY_EXCLUDE_FLOAT #no floating point unit
1528
-
1529
- :unity: #great big gorilla processor that grunts and scratches
1530
- :defines:
1531
- - UNITY_SUPPORT_64 #big memory, big counters, big registers
1532
- - UNITY_LINE_TYPE=\"unsigned int\" #apparently we're using really long test files,
1533
- - UNITY_COUNTER_TYPE=\"unsigned int\" #and we've got a ton of test cases in those test files
1534
- - UNITY_FLOAT_TYPE=\"double\" #you betcha
1535
- ```
1536
-
1537
-
1538
- Notes on Unity configuration:
1539
-
1540
- * **Verification** - Ceedling does no verification of your configuration
1541
- values. In a properly configured setup, your Unity configuration
1542
- values are processed, collected together with any test define symbols
1543
- you specify elsewhere, and then passed to your toolchain during test
1544
- compilation. Unity's conditional compilation statements, your
1545
- toolchain's preprocessor, and/or your toolchain's compiler will
1546
- complain appropriately if your specified configuration values are
1547
- incorrect, incomplete, or incompatible.
1548
-
1549
- * **Routing $stdout** - Unity defaults to using `putchar()` in C's
1550
- standard library to display test results. For more exotic environments
1551
- than a desktop with a terminal (e.g. running tests directly on a
1552
- non-PC target), you have options. For example, you could create a
1553
- routine that transmits a character via RS232 or USB. Once you have
1554
- that routine, you can replace `putchar()` calls in Unity by overriding
1555
- the function-like macro `UNITY_OUTPUT_CHAR`. Consult your toolchain
1556
- and shell documentation. Eventhough this can also be defined in the YAML file
1557
- most shell environments do not handle parentheses as command line arguments
1558
- very well. To still be able to add this functionality all necessary
1559
- options can be defined in the `unity_config.h`. Unity needs to be told to look for
1560
- the `unity_config.h` in the YAML file, though.
1561
-
1562
- Example [:unity] YAML blurbs
1563
- ```yaml
1564
- :unity:
1565
- :defines:
1566
- - UNITY_INCLUDE_CONFIG_H
1567
- ```
1568
-
1569
- Example unity_config.h
1570
- ```
1571
- #ifndef UNITY_CONFIG_H
1572
- #define UNITY_CONFIG_H
1573
-
1574
- #include "uart_output.h" //Helper library for your custom environment
1575
-
1576
- #define UNITY_INT_WIDTH 16
1577
- #define UNITY_OUTPUT_START() uart_init(F_CPU, BAUD) //Helperfunction to init UART
1578
- #define UNITY_OUTPUT_CHAR(a) uart_putchar(a) //Helperfunction to forward char via UART
1579
- #define UNITY_OUTPUT_COMPLETE() uart_complete() //Helperfunction to inform that test has ended
1580
-
1581
- #endif
1582
- ```
1583
-
1584
-
1585
- **tools**: a means for representing command line tools for use under
1586
- Ceedling's automation framework
1587
-
1588
- Ceedling requires a variety of tools to work its magic. By default,
1589
- the GNU toolchain (gcc, cpp, as) are configured and ready for
1590
- use with no additions to the project configuration YAML file.
1591
- However, as most work will require a project-specific toolchain,
1592
- Ceedling provides a generic means for specifying / overriding
1593
- tools.
1594
-
1595
- * `test_compiler`:
1596
-
1597
- Compiler for test & source-under-test code
1598
- ${1}: input source ${2}: output object ${3}: optional output list ${4}: optional output dependencies file
1599
-
1600
- **Default**: gcc
1601
-
1602
- * `test_linker`:
1603
-
1604
- Linker to generate test fixture executables
1605
- ${1}: input objects ${2}: output binary ${3}: optional output map ${4}: optional library list
1606
-
1607
- **Default**: gcc
1608
-
1609
- * `test_fixture`:
1610
-
1611
- Executable test fixture
1612
- ${1}: simulator as executable with ${1} as input binary file argument or native test executable
1613
-
1614
- **Default**: ${1}
1615
-
1616
- * `test_includes_preprocessor`:
1617
-
1618
- Extractor of #include statements
1619
- ${1}: input source file
1620
-
1621
- **Default**: cpp
1622
-
1623
- * `test_file_preprocessor`:
1624
-
1625
- Preprocessor of test files (macros, conditional compilation statements)
1626
- ${1}: input source file ${2}: preprocessed output source file
1627
-
1628
- **Default**: gcc
1629
-
1630
- * `test_dependencies_generator`:
1631
-
1632
- Discovers deep dependencies of source & test (for incremental builds)
1633
- ${1}: input source file ${2}: compiled object filepath ${3}: output dependencies file
1634
-
1635
- **Default**: gcc
1636
-
1637
- * `release_compiler`:
1638
-
1639
- Compiler for release source code
1640
- ${1}: input source ${2}: output object ${3}: optional output list ${4}: optional output dependencies file
1641
-
1642
- **Default**: gcc
1643
-
1644
- * `release_assembler`:
1645
-
1646
- Assembler for release assembly code
1647
- ${1}: input assembly source file ${2}: output object file
1648
-
1649
- **Default**: as
1650
-
1651
- * `release_linker`:
1652
-
1653
- Linker for release source code
1654
- ${1}: input objects ${2}: output binary ${3}: optional output map ${4}: optional library list
1655
-
1656
- **Default**: gcc
1657
-
1658
- * `release_dependencies_generator`:
1659
-
1660
- Discovers deep dependencies of source files (for incremental builds)
1661
- ${1}: input source file ${2}: compiled object filepath ${3}: output dependencies file
1662
-
1663
- **Default**: gcc
1664
-
1665
-
1666
- A Ceedling tool has a handful of configurable elements:
1667
-
1668
- 1. [:executable] (required) - Command line executable having
1669
- the form of:
1670
-
1671
- 2. [:arguments] (required) - List of command line arguments
1672
- and substitutions
1673
-
1674
- 3. [:name] - Simple name (e.g. "nickname") of tool beyond its
1675
- executable name (if not explicitly set then Ceedling will
1676
- form a name from the tool's YAML entry name)
1677
-
1678
- 4. [:stderr_redirect] - Control of capturing $stderr messages
1679
- {:none, :auto, :win, :unix, :tcsh}.
1680
- Defaults to :none if unspecified; create a custom entry by
1681
- specifying a simple string instead of any of the available
1682
- symbols.
1683
-
1684
- 5. [:background_exec] - Control execution as background process
1685
- {:none, :auto, :win, :unix}.
1686
- Defaults to :none if unspecified.
1687
-
1688
-
1689
- Tool Element Runtime Substitution
1690
- ---------------------------------
1691
-
1692
- To accomplish useful work on multiple files, a configured tool will most
1693
- often require that some number of its arguments or even the executable
1694
- itself change for each run. Consequently, every tool's argument list and
1695
- executable field possess two means for substitution at runtime. Ceedling
1696
- provides two kinds of inline Ruby execution and a notation for
1697
- populating elements with dynamically gathered values within the build
1698
- environment.
1699
-
1700
- Tool Element Runtime Substitution: Inline Ruby Execution
1701
- --------------------------------------------------------
1702
-
1703
- In-line Ruby execution works similarly to that demonstrated for the
1704
- [:environment] section except that substitution occurs as the tool is
1705
- executed and not at the time the configuration file is first scanned.
1706
-
1707
- * `#{...}`:
1708
-
1709
- Ruby string substitution pattern wherein the containing string is
1710
- expanded to include the string generated by Ruby code between the
1711
- braces. Multiple instances of this expansion can occur within a single
1712
- tool element entry string. Note that if this string substitution
1713
- pattern occurs at the very beginning of a string in the YAML
1714
- configuration the entire string should be enclosed in quotes (see the
1715
- [:environment] section for further explanation on this point).
1716
-
1717
- * `{...} `:
1718
-
1719
- If an entire tool element string is enclosed with braces, it signifies
1720
- that Ceedling should execute the Ruby code contained within those
1721
- braces. Say you have a collection of paths on disk and some of those
1722
- paths include spaces. Further suppose that a single tool that must use
1723
- those paths requires those spaces to be escaped, but all other uses of
1724
- those paths requires the paths to remain unchanged. You could use this
1725
- Ceedling feature to insert Ruby code that iterates those paths and
1726
- escapes those spaces in the array as used by the tool of this example.
1727
-
1728
- Tool Element Runtime Substitution: Notational Substitution
1729
- ----------------------------------------------------------
1730
-
1731
- A Ceedling tool's other form of dynamic substitution relies on a '$'
1732
- notation. These '$' operators can exist anywhere in a string and can be
1733
- decorated in any way needed. To use a literal '$', escape it as '\\$'.
1734
-
1735
- * `$`:
1736
-
1737
- Simple substitution for value(s) globally available within the runtime
1738
- (most often a string or an array).
1739
-
1740
- * `${#}`:
1741
-
1742
- When a Ceedling tool's command line is expanded from its configured
1743
- representation and used within Ceedling Ruby code, certain calls to
1744
- that tool will be made with a parameter list of substitution values.
1745
- Each numbered substitution corresponds to a position in a parameter
1746
- list. Ceedling Ruby code expects that configured compiler and linker
1747
- tools will contain ${1} and ${2} replacement arguments. In the case of
1748
- a compiler ${1} will be a C code file path, and ${2} will be the file
1749
- path of the resulting object file. For a linker ${1} will be an array
1750
- of object files to link, and ${2} will be the resulting binary
1751
- executable. For an executable test fixture ${1} is either the binary
1752
- executable itself (when using a local toolchain such as gcc) or a
1753
- binary input file given to a simulator in its arguments.
1754
-
1755
-
1756
- Example [:tools] YAML blurbs
1757
-
1758
- ```yaml
1759
- :tools:
1760
- :test_compiler:
1761
- :executable: compiler #exists in system search path
1762
- :name: 'acme test compiler'
1763
- :arguments:
1764
- - -I"$": COLLECTION_PATHS_TEST_TOOLCHAIN_INCLUDE #expands to -I search paths
1765
- - -I"$": COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR #expands to -I search paths
1766
- - -D$: COLLECTION_DEFINES_TEST_AND_VENDOR #expands to all -D defined symbols
1767
- - --network-license #simple command line argument
1768
- - -optimize-level 4 #simple command line argument
1769
- - "#{`args.exe -m acme.prj`}" #in-line ruby sub to shell out & build string of arguments
1770
- - -c ${1} #source code input file (Ruby method call param list sub)
1771
- - -o ${2} #object file output (Ruby method call param list sub)
1772
- :test_linker:
1773
- :executable: /programs/acme/bin/linker.exe #absolute file path
1774
- :name: 'acme test linker'
1775
- :arguments:
1776
- - ${1} #list of object files to link (Ruby method call param list sub)
1777
- - -l$-lib: #inline yaml array substitution to link in foo-lib and bar-lib
1778
- - foo
1779
- - bar
1780
- - -o ${2} #executable file output (Ruby method call param list sub)
1781
- :test_fixture:
1782
- :executable: tools/bin/acme_simulator.exe #relative file path to command line simulator
1783
- :name: 'acme test fixture'
1784
- :stderr_redirect: :win #inform Ceedling what model of $stderr capture to use
1785
- :arguments:
1786
- - -mem large #simple command line argument
1787
- - -f "${1}" #binary executable input file to simulator (Ruby method call param list sub)
1788
- ```
1789
-
1790
- Resulting command line constructions from preceding example [:tools] YAML blurbs
1791
-
1792
- > compiler -I"/usr/include” -I”project/tests”
1793
- -I"project/tests/support” -I”project/source” -I”project/include”
1794
- -DTEST -DLONG_NAMES -network-license -optimize-level 4 arg-foo
1795
- arg-bar arg-baz -c project/source/source.c -o
1796
- build/tests/out/source.o
1797
-
1798
- [notes: (1.) "arg-foo arg-bar arg-baz" is a fabricated example
1799
- string collected from $stdout as a result of shell execution
1800
- of args.exe
1801
- (2.) the -c and -o arguments are
1802
- fabricated examples simulating a single compilation step for
1803
- a test; ${1} & ${2} are single files]
1804
-
1805
- > \programs\acme\bin\linker.exe thing.o unity.o
1806
- test_thing_runner.o test_thing.o mock_foo.o mock_bar.o -lfoo-lib
1807
- -lbar-lib -o build\tests\out\test_thing.exe
1808
-
1809
- [note: in this scenario ${1} is an array of all the object files
1810
- needed to link a test fixture executable]
1811
-
1812
- > tools\bin\acme_simulator.exe -mem large -f "build\tests\out\test_thing.bin 2>&1”
1813
-
1814
- [note: (1.) :executable could have simply been ${1} - if we were compiling
1815
- and running native executables instead of cross compiling (2.) we're using
1816
- $stderr redirection to allow us to capture simulator error messages to
1817
- $stdout for display at the run's conclusion]
1818
-
1819
-
1820
- Notes:
1821
-
1822
- * The upper case names are Ruby global constants that Ceedling
1823
- builds
1824
-
1825
- * "COLLECTION_" indicates that Ceedling did some work to assemble
1826
- the list. For instance, expanding path globs, combining multiple
1827
- path globs into a convenient summation, etc.
1828
-
1829
- * At present, $stderr redirection is primarily used to capture
1830
- errors from test fixtures so that they can be displayed at the
1831
- conclusion of a test run. For instance, if a simulator detects
1832
- a memory access violation or a divide by zero error, this notice
1833
- might go unseen in all the output scrolling past in a terminal.
1834
-
1835
- * The preprocessing tools can each be overridden with non-gcc
1836
- equivalents. However, this is an advanced feature not yet
1837
- documented and requires that the replacement toolchain conform
1838
- to the same conventions used by gcc.
1839
-
1840
- **Ceedling Collection Used in Compilation**:
1841
-
1842
- * `COLLECTION_PATHS_TEST`:
1843
-
1844
- All test paths
1845
-
1846
- * `COLLECTION_PATHS_SOURCE`:
1847
-
1848
- All source paths
1849
-
1850
- * `COLLECTION_PATHS_INCLUDE`:
1851
-
1852
- All include paths
1853
-
1854
- * `COLLECTION_PATHS_SUPPORT`:
1855
-
1856
- All test support paths
1857
-
1858
- * `COLLECTION_PATHS_SOURCE_AND_INCLUDE`:
1859
-
1860
- All source and include paths
1861
-
1862
- * `COLLECTION_PATHS_SOURCE_INCLUDE_VENDOR`:
1863
-
1864
- All source and include paths + applicable vendor paths (e.g.
1865
- CException's source path if exceptions enabled)
1866
-
1867
- * `COLLECTION_PATHS_TEST_TOOLCHAIN_INCLUDE`:
1868
-
1869
- All test toolchain include paths
1870
-
1871
- * `COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE`:
1872
-
1873
- All test, source, and include paths
1874
-
1875
- * `COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR`:
1876
-
1877
- All test, source, include, and applicable vendor paths (e.g. Unity's
1878
- source path plus CMock and CException's source paths if mocks and
1879
- exceptions are enabled)
1880
-
1881
- * `COLLECTION_PATHS_RELEASE_TOOLCHAIN_INCLUDE`:
1882
-
1883
- All release toolchain include paths
1884
-
1885
- * `COLLECTION_DEFINES_TEST_AND_VENDOR`:
1886
-
1887
- All symbols specified in [:defines][:test] + symbols defined for
1888
- enabled vendor tools - e.g. [:unity][:defines], [:cmock][:defines],
1889
- and [:cexception][:defines]
1890
-
1891
- * `COLLECTION_DEFINES_RELEASE_AND_VENDOR`:
1892
-
1893
- All symbols specified in [:defines][:release] plus symbols defined by
1894
- [:cexception][:defines] if exceptions are enabled
1895
-
1896
-
1897
- Notes:
1898
-
1899
- * Other collections exist within Ceedling. However, they are
1900
- only useful for advanced features not yet documented.
1901
-
1902
- * Wherever multiple path lists are combined for use Ceedling prioritizes
1903
- path groups as follows: test paths, support paths, source paths, include
1904
- paths.
1905
- This can be useful, for instance, in certain testing scenarios
1906
- where we desire Ceedling or the compiler to find a stand-in header file
1907
- before the actual source header file of the same name.
1908
-
1909
-
1910
- **plugins**: Ceedling extensions
1911
-
1912
- * `load_paths`:
1913
-
1914
- Base paths to search for plugin subdirectories or extra ruby functionalit
1915
-
1916
- **Default**: [] (empty)
1917
-
1918
- * `enabled`:
1919
-
1920
- List of plugins to be used - a plugin's name is identical to the
1921
- subdirectory that contains it (and the name of certain files within
1922
- that subdirectory)
1923
-
1924
- **Default**: [] (empty)
1925
-
1926
-
1927
- Plugins can provide a variety of added functionality to Ceedling. In
1928
- general use, it's assumed that at least one reporting plugin will be
1929
- used to format test results. However, if no reporting plugins are
1930
- specified, Ceedling will print to `$stdout` the (quite readable) raw
1931
- test results from all test fixtures executed.
1932
-
1933
- Example [:plugins] YAML blurb
1934
-
1935
- ```yaml
1936
- :plugins:
1937
- :load_paths:
1938
- - project/tools/ceedling/plugins #home to your collection of plugin directories
1939
- - project/support #maybe home to some ruby code your custom plugins share
1940
- :enabled:
1941
- - stdout_pretty_tests_report #nice test results at your command line
1942
- - our_custom_code_metrics_report #maybe you needed line count and complexity metrics, so you
1943
- #created a plugin to scan all your code and collect that info
1944
- ```
1945
-
1946
- * `stdout_pretty_tests_report`:
1947
-
1948
- Prints to $stdout a well-formatted list of ignored and failed tests,
1949
- final test counts, and any extraneous output (e.g. printf statements
1950
- or simulator memory errors) collected from executing the test
1951
- fixtures. Meant to be used with runs at the command line.
1952
-
1953
- * `stdout_ide_tests_report`:
1954
-
1955
- Prints to $stdout simple test results formatted such that an IDE
1956
- executing test-related Rake tasks can recognize file paths and line
1957
- numbers in test failures, etc. Thus, you can click a test result in
1958
- your IDE's execution window and jump to the failure (or ignored test)
1959
- in your test file (obviously meant to be used with an [IDE like
1960
- Eclipse][ide], etc).
1961
-
1962
- [ide]: http://throwtheswitch.org/white-papers/using-with-ides.html
1963
-
1964
- * `xml_tests_report`:
1965
-
1966
- Creates an XML file of test results in the xUnit format (handy for
1967
- Continuous Integration build servers or as input to other reporting
1968
- tools). Produces a file report.xml in <build root>/artifacts/tests.
1969
-
1970
- * `bullseye`:
1971
-
1972
- Adds additional Rake tasks to execute tests with the commercial code
1973
- coverage tool provided by [Bullseye][]. See readme.txt inside the bullseye
1974
- plugin directory for configuration and use instructions. Note:
1975
- Bullseye only works with certain compilers and linkers (healthy list
1976
- of supported toolchains though).
1977
-
1978
- [bullseye]: http://www.bullseye.com
1979
-
1980
- * `gcov`:
1981
-
1982
- Adds additional Rake tasks to execute tests with the GNU code coverage
1983
- tool [gcov][]. See readme.txt inside the gcov directory for configuration
1984
- and use instructions. Only works with GNU compiler and linker.
1985
-
1986
- [gcov]: http://gcc.gnu.org/onlinedocs/gcc/Gcov.html
1987
-
1988
- * `warnings_report`:
1989
-
1990
- Scans compiler and linker `$stdout / $stderr` output for the word
1991
- 'warning' (case insensitive). All code warnings (or tool warnings) are
1992
- logged to a file warnings.log in the appropriate `<build
1993
- root>/artifacts` directory (e.g. test/ for test tasks, `release/` for a
1994
- release build, or even `bullseye/` for bullseye runs).
1995
-
1996
- Module Generator
1997
- ========================
1998
- Ceedling includes a plugin called module_generator that will create a source, header and test file for you.
1999
- There are several possibilities to configure this plugin through your project.yml to suit your project's needs.
2000
-
2001
- Directory Structure
2002
- -------------------------------------------
2003
-
2004
- The default configuration for directory/project structure is:
2005
- ```yaml
2006
- :module_generator:
2007
- :project_root: ./
2008
- :source_root: src/
2009
- :test_root: test/
2010
- ```
2011
- You can change these variables in your project.yml file to comply with your project's directory structure.
2012
-
2013
- If you call `ceedling module:create`, it will create three files:
2014
- 1. A source file in the source_root
2015
- 2. A header file in the source_root
2016
- 3. A test file in the test_root
2017
-
2018
- If you want your header file to be in another location,
2019
- you can specify the ':inc_root:" in your project.yml file:
2020
- ```yaml
2021
- :module_generator:
2022
- :inc_root: inc/
2023
- ```
2024
- The module_generator will then create the header file in your defined ':inc_root:'.
2025
- By default, ':inc_root:' is not defined so the module_generator will use the source_root.
2026
-
2027
- Sometimes, your project can't be divided into a single src, inc, and test folder. You have several directories
2028
- with sources/..., something like this for example:
2029
- <project_root>
2030
- - myDriver
2031
- - src
2032
- - inc
2033
- - test
2034
- - myOtherDriver
2035
- - src
2036
- - inc
2037
- - test
2038
- - ...
2039
-
2040
- Don't worry, you don't have to manually create the source/header/test files.
2041
- The module_generator can accept a path to create a source_root/inc_root/test_root folder with your files:
2042
- `ceedling module:create[<module_root_path>:<module_name>]`
2043
-
2044
- F.e., applied to the above project structure:
2045
- `ceedling module:create[myOtherDriver:driver]`
2046
- This will make the module_generator run in the subdirectory 'myOtherDriver' and generate the module files
2047
- for you in that directory. So, this command will generate the following files:
2048
- 1. A source file 'driver.c' in <project_root>/myOtherDriver/<source_root>
2049
- 2. A header file 'driver.h' in <project_root>/myOtherDriver/<source_root> (or <inc_root> if specified)
2050
- 3. A test file 'test_driver.c' in <project_root>/myOtherDriver/<test_root>
2051
-
2052
- Naming
2053
- -------------------------------------------
2054
- By default, the module_generator will generate your files in lowercase.
2055
- `ceedling module:create[mydriver]` and `ceedling module:create[myDriver]`(note the uppercase) will generate the same files:
2056
- 1. mydriver.c
2057
- 2. mydriver.h
2058
- 3. test_mydriver.c
2059
-
2060
- You can configure the module_generator to use a differect naming mechanism through the project.yml:
2061
- ```yaml
2062
- :module_generator:
2063
- :naming: "camel"
2064
- ```
2065
- There are other possibilities as well (bumpy, camel, snake, caps).
2066
- Refer to the unity module generator for more info (the unity module generator is used under the hood by module_generator).
2067
-
2068
-
2069
- Boilerplate header
2070
- -------------------------------------------
2071
- There are two ways of adding a boilerplate header comment to your generated files:
2072
- * With a defined string in the project.yml file:
2073
-
2074
- ```yaml
2075
- :module_generator:
2076
- :boilerplates:
2077
- :src: '/* This is Boilerplate code. */'
2078
- ```
2079
-
2080
- Using the command **ceedling module:create[foo]** it creates the source module as follows:
2081
-
2082
- ```c
2083
- /* This is Boilerplate code. */
2084
- #include "foo.h"
2085
- ```
2086
-
2087
- It would be the same for **:tst:** and **:inc:** adding its respective options.
2088
-
2089
- * Defining an external file with boileplate code:
2090
-
2091
- ```yml
2092
- :module_generator:
2093
- :boilerplate_files:
2094
- :src: '<template_folder>\src_boilerplate.txt'
2095
- :inc: '<template_folder>\inc_boilerplate.txt'
2096
- :tst: '<template_folder>\tst_boilerplate.txt'
2097
- ```
2098
-
2099
- For whatever file names in whichever folder you desire.
2100
-
2101
-
2102
- Advanced Topics (Coming)
2103
- ========================
2104
-
2105
- Modifying Your Configuration without Modifying Your Project File: Option Files & User Files
2106
- -------------------------------------------------------------------------------------------
2107
-
2108
- Modifying your project file without modifying your project file
2109
-
2110
- Debugging and/or printf()
2111
- -------------------------
2112
-
2113
- When you gotta get your hands dirty...
2114
-
2115
- Ceedling Plays Nice with Others - Using Ceedling for Tests Alongside Another Release Build Setup
2116
- ------------------------------------------------------------------------------------------------
2117
-
2118
- You've got options.
2119
-
2120
- Adding Handy Rake Tasks for Your Project (without Fancy Pants Custom Plugins)
2121
- -----------------------------------------------------------------------------
2122
-
2123
- Simple as snot.
2124
-
2125
- Working with Non-Desktop Testing Environments
2126
- ---------------------------------------------
2127
-
2128
- For those crazy platforms lacking command line simulators and for which
2129
- cross-compiling on the desktop just ain't gonna get it done.
2130
-
2131
- Creating Custom Plugins
2132
- -----------------------
2133
-
2134
- Oh boy. This is going to take some explaining.
1
+ [All code is copyright © 2010-2020 Ceedling Project
2
+ by Mike Karlesky, Mark VanderVoord, and Greg Williams.
3
+
4
+ This Documentation Is Released Under a
5
+ Creative Commons 3.0 Attribution Share-Alike License]
6
+
7
+ What the What?
8
+
9
+ Assembling build environments for C projects - especially with
10
+ automated unit tests - is a pain. Whether it's Make or Rake or Premake
11
+ or what-have-you, set up with an all-purpose build environment
12
+ tool is tedious and requires considerable glue code to pull together
13
+ the necessary tools and libraries. Ceedling allows you to generate
14
+ an entire test and build environment for a C project from a single
15
+ YAML configuration file. Ceedling is written in Ruby and works
16
+ with the Rake build tool plus other goodness like Unity and CMock —
17
+ the unit testing and mocking frameworks for C. Ceedling and
18
+ its complementary tools can support the tiniest of embedded
19
+ processors, the beefiest 64 bit power houses available, and
20
+ everything in between.
21
+
22
+ For a build project including unit tests and using the default
23
+ toolchain gcc, the configuration file could be as simple as this:
24
+
25
+ ```yaml
26
+ :project:
27
+ :build_root: project/build/
28
+ :release_build: TRUE
29
+
30
+ :paths:
31
+ :test:
32
+ - tests/**
33
+ :source:
34
+ - source/**
35
+ ```
36
+
37
+ From the command line, to build the release version of your project,
38
+ you would simply run `ceedling release`. To run all your unit tests,
39
+ you would run `ceedling test:all`. That's it!
40
+
41
+ Of course, many more advanced options allow you to configure
42
+ your project with a variety of features to meet a variety of needs.
43
+ Ceedling can work with practically any command line toolchain
44
+ and directory structure – all by way of the configuration file.
45
+ Further, because Ceedling piggy backs on Rake, you can add your
46
+ own Rake tasks to accomplish project tasks outside of testing
47
+ and release builds. A facility for plugins also allows you to
48
+ extend Ceedling's capabilities for needs such as custom code
49
+ metrics reporting and coverage testing.
50
+
51
+ What's with this Name?
52
+
53
+ Glad you asked. Ceedling is tailored for unit tested C projects
54
+ and is built upon / around Rake (Rake is a Make replacement implemented
55
+ in the Ruby scripting language). So, we've got C, our Rake, and
56
+ the fertile soil of a build environment in which to grow and tend
57
+ your project and its unit tests. Ta da - _Ceedling_.
58
+
59
+ What Do You Mean "tailored for unit tested C projects"?
60
+
61
+ Well, we like to write unit tests for our C code to make it lean and
62
+ mean (that whole [Test-Driven Development][tdd]
63
+ thing). Along the way, this style of writing C code spawned two
64
+ tools to make the job easier: a unit test framework for C called
65
+ _Unity_ and a mocking library called _CMock_. And, though it's
66
+ not directly related to testing, a C framework for exception
67
+ handling called _CException_ also came along.
68
+
69
+ [tdd]: http://en.wikipedia.org/wiki/Test-driven_development
70
+
71
+ These tools and frameworks are great, but they require quite
72
+ a bit of environment support to pull them all together in a convenient,
73
+ usable fashion. We started off with Rakefiles to assemble everything.
74
+ These ended up being quite complicated and had to be hand-edited
75
+ or created anew for each new project. Ceedling replaces all that
76
+ tedium and rework with a configuration file that ties everything
77
+ together.
78
+
79
+ Though Ceedling is tailored for unit testing, it can also go right ahead
80
+ and build your final binary release artifact for you as well. Or,
81
+ Ceedling and your tests can live alongside your existing release build
82
+ setup. That said, Ceedling is more powerful as a unit test build
83
+ environment than it is a general purpose release build environment;
84
+ complicated projects including separate bootloaders or multiple library
85
+ builds, etc. are not its strong suit.
86
+
87
+ Hold on. Back up. Ruby? Rake? YAML? Unity? CMock? CException?
88
+
89
+ Seem overwhelming? It's not bad at all, and for the benefits tests
90
+ bring us, it's all worth it.
91
+
92
+ [Ruby][] is a handy scripting
93
+ language like Perl or Python. It's a modern, full featured language
94
+ that happens to be quite handy for accomplishing tasks like code
95
+ generation or automating one's workflow while developing in
96
+ a compiled language such as C.
97
+
98
+ [Ruby]: http://www.ruby-lang.org/en/
99
+
100
+ [Rake][] is a utility written in Ruby
101
+ for accomplishing dependency tracking and task automation
102
+ common to building software. It's a modern, more flexible replacement
103
+ for [Make][]).
104
+ Rakefiles are Ruby files, but they contain build targets similar
105
+ in nature to that of Makefiles (but you can also run Ruby code in
106
+ your Rakefile).
107
+
108
+ [Rake]: http://rubyrake.org/
109
+ [Make]: http://en.wikipedia.org/wiki/Make_(software)
110
+
111
+ [YAML][] is a "human friendly data serialization standard for all
112
+ programming languages." It's kinda like a markup language, but don't
113
+ call it that. With a YAML library, you can [serialize][] data structures
114
+ to and from the file system in a textual, human readable form. Ceedling
115
+ uses a serialized data structure as its configuration input.
116
+
117
+ [YAML]: http://en.wikipedia.org/wiki/Yaml
118
+ [serialize]: http://en.wikipedia.org/wiki/Serialization
119
+
120
+ [Unity] is a [unit test framework][test] for C. It provides facilities
121
+ for test assertions, executing tests, and collecting / reporting test
122
+ results. Unity derives its name from its implementation in a single C
123
+ source file (plus two C header files) and from the nature of its
124
+ implementation - Unity will build in any C toolchain and is configurable
125
+ for even the very minimalist of processors.
126
+
127
+ [Unity]: http://github.com/ThrowTheSwitch/Unity
128
+ [test]: http://en.wikipedia.org/wiki/Unit_testing
129
+
130
+ [CMock] is a tool written in Ruby able to generate entire
131
+ [mock functions][mock] in C code from a given C header file. Mock
132
+ functions are invaluable in [interaction-based unit testing][ut].
133
+ CMock's generated C code uses Unity.
134
+
135
+ [CMock]: http://github.com/ThrowTheSwitch/CMock
136
+ [mock]: http://en.wikipedia.org/wiki/Mock_object
137
+ [ut]: http://martinfowler.com/articles/mocksArentStubs.html
138
+
139
+ [CException] is a C source and header file that provide a simple
140
+ [exception mechanism][exn] for C by way of wrapping up the
141
+ [setjmp / longjmp][setjmp] standard library calls. Exceptions are a much
142
+ cleaner and preferable alternative to managing and passing error codes
143
+ up your return call trace.
144
+
145
+ [CException]: http://github.com/ThrowTheSwitch/CException
146
+ [exn]: http://en.wikipedia.org/wiki/Exception_handling
147
+ [setjmp]: http://en.wikipedia.org/wiki/Setjmp.h
148
+
149
+ Notes
150
+ -----
151
+
152
+ * YAML support is included with Ruby - requires no special installation
153
+ or configuration.
154
+
155
+ * Unity, CMock, and CException are bundled with Ceedling, and
156
+ Ceedling is designed to glue them all together for your project
157
+ as seamlessly as possible.
158
+
159
+
160
+ Installation & Setup: What Exactly Do I Need to Get Started?
161
+ ------------------------------------------------------------
162
+
163
+ As a [Ruby gem](http://docs.rubygems.org/read/chapter/1):
164
+
165
+ 1. [Download and install Ruby](http://www.ruby-lang.org/en/downloads/)
166
+
167
+ 2. Use Ruby's command line gem package manager to install Ceedling:
168
+ `gem install ceedling`
169
+ (Unity, CMock, and CException come along with Ceedling for free)
170
+
171
+ 3. Execute Ceedling at command line to create example project
172
+ or an empty Ceedling project in your filesystem (executing
173
+ `ceedling help` first is, well, helpful).
174
+
175
+ Gem install notes:
176
+
177
+ 1. Steps 1-2 are a one time affair for your local environment.
178
+ When steps 1-2 are completed once, only step 3 is needed for
179
+ each new project.
180
+
181
+ Getting Started after Ceedling is installed:
182
+
183
+ 1. Once Ceedling is installed, you'll want to start to integrate it with new
184
+ and old projects alike. If you wanted to start to work on a new project
185
+ named `foo`, Ceedling can create the skeleton of the project using `ceedling
186
+ new foo`. Likewise if you already have a project named `bar` and you want to
187
+ integrate Ceedling into it, you would run `ceedling new bar` and Ceedling
188
+ will create any files and directories it needs to run.
189
+
190
+ 2. Now that you have Ceedling integrated with a project, you can start using it.
191
+ A good starting point to get use to Ceedling either in a new project or an
192
+ existing project is creating a new module to get use to Ceedling by issuing
193
+ the command `ceedling module:create[unicorn]`.
194
+
195
+ General notes:
196
+
197
+ 1. Certain advanced features of Ceedling rely on gcc and cpp
198
+ as preprocessing tools. In most linux systems, these tools
199
+ are already available. For Windows environments, we recommend
200
+ the [mingw project](http://www.mingw.org/) (Minimalist
201
+ GNU for Windows). This represents an optional, additional
202
+ setup / installation step to complement the list above. Upon
203
+ installing mingw ensure your system path is updated or set
204
+ [:environment][:path] in your `project.yml` file (see
205
+ environment section later in this document).
206
+
207
+ 2. To use a project file name other than the default `project.yml`
208
+ or place the project file in a directory other than the one
209
+ in which you'll run Rake, create an environment variable
210
+ `CEEDLING_MAIN_PROJECT_FILE` with your desired project
211
+ file path.
212
+
213
+ 3. To better understand Rake conventions, Rake execution,
214
+ and Rakefiles, consult the [Rake tutorial, examples, and
215
+ user guide](http://rubyrake.org/).
216
+
217
+ 4. When using Ceedling in Windows environments, a test file name may
218
+ not include the sequences “patch” or “setup”. The Windows Installer
219
+ Detection Technology (part of UAC), requires administrator
220
+ privileges to execute file names with these strings.
221
+
222
+ Now What? How Do I Make It GO?
223
+ ------------------------------
224
+
225
+ We're getting a little ahead of ourselves here, but it's good
226
+ context on how to drive this bus. Everything is done via the command
227
+ line. We'll cover conventions and how to actually configure
228
+ your project in later sections.
229
+
230
+ To run tests, build your release artifact, etc., you will be interacting
231
+ with Rake on the command line. Ceedling works with Rake to present
232
+ you with named tasks that coordinate the file generation and
233
+ build steps needed to accomplish something useful. You can also
234
+ add your own independent Rake tasks or create plugins to extend
235
+ Ceedling (more on this later).
236
+
237
+ * `ceedling [no arguments]`:
238
+
239
+ Run the default Rake task (conveniently recognized by the name default
240
+ by Rake). Neither Rake nor Ceedling provide a default task. Rake will
241
+ abort if run without arguments when no default task is defined. You can
242
+ conveniently define a default task in the Rakefile discussed in the
243
+ preceding setup & installation section of this document.
244
+
245
+ * `ceedling -T`:
246
+
247
+ List all available Rake tasks with descriptions (Rake tasks without
248
+ descriptions are not listed). -T is a command line switch for Rake and
249
+ not the same as tasks that follow.
250
+
251
+ * `ceedling <tasks...> --trace`:
252
+
253
+ For advanced users troubleshooting a confusing build error, debug
254
+ Ceedling or a plugin, --trace provides a stack trace of dependencies
255
+ walked during task execution and any Ruby failures along the way. Note
256
+ that --trace is a command line switch for Rake and is not the same as
257
+ tasks that follow.
258
+
259
+ * `ceedling environment`:
260
+
261
+ List all configured environment variable names and string values. This
262
+ task is helpful in verifying the evaluation of any Ruby expressions in
263
+ the [:environment] section of your config file. *: Note: Ceedling may
264
+ set some convenience environment variables by default.*
265
+
266
+ * `ceedling paths:*`:
267
+
268
+ List all paths collected from [:paths] entries in your YAML config
269
+ file where * is the name of any section contained in [:paths]. This
270
+ task is helpful in verifying the expansion of path wildcards / globs
271
+ specified in the [:paths] section of your config file.
272
+
273
+ * `ceedling files:assembly`
274
+ * `ceedling files:include`
275
+ * `ceedling files:source`
276
+ * `ceedling files:support`
277
+ * `ceedling files:test`
278
+
279
+ List all files and file counts collected from the relevant search
280
+ paths specified by the [:paths] entries of your YAML config file. The
281
+ files:assembly task will only be available if assembly support is
282
+ enabled in the [:release_build] section of your configuration file.
283
+
284
+ * `ceedling options:*`:
285
+
286
+ Load and merge configuration settings into the main project
287
+ configuration. Each task is named after a `*.yml` file found in the
288
+ configured options directory. See documentation for the configuration
289
+ setting [:project][:options_paths] and for options files in advanced
290
+ topics.
291
+
292
+ * `ceedling test:all`:
293
+
294
+ Run all unit tests (rebuilding anything that's changed along the way).
295
+
296
+ * `ceedling test:build_only`:
297
+
298
+ Build all unit tests, object files and executable but not run them.
299
+
300
+ * `ceedling test:delta`:
301
+
302
+ Run only those unit tests for which the source or test files have
303
+ changed (i.e. incremental build). Note: with the
304
+ [:project][:use_test_preprocessor] configuration file option set,
305
+ runner files are always regenerated limiting the total efficiency this
306
+ text execution option can afford.
307
+
308
+ * `ceedling test:*`:
309
+
310
+ Execute the named test file or the named source file that has an
311
+ accompanying test. No path. Examples: ceedling test:foo.c or ceedling
312
+ test:test_foo.c
313
+
314
+ * `ceedling test:pattern[*]`:
315
+
316
+ Execute any tests whose name and/or path match the regular expression
317
+ pattern (case sensitive). Example: ceedling "test:pattern[(I|i)nit]" will
318
+ execute all tests named for initialization testing. Note: quotes may
319
+ be necessary around the ceedling parameter to distinguish regex characters
320
+ from command line operators.
321
+
322
+ * `ceedling test:path[*]`:
323
+
324
+ Execute any tests whose path contains the given string (case
325
+ sensitive). Example: ceedling test:path[foo/bar] will execute all tests
326
+ whose path contains foo/bar. Note: both directory separator characters
327
+ / and \ are valid.
328
+
329
+ * `ceedling release`:
330
+
331
+ Build all source into a release artifact (if the release build option
332
+ is configured).
333
+
334
+ * `ceedling release:compile:*`:
335
+
336
+ Sometimes you just need to compile a single file dagnabit. Example:
337
+ ceedling release:compile:foo.c
338
+
339
+ * `ceedling release:assemble:*`:
340
+
341
+ Sometimes you just need to assemble a single file doggonit. Example:
342
+ ceedling release:assemble:foo.s
343
+
344
+ * `ceedling module:create[Filename]`:
345
+ * `ceedling module:create[<Path:>Filename]`:
346
+
347
+ It's often helpful to create a file automatically. What's better than
348
+ that? Creating a source file, a header file, and a corresponding test
349
+ file all in one step!
350
+
351
+ There are also patterns which can be specified to automatically generate
352
+ a bunch of files. Try `ceedling module:create[Poodles,mch]` for example!
353
+
354
+ The module generator has several options you can configure.
355
+ F.e. Generating the source/header/test file in a subdirectory (by adding <Path> when calling module:create).
356
+ For more info, refer to the [Module Generator](https://github.com/ThrowTheSwitch/Ceedling/blob/master/docs/CeedlingPacket.md#module-generator) section.
357
+
358
+ * `ceedling module:stub[Filename]`:
359
+ * `ceedling module:stub[<Path:>Filename]`:
360
+
361
+ So what happens if you've created your API in your header (maybe even using
362
+ TDD to do so?) and now you need to start to implement the corresponding C
363
+ module? Why not get a head start by using `ceedilng module:stub[headername]`
364
+ to automatically create a function skeleton for every function declared in
365
+ that header? Better yet, you can call this again whenever you add new functions
366
+ to that header to add just the new functions, leaving the old ones alone!
367
+
368
+ * `ceedling logging <tasks...>`:
369
+
370
+ Enable logging to <build path>/logs. Must come before test and release
371
+ tasks to log their steps and output. Log names are a concatenation of
372
+ project, user, and option files loaded. User and option files are
373
+ documented in the advanced topics section of this document.
374
+
375
+ * `ceedling verbosity[x] <tasks...>`:
376
+
377
+ Change the default verbosity level. [x] ranges from 0 (quiet) to 4
378
+ (obnoxious). Level [3] is the default. The verbosity task must precede
379
+ all tasks in the command line list for which output is desired to be
380
+ seen. Verbosity settings are generally most meaningful in conjunction
381
+ with test and release tasks.
382
+
383
+ * `ceedling summary`:
384
+
385
+ If plugins are enabled, this task will execute the summary method of
386
+ any plugins supporting it. This task is intended to provide a quick
387
+ roundup of build artifact metrics without re-running any part of the
388
+ build.
389
+
390
+ * `ceedling clean`:
391
+
392
+ Deletes all toolchain binary artifacts (object files, executables),
393
+ test results, and any temporary files. Clean produces no output at the
394
+ command line unless verbosity has been set to an appreciable level.
395
+
396
+ * `ceedling clobber`:
397
+
398
+ Extends clean task's behavior to also remove generated files: test
399
+ runners, mocks, preprocessor output. Clobber produces no output at the
400
+ command line unless verbosity has been set to an appreciable level.
401
+
402
+ * `ceedling options:export`:
403
+
404
+ This allows you to export a snapshot of your current tool configuration
405
+ as a yaml file. You can specify the name of the file in brackets `[blah.yml]`
406
+ or let it default to `tools.yml`. In either case, the produced file can be
407
+ used as the tool configuration for you project if desired, and modified as you
408
+ wish.
409
+
410
+ To better understand Rake conventions, Rake execution, and
411
+ Rakefiles, consult the [Rake tutorial, examples, and user guide][guide].
412
+
413
+ [guide]: http://rubyrake.org/
414
+
415
+ At present, none of Ceedling's commands provide persistence.
416
+ That is, they must each be specified at the command line each time
417
+ they are needed. For instance, Ceedling's verbosity command
418
+ only affects output at the time it's run.
419
+
420
+ Individual test and release file tasks
421
+ are not listed in `-T` output. Because so many files may be present
422
+ it's unwieldy to list them all.
423
+
424
+ Multiple rake tasks can be executed at the command line (order
425
+ is executed as provided). For example, `ceed
426
+ clobber test:all release` will removed all generated files;
427
+ build and run all tests; and then build all source - in that order.
428
+ If any Rake task fails along the way, execution halts before the
429
+ next task.
430
+
431
+ The `clobber` task removes certain build directories in the
432
+ course of deleting generated files. In general, it's best not
433
+ to add to source control any Ceedling generated directories
434
+ below the root of your top-level build directory. That is, leave
435
+ anything Ceedling & its accompanying tools generate out of source
436
+ control (but go ahead and add the top-level build directory that
437
+ holds all that stuff). Also, since Ceedling is pretty smart about
438
+ what it rebuilds and regenerates, you needn't clobber often.
439
+
440
+ Important Conventions
441
+ =====================
442
+
443
+ Directory Structure, Filenames & Extensions
444
+ -------------------------------------------
445
+
446
+ Much of Ceedling's functionality is driven by collecting files
447
+ matching certain patterns inside the paths it's configured
448
+ to search. See the documentation for the [:extension] section
449
+ of your configuration file (found later in this document) to
450
+ configure the file extensions Ceedling uses to match and collect
451
+ files. Test file naming is covered later in this section.
452
+
453
+ Test files and source files must be segregated by directories.
454
+ Any directory structure will do. Tests can be held in subdirectories
455
+ within source directories, or tests and source directories
456
+ can be wholly separated at the top of your project's directory
457
+ tree.
458
+
459
+ Search Path Order
460
+ -----------------
461
+
462
+ When Ceedling searches for files (e.g. looking for header files
463
+ to mock) or when it provides search paths to any of the default
464
+ gcc toolchain executables, it organizes / prioritizes its search
465
+ paths. The order is always: test paths, support paths, source
466
+ paths, and then include paths. This can be useful, for instance,
467
+ in certain testing scenarios where we desire Ceedling or a compiler
468
+ to find a stand-in header file in our support directory before
469
+ the actual source header file of the same name.
470
+
471
+ This convention only holds when Ceedling is using its default
472
+ tool configurations and / or when tests are involved. If you define
473
+ your own tools in the configuration file (see the [:tools] section
474
+ documented later in this here document), you have complete control
475
+ over what directories are searched and in what order. Further,
476
+ test and support directories are only searched when appropriate.
477
+ That is, when running a release build, test and support directories
478
+ are not used at all.
479
+
480
+ Source Files & Binary Release Artifacts
481
+ ---------------------------------------
482
+
483
+ Your binary release artifact results from the compilation and
484
+ linking of all source files Ceedling finds in the specified source
485
+ directories. At present only source files with a single (configurable)
486
+ extension are recognized. That is, `*.c` and `*.cc` files will not
487
+ both be recognized - only one or the other. See the configuration
488
+ options and defaults in the documentation for the [:extension]
489
+ sections of your configuration file (found later in this document).
490
+
491
+ Test Files & Executable Test Fixtures
492
+ -------------------------------------
493
+
494
+ Ceedling builds each individual test file with its accompanying
495
+ source file(s) into a single, monolithic test fixture executable.
496
+ Test files are recognized by a naming convention: a (configurable)
497
+ prefix such as "`test_`" in the file name with the same file extension
498
+ as used by your C source files. See the configuration options
499
+ and defaults in the documentation for the [:project] and [:extension]
500
+ sections of your configuration file (found later in this document).
501
+ Depending on your configuration options, Ceedling can recognize
502
+ a variety of test file naming patterns in your test search paths.
503
+ For example: `test_some_super_functionality.c`, `TestYourSourceFile.cc`,
504
+ or `testing_MyAwesomeCode.C` could each be valid test file
505
+ names. Note, however, that Ceedling can recognize only one test
506
+ file naming convention per project.
507
+
508
+ Ceedling knows what files to compile and link into each individual
509
+ test executable by way of the #include list contained in each
510
+ test file. Any C source files in the configured search directories
511
+ that correspond to the header files included in a test file will
512
+ be compiled and linked into the resulting test fixture executable.
513
+ From this same #include list, Ceedling knows which files to mock
514
+ and compile and link into the test executable (if you use mocks
515
+ in your tests). That was a lot of clauses and information in a very
516
+ few sentences; the example that follows in a bit will make it clearer.
517
+
518
+ By naming your test functions according to convention, Ceedling
519
+ will extract and collect into a runner C file calls to all your
520
+ test case functions. This runner file handles all the execution
521
+ minutiae so that your test file can be quite simple and so that
522
+ you never forget to wire up a test function to be executed. In this
523
+ generated runner lives the `main()` entry point for the resulting
524
+ test executable. There are no configuration options for the
525
+ naming convention of your test case functions. A test case function
526
+ signature must have these three elements: void return, void
527
+ parameter list, and the function name prepended with lowercase
528
+ "`test`". In other words, a test function signature should look
529
+ like this: `void test``[any name you like]``(void)`.
530
+
531
+ A commented sample test file follows on the next page. Also, see
532
+ the sample project contained in the Ceedling documentation
533
+ bundle.
534
+
535
+ ```c
536
+ // test_foo.c -----------------------------------------------
537
+ #include "unity.h" // compile/link in Unity test framework
538
+ #include "types.h" // header file with no *.c file -- no compilation/linking
539
+ #include "foo.h" // source file foo.c under test
540
+ #include "mock_bar.h" // bar.h will be found and mocked as mock_bar.c + compiled/linked in;
541
+ // foo.c includes bar.h and uses functions declared in it
542
+ #include "mock_baz.h" // baz.h will be found and mocked as mock_baz.c + compiled/linked in
543
+ // foo.c includes baz.h and uses functions declared in it
544
+
545
+
546
+ void setUp(void) {} // every test file requires this function;
547
+ // setUp() is called by the generated runner before each test case function
548
+
549
+ void tearDown(void) {} // every test file requires this function;
550
+ // tearDown() is called by the generated runner after each test case function
551
+
552
+ // a test case function
553
+ void test_Foo_Function1_should_Call_Bar_AndGrill(void)
554
+ {
555
+ Bar_AndGrill_Expect(); // setup function from mock_bar.c that instructs our
556
+ // framework to expect Bar_AndGrill() to be called once
557
+ TEST_ASSERT_EQUAL(0xFF, Foo_Function1()); // assertion provided by Unity
558
+ // Foo_Function1() calls Bar_AndGrill() & returns a byte
559
+ }
560
+
561
+ // another test case function
562
+ void test_Foo_Function2_should_Call_Baz_Tec(void)
563
+ {
564
+ Baz_Tec_ExpectAnd_Return(1); // setup function provided by mock_baz.c that instructs our
565
+ // framework to expect Baz_Tec() to be called once and return 1
566
+ TEST_ASSERT_TRUE(Foo_Function2()); // assertion provided by Unity
567
+ }
568
+
569
+ // end of test_foo.c ----------------------------------------
570
+ ```
571
+
572
+ From the test file specified above Ceedling will generate `test_foo_runner.c`;
573
+ this runner file will contain `main()` and call both of the example
574
+ test case functions.
575
+
576
+ The final test executable will be `test_foo.exe` (for Windows
577
+ machines or `test_foo.out` for linux systems - depending on default
578
+ or configured file extensions). Based on the #include list above,
579
+ the test executable will be the output of the linker having processed
580
+ `unity.o`, `foo.o`, `mock_bar.o`, `mock_baz.o`, `test_foo.o`,
581
+ and `test_foo_runner.o`. Ceedling finds the files, generates
582
+ mocks, generates a runner, compiles all the files, and links
583
+ everything into the test executable. Ceedling will then run
584
+ the test executable and collect test results from it to be reported
585
+ to the developer at the command line.
586
+
587
+ For more on the assertions and mocks shown, consult the documentation
588
+ for Unity and CMock.
589
+
590
+ The Magic of Dependency Tracking
591
+ --------------------------------
592
+
593
+ Ceedling is pretty smart in using Rake to build up your project's
594
+ dependencies. This means that Ceedling automagically rebuilds
595
+ all the appropriate files in your project when necessary: when
596
+ your configuration changes, Ceedling or any of the other tools
597
+ are updated, or your source or test files change. For instance,
598
+ if you modify a header file that is mocked, Ceedling will ensure
599
+ that the mock is regenerated and all tests that use that mock are
600
+ rebuilt and re-run when you initiate a relevant testing task.
601
+ When you see things rebuilding, it's for a good reason. Ceedling
602
+ attempts to regenerate and rebuild only what's needed for a given
603
+ execution of a task. In the case of large projects, assembling
604
+ dependencies and acting upon them can cause some delay in executing
605
+ tasks.
606
+
607
+ With one exception, the trigger to rebuild or regenerate a file
608
+ is always a disparity in timestamps between a target file and
609
+ its source - if an input file is newer than its target dependency,
610
+ the target is rebuilt or regenerated. For example, if the C source
611
+ file from which an object file is compiled is newer than that object
612
+ file on disk, recompilation will occur (of course, if no object
613
+ file exists on disk, compilation will always occur). The one
614
+ exception to this dependency behavior is specific to your input
615
+ configuration. Only if your logical configuration changes
616
+ will a system-wide rebuild occur. Reorganizing your input configuration
617
+ or otherwise updating its file timestamp without modifying
618
+ the values within the file will not trigger a rebuild. This behavior
619
+ handles the various ways in which your input configuration can
620
+ change (discussed later in this document) without having changed
621
+ your actual project YAML file.
622
+
623
+ Ceedling needs a bit of help to accomplish its magic with deep
624
+ dependencies. Shallow dependencies are straightforward:
625
+ a mock is dependent on the header file from which it's generated,
626
+ a test file is dependent upon the source files it includes (see
627
+ the preceding conventions section), etc. Ceedling handles
628
+ these "out of the box." Deep dependencies are specifically a
629
+ C-related phenomenon and occur as a consequence of include statements
630
+ within C source files. Say a source file includes a header file
631
+ and that header file in turn includes another header file which
632
+ includes still another header file. A change to the deepest header
633
+ file should trigger a recompilation of the source file, a relinking
634
+ of all the object files comprising a test fixture, and a new execution
635
+ of that test fixture.
636
+
637
+ Ceedling can handle deep dependencies but only with the help
638
+ of a C preprocessor. Ceedling is quite capable, but a full C preprocessor
639
+ it ain't. Your project can be configured to use a C preprocessor
640
+ or not. Simple projects or large projects constructed so as to
641
+ be quite flat in their include structure generally don't need
642
+ deep dependency preprocessing - and can enjoy the benefits of
643
+ faster execution. Legacy code, on the other hand, will almost
644
+ always want to be tested with deep preprocessing enabled. Set
645
+ up of the C preprocessor is covered in the documentation for the
646
+ [:project] and [:tools] section of the configuration file (later
647
+ in this document). Ceedling contains all the configuration
648
+ necessary to use the gcc preprocessor by default. That is, as
649
+ long as gcc is in your system search path, deep preprocessing
650
+ of deep dependencies is available to you by simply enabling it
651
+ in your project configuration file.
652
+
653
+ Ceedling's Build Output
654
+ -----------------------
655
+
656
+ Ceedling requires a top-level build directory for all the stuff
657
+ that it, the accompanying test tools, and your toolchain generate.
658
+ That build directory's location is configured in the [:project]
659
+ section of your configuration file (discussed later). There
660
+ can be a ton of generated files. By and large, you can live a full
661
+ and meaningful life knowing absolutely nothing at all about
662
+ the files and directories generated below the root build directory.
663
+
664
+ As noted already, it's good practice to add your top-level build
665
+ directory to source control but nothing generated beneath it.
666
+ You'll spare yourself headache if you let Ceedling delete and
667
+ regenerate files and directories in a non-versioned corner
668
+ of your project's filesystem beneath the top-level build directory.
669
+
670
+ The `artifacts` directory is the one and only directory you may
671
+ want to know about beneath the top-level build directory. The
672
+ subdirectories beneath `artifacts` will hold your binary release
673
+ target output (if your project is configured for release builds)
674
+ and will serve as the conventional location for plugin output.
675
+ This directory structure was chosen specifically because it
676
+ tends to work nicely with Continuous Integration setups that
677
+ recognize and list build artifacts for retrieval / download.
678
+
679
+ The Almighty Project Configuration File (in Glorious YAML)
680
+ ----------------------------------------------------------
681
+
682
+ Please consult YAML documentation for the finer points of format
683
+ and to understand details of our YAML-based configuration file.
684
+ We recommend [Wikipedia's entry on YAML](http://en.wikipedia.org/wiki/Yaml)
685
+ for this. A few highlights from that reference page:
686
+
687
+ * YAML streams are encoded using the set of printable Unicode
688
+ characters, either in UTF-8 or UTF-16
689
+
690
+ * Whitespace indentation is used to denote structure; however
691
+ tab characters are never allowed as indentation
692
+
693
+ * Comments begin with the number sign ( # ), can start anywhere
694
+ on a line, and continue until the end of the line unless enclosed
695
+ by quotes
696
+
697
+ * List members are denoted by a leading hyphen ( - ) with one member
698
+ per line, or enclosed in square brackets ( [ ] ) and separated
699
+ by comma space ( , )
700
+
701
+ * Hashes are represented using the colon space ( : ) in the form
702
+ key: value, either one per line or enclosed in curly braces
703
+ ( { } ) and separated by comma space ( , )
704
+
705
+ * Strings (scalars) are ordinarily unquoted, but may be enclosed
706
+ in double-quotes ( " ), or single-quotes ( ' )
707
+
708
+ * YAML requires that colons and commas used as list separators
709
+ be followed by a space so that scalar values containing embedded
710
+ punctuation can generally be represented without needing
711
+ to be enclosed in quotes
712
+
713
+ * Repeated nodes are initially denoted by an ampersand ( & ) and
714
+ thereafter referenced with an asterisk ( * )
715
+
716
+ Notes on what follows:
717
+
718
+ * Each of the following sections represent top-level entries
719
+ in the YAML configuration file.
720
+
721
+ * Unless explicitly specified in the configuration file, default
722
+ values are used by Ceedling.
723
+
724
+ * These three settings, at minimum, must be specified:
725
+ * [:project][:build_root]
726
+ * [:paths][:source]
727
+ * [:paths][:test]
728
+
729
+ * As much as is possible, Ceedling validates your settings in
730
+ properly formed YAML.
731
+
732
+ * Improperly formed YAML will cause a Ruby error when the YAML
733
+ is parsed. This is usually accompanied by a complaint with
734
+ line and column number pointing into the project file.
735
+
736
+ * Certain advanced features rely on gcc and cpp as preprocessing
737
+ tools. In most linux systems, these tools are already available.
738
+ For Windows environments, we recommend the [mingw project](http://www.mingw.org/)
739
+ (Minimalist GNU for Windows).
740
+
741
+ * Ceedling is primarily meant as a build tool to support automated
742
+ unit testing. All the heavy lifting is involved there. Creating
743
+ a simple binary release build artifact is quite trivial in
744
+ comparison. Consequently, most default options and the construction
745
+ of Ceedling itself is skewed towards supporting testing though
746
+ Ceedling can, of course, build your binary release artifact
747
+ as well. Note that complex binary release artifacts (e.g.
748
+ application + bootloader or multiple libraries) are beyond
749
+ Ceedling's release build ability.
750
+
751
+ Conventions / features of Ceedling-specific YAML:
752
+
753
+ * Any second tier setting keys anywhere in YAML whose names end
754
+ in `_path` or `_paths` are automagically processed like all
755
+ Ceedling-specific paths in the YAML to have consistent directory
756
+ separators (i.e. "/") and to take advantage of inline Ruby
757
+ string expansion (see [:environment] setting below for further
758
+ explanation of string expansion).
759
+
760
+ **Let's Be Careful Out There:** Ceedling performs validation
761
+ on the values you set in your configuration file (this assumes
762
+ your YAML is correct and will not fail format parsing, of course).
763
+ That said, validation is limited to only those settings Ceedling
764
+ uses and those that can be reasonably validated. Ceedling does
765
+ not limit what can exist within your configuration file. In this
766
+ way, you can take full advantage of YAML as well as add sections
767
+ and values for use in your own custom plugins (documented later).
768
+ The consequence of this is simple but important. A misspelled
769
+ configuration section name or value name is unlikely to cause
770
+ Ceedling any trouble. Ceedling will happily process that section
771
+ or value and simply use the properly spelled default maintained
772
+ internally - thus leading to unexpected behavior without warning.
773
+
774
+ project: global project settings
775
+
776
+ * `build_root`:
777
+
778
+ Top level directory into which generated path structure and files are
779
+ placed. Note: this is one of the handful of configuration values that
780
+ must be set. The specified path can be absolute or relative to your
781
+ working directory.
782
+
783
+ **Default**: (none)
784
+
785
+ * `use_exceptions`:
786
+
787
+ Configures the build environment to make use of CException. Note that
788
+ if you do not use exceptions, there's no harm in leaving this as its
789
+ default value.
790
+
791
+ **Default**: TRUE
792
+
793
+ * `use_mocks`:
794
+
795
+ Configures the build environment to make use of CMock. Note that if
796
+ you do not use mocks, there's no harm in leaving this setting as its
797
+ default value.
798
+
799
+ **Default**: TRUE
800
+
801
+ * `use_test_preprocessor`:
802
+
803
+ This option allows Ceedling to work with test files that contain
804
+ conditional compilation statements (e.g. #ifdef) and header files you
805
+ wish to mock that contain conditional preprocessor statements and/or
806
+ macros.
807
+
808
+ Ceedling and CMock are advanced tools with sophisticated parsers.
809
+ However, they do not include entire C language preprocessors.
810
+ Consequently, with this option enabled, Ceedling will use gcc's
811
+ preprocessing mode and the cpp preprocessor tool to strip down /
812
+ expand test files and headers to their applicable content which can
813
+ then be processed by Ceedling and CMock.
814
+
815
+ With this option enabled, the gcc & cpp tools must exist in an
816
+ accessible system search path and test runner files are always
817
+ regenerated.
818
+
819
+ **Default**: FALSE
820
+
821
+ * `use_deep_dependencies`:
822
+
823
+ The base rules and tasks that Ceedling creates using Rake capture most
824
+ of the dependencies within a standard project (e.g. when the source
825
+ file accompanying a test file changes, the corresponding test fixture
826
+ executable will be rebuilt when tests are re-run). However, deep
827
+ dependencies cannot be captured this way. If a typedef or macro
828
+ changes in a header file three levels of #include statements deep,
829
+ this option allows the appropriate incremental build actions to occur
830
+ for both test execution and release builds.
831
+
832
+ This is accomplished by using the dependencies discovery mode of gcc.
833
+ With this option enabled, gcc must exist in an accessible system
834
+ search path.
835
+
836
+ **Default**: FALSE
837
+
838
+ * `generate_deep_dependencies`:
839
+
840
+ When `use_deep_dependencies` is set to TRUE, Ceedling will run a separate
841
+ build step to generate the deep dependencies. If you are using gcc as your
842
+ primary compiler, or another compiler that can generate makefile rules as
843
+ a side effect of compilation, then you can set this to FALSE to avoid the
844
+ extra build step but still use the deep dependencies data when deciding
845
+ which source files to rebuild.
846
+
847
+ **Default**: TRUE
848
+
849
+ * `test_file_prefix`:
850
+
851
+ Ceedling collects test files by convention from within the test file
852
+ search paths. The convention includes a unique name prefix and a file
853
+ extension matching that of source files.
854
+
855
+ Why not simply recognize all files in test directories as test files?
856
+ By using the given convention, we have greater flexibility in what we
857
+ do with C files in the test directories.
858
+
859
+ **Default**: "test_"
860
+
861
+ * `options_paths`:
862
+
863
+ Just as you may have various build configurations for your source
864
+ codebase, you may need variations of your project configuration.
865
+
866
+ By specifying options paths, Ceedling will search for other project
867
+ YAML files, make command line tasks available (ceedling options:variation
868
+ for a variation.yml file), and merge the project configuration of
869
+ these option files in with the main project file at runtime. See
870
+ advanced topics.
871
+
872
+ Note these Rake tasks at the command line - like verbosity or logging
873
+ control - must come before the test or release task they are meant to
874
+ modify.
875
+
876
+ **Default**: `[]` (empty)
877
+
878
+ * `release_build`:
879
+
880
+ When enabled, a release Rake task is exposed. This configuration
881
+ option requires a corresponding release compiler and linker to be
882
+ defined (gcc is used as the default).
883
+
884
+ More release configuration options are available in the release_build
885
+ section.
886
+
887
+ **Default**: FALSE
888
+
889
+
890
+ Example `[:project]` YAML blurb
891
+
892
+ ```yaml
893
+ :project:
894
+ :build_root: project_awesome/build
895
+ :use_exceptions: FALSE
896
+ :use_test_preprocessor: TRUE
897
+ :use_deep_dependencies: TRUE
898
+ :options_paths:
899
+ - project/options
900
+ - external/shared/options
901
+ :release_build: TRUE
902
+ ```
903
+
904
+ Ceedling is primarily concerned with facilitating the somewhat
905
+ complicated mechanics of automating unit tests. The same mechanisms
906
+ are easily capable of building a final release binary artifact
907
+ (i.e. non test code; the thing that is your final working software
908
+ that you execute on target hardware).
909
+
910
+
911
+ * `output`:
912
+
913
+ The name of your release build binary artifact to be found in <build
914
+ path>/artifacts/release. Ceedling sets the default artifact file
915
+ extension to that as is explicitly specified in the [:extension]
916
+ section or as is system specific otherwise.
917
+
918
+ **Default**: `project.exe` or `project.out`
919
+
920
+ * `use_assembly`:
921
+
922
+ If assembly code is present in the source tree, this option causes
923
+ Ceedling to create appropriate build directories and use an assembler
924
+ tool (default is the GNU tool as - override available in the [:tools]
925
+ section.
926
+
927
+ **Default**: FALSE
928
+
929
+ * `artifacts`:
930
+
931
+ By default, Ceedling copies to the <build path>/artifacts/release
932
+ directory the output of the release linker and (optionally) a map
933
+ file. Many toolchains produce other important output files as well.
934
+ Adding a file path to this list will cause Ceedling to copy that file
935
+ to the artifacts directory. The artifacts directory is helpful for
936
+ organizing important build output files and provides a central place
937
+ for tools such as Continuous Integration servers to point to build
938
+ output. Selectively copying files prevents incidental build cruft from
939
+ needlessly appearing in the artifacts directory. Note that inline Ruby
940
+ string replacement is available in the artifacts paths (see discussion
941
+ in the [:environment] section).
942
+
943
+ **Default**: `[]` (empty)
944
+
945
+ Example `[:release_build]` YAML blurb
946
+
947
+ ```yaml
948
+ :release_build:
949
+ :output: top_secret.bin
950
+ :use_assembly: TRUE
951
+ :artifacts:
952
+ - build/release/out/c/top_secret.s19
953
+ ```
954
+
955
+ **paths**: options controlling search paths for source and header
956
+ (and assembly) files
957
+
958
+ * `test`:
959
+
960
+ All C files containing unit test code. Note: this is one of the
961
+ handful of configuration values that must be set.
962
+
963
+ **Default**: `[]` (empty)
964
+
965
+ * `source`:
966
+
967
+ All C files containing release code (code to be tested). Note: this is
968
+ one of the handful of configuration values that must be set.
969
+
970
+ **Default**: `[]` (empty)
971
+
972
+ * `support`:
973
+
974
+ Any C files you might need to aid your unit testing. For example, on
975
+ occasion, you may need to create a header file containing a subset of
976
+ function signatures matching those elsewhere in your code (e.g. a
977
+ subset of your OS functions, a portion of a library API, etc.). Why?
978
+ To provide finer grained control over mock function substitution or
979
+ limiting the size of the generated mocks.
980
+
981
+ **Default**: `[]` (empty)
982
+
983
+ * `include`:
984
+
985
+ Any header files not already in the source search path. Note there's
986
+ no practical distinction between this search path and the source
987
+ search path; it's merely to provide options or to support any
988
+ peculiar source tree organization.
989
+
990
+ **Default**: `[]` (empty)
991
+
992
+ * `test_toolchain_include`:
993
+
994
+ System header files needed by the test toolchain - should your
995
+ compiler be unable to find them, finds the wrong system include search
996
+ path, or you need a creative solution to a tricky technical problem.
997
+ Note that if you configure your own toolchain in the [:tools] section,
998
+ this search path is largely meaningless to you. However, this is a
999
+ convenient way to control the system include path should you rely on
1000
+ the default gcc tools.
1001
+
1002
+ **Default**: `[]` (empty)
1003
+
1004
+ * `release_toolchain_include`:
1005
+
1006
+ Same as preceding albeit related to the release toolchain.
1007
+
1008
+ **Default**: `[]` (empty)
1009
+
1010
+ * `<custom>`
1011
+
1012
+ Any paths you specify for custom list. List is available to tool
1013
+ configurations and/or plugins. Note a distinction. The preceding names
1014
+ are recognized internally to Ceedling and the path lists are used to
1015
+ build collections of files contained in those paths. A custom list is
1016
+ just that - a custom list of paths.
1017
+
1018
+ Notes on path grammar within the [:paths] section:
1019
+
1020
+ * Order of search paths listed in [:paths] is preserved when used by an
1021
+ entry in the [:tools] section
1022
+
1023
+ * Wherever multiple path lists are combined for use Ceedling prioritizes
1024
+ path groups as follows:
1025
+ test paths, support paths, source paths, include paths.
1026
+
1027
+ This can be useful, for instance, in certain testing scenarios where
1028
+ we desire Ceedling or the compiler to find a stand-in header file before
1029
+ the actual source header file of the same name.
1030
+
1031
+ * Paths:
1032
+
1033
+ 1. can be absolute or relative
1034
+
1035
+ 2. can be singly explicit - a single fully specified path
1036
+
1037
+ 3. can include a glob operator (more on this below)
1038
+
1039
+ 4. can use inline Ruby string replacement (see [:environment]
1040
+ section for more)
1041
+
1042
+ 5. default as an addition to a specific search list (more on this
1043
+ in the examples)
1044
+
1045
+ 6. can act to subtract from a glob included in the path list (more
1046
+ on this in the examples)
1047
+
1048
+ [Globs](http://ruby.about.com/od/beginningruby/a/dir2.htm)
1049
+ as used by Ceedling are wildcards for specifying directories
1050
+ without the need to list each and every required search path.
1051
+ Ceedling globs operate just as Ruby globs except that they are
1052
+ limited to matching directories and not files. Glob operators
1053
+ include the following * ** ? [-] {,} (note: this list is space separated
1054
+ and not comma separated as commas are used within the bracket
1055
+ operators).
1056
+
1057
+ * `*`:
1058
+
1059
+ All subdirectories of depth 1 below the parent path and including the
1060
+ parent path
1061
+
1062
+ * `**`:
1063
+
1064
+ All subdirectories recursively discovered below the parent path and
1065
+ including the parent path
1066
+
1067
+ * `?`:
1068
+
1069
+ Single alphanumeric character wildcard
1070
+
1071
+ * `[x-y]`:
1072
+
1073
+ Single alphanumeric character as found in the specified range
1074
+
1075
+ * `{x,y}`:
1076
+
1077
+ Single alphanumeric character from the specified list
1078
+
1079
+ Example [:paths] YAML blurbs
1080
+
1081
+ ```yaml
1082
+ :paths:
1083
+ :source: #together the following comprise all source search paths
1084
+ - project/source/* #expansion yields all subdirectories of depth 1 plus parent directory
1085
+ - project/lib #single path
1086
+ :test: #all test search paths
1087
+ - project/**/test? #expansion yields any subdirectory found anywhere in the project that
1088
+ #begins with "test" and contains 5 characters
1089
+
1090
+ :paths:
1091
+ :source: #all source search paths
1092
+ - +:project/source/** #all subdirectories recursively discovered plus parent directory
1093
+ - -:project/source/os/generated #subtract os/generated directory from expansion of above glob
1094
+ #note that '+:' notation is merely aesthetic; default is to add
1095
+
1096
+ :test: #all test search paths
1097
+ - project/test/bootloader #explicit, single search paths (searched in the order specified)
1098
+ - project/test/application
1099
+ - project/test/utilities
1100
+
1101
+ :custom: #custom path list
1102
+ - "#{PROJECT_ROOT}/other" #inline Ruby string expansion
1103
+ ```
1104
+
1105
+ Globs and inline Ruby string expansion can require trial and
1106
+ error to arrive at your intended results. Use the `ceedling paths:*`
1107
+ command line options (documented in preceding section) to verify
1108
+ your settings.
1109
+
1110
+ Ceedling relies on file collections automagically assembled
1111
+ from paths, globs, and file extensions. File collections greatly
1112
+ simplify project set up. However, sometimes you need to remove
1113
+ from or add individual files to those collections.
1114
+
1115
+
1116
+ * `test`:
1117
+
1118
+ Modify the collection of unit test C files.
1119
+
1120
+ **Default**: `[]` (empty)
1121
+
1122
+ * `source`:
1123
+
1124
+ Modify the collection of all source files used in unit test builds and release builds.
1125
+
1126
+ **Default**: `[]` (empty)
1127
+
1128
+ * `assembly`:
1129
+
1130
+ Modify the (optional) collection of assembly files used in release builds.
1131
+
1132
+ **Default**: `[]` (empty)
1133
+
1134
+ * `include`:
1135
+
1136
+ Modify the collection of all source header files used in unit test builds (e.g. for mocking) and release builds.
1137
+
1138
+ **Default**: `[]` (empty)
1139
+
1140
+ * `support`:
1141
+
1142
+ Modify the collection of supporting C files available to unit tests builds.
1143
+
1144
+ **Default**: `[]` (empty)
1145
+
1146
+ * `libraries`:
1147
+
1148
+ Add a collection of library paths to be included when linking.
1149
+
1150
+ **Default**: `[]` (empty)
1151
+
1152
+
1153
+ Note: All path grammar documented in [:paths] section applies
1154
+ to [:files] path entries - albeit at the file path level and not
1155
+ the directory level.
1156
+
1157
+ Example [:files] YAML blurb
1158
+
1159
+ ```yaml
1160
+ :files:
1161
+ :source:
1162
+ - callbacks/comm.c # entry defaults to file addition
1163
+ - +:callbacks/comm*.c # add all comm files matching glob pattern
1164
+ - -:source/board/atm134.c # not our board
1165
+ :test:
1166
+ - -:test/io/test_output_manager.c # remove unit tests from test build
1167
+ ```
1168
+
1169
+ **environment:** inserts environment variables into the shell
1170
+ instance executing configured tools
1171
+
1172
+ Ceedling creates environment variables from any key / value
1173
+ pairs in the environment section. Keys become an environment
1174
+ variable name in uppercase. The values are strings assigned
1175
+ to those environment variables. These value strings are either
1176
+ simple string values in YAML or the concatenation of a YAML array.
1177
+
1178
+ Ceedling is able to execute inline Ruby string substitution
1179
+ code to set environment variables. This evaluation occurs when
1180
+ the project file is first processed for any environment pair's
1181
+ value string including the Ruby string substitution pattern
1182
+ `#{…}`. Note that environment value strings that _begin_ with
1183
+ this pattern should always be enclosed in quotes. YAML defaults
1184
+ to processing unquoted text as a string; quoting text is optional.
1185
+ If an environment pair's value string begins with the Ruby string
1186
+ substitution pattern, YAML will interpret the string as a Ruby
1187
+ comment (because of the `#`). Enclosing each environment value
1188
+ string in quotes is a safe practice.
1189
+
1190
+ [:environment] entries are processed in the configured order
1191
+ (later entries can reference earlier entries).
1192
+
1193
+ Special case: PATH handling
1194
+
1195
+ In the specific case of specifying an environment key named _path_,
1196
+ an array of string values will be concatenated with the appropriate
1197
+ platform-specific path separation character (e.g. ':' on linux,
1198
+ ';' on Windows). All other instances of environment keys assigned
1199
+ YAML arrays use simple concatenation.
1200
+
1201
+ Example [:environment] YAML blurb
1202
+
1203
+ ```yaml
1204
+ :environment:
1205
+ - :license_server: gizmo.intranet #LICENSE_SERVER set with value "gizmo.intranet"
1206
+ - :license: "#{`license.exe`}" #LICENSE set to string generated from shelling out to
1207
+ #execute license.exe; note use of enclosing quotes
1208
+
1209
+ - :path: #concatenated with path separator (see special case above)
1210
+ - Tools/gizmo/bin #prepend existing PATH with gizmo path
1211
+ - "#{ENV['PATH']}" #pattern #{…} triggers ruby evaluation string substitution
1212
+ #note: value string must be quoted because of '#'
1213
+
1214
+ - :logfile: system/logs/thingamabob.log #LOGFILE set with path for a log file
1215
+ ```
1216
+
1217
+ **extension**: configure file name extensions used to collect lists of files searched in [:paths]
1218
+
1219
+ * `header`:
1220
+
1221
+ C header files
1222
+
1223
+ **Default**: .h
1224
+
1225
+ * `source`:
1226
+
1227
+ C code files (whether source or test files)
1228
+
1229
+ **Default**: .c
1230
+
1231
+ * `assembly`:
1232
+
1233
+ Assembly files (contents wholly assembly instructions)
1234
+
1235
+ **Default**: .s
1236
+
1237
+ * `object`:
1238
+
1239
+ Resulting binary output of C code compiler (and assembler)
1240
+
1241
+ **Default**: .o
1242
+
1243
+ * `executable`:
1244
+
1245
+ Binary executable to be loaded and executed upon target hardware
1246
+
1247
+ **Default**: .exe or .out (Win or linux)
1248
+
1249
+ * `testpass`:
1250
+
1251
+ Test results file (not likely to ever need a new value)
1252
+
1253
+ **Default**: .pass
1254
+
1255
+ * `testfail`:
1256
+
1257
+ Test results file (not likely to ever need a new value)
1258
+
1259
+ **Default**: .fail
1260
+
1261
+ * `dependencies`:
1262
+
1263
+ File containing make-style dependency rules created by gcc preprocessor
1264
+
1265
+ **Default**: .d
1266
+
1267
+
1268
+ Example [:extension] YAML blurb
1269
+
1270
+ :extension:
1271
+ :source: .cc
1272
+ :executable: .bin
1273
+
1274
+ **defines**: command line defines used in test and release compilation by configured tools
1275
+
1276
+ * `test`:
1277
+
1278
+ Defines needed for testing. Useful for:
1279
+
1280
+ 1. test files containing conditional compilation statements (i.e.
1281
+ tests active in only certain contexts)
1282
+
1283
+ 2. testing legacy source wherein the isolation of source under test
1284
+ afforded by Ceedling and its complementary tools leaves certain
1285
+ symbols unset when source files are compiled in isolation
1286
+
1287
+ **Default**: `[]` (empty)
1288
+
1289
+ * `test_preprocess`:
1290
+
1291
+ If [:project][:use_test_preprocessor] or
1292
+ [:project][:use_deep_dependencies] is set and code is structured in a
1293
+ certain way, the gcc preprocessor may need symbol definitions to
1294
+ properly preprocess files to extract function signatures for mocking
1295
+ and extract deep dependencies for incremental builds.
1296
+
1297
+ **Default**: `[]` (empty)
1298
+
1299
+ * `<test_name>`:
1300
+
1301
+ Add preprocessor definitions for specified `<test_name>`. For example:
1302
+ ```yaml
1303
+ :defines:
1304
+ :test_foo_config:
1305
+ - FOO_SPECIFIC_FEATURE
1306
+ ```
1307
+ `ceedling test:foo_config` will now have `FOO_SPECIFIC_FEATURE` defined, none of the other tests will.
1308
+
1309
+ **Default**: `[]` (empty)
1310
+
1311
+ * `release`:
1312
+
1313
+ Defines needed for the release build binary artifact.
1314
+
1315
+ **Default**: `[]` (empty)
1316
+
1317
+ * `release_preprocess`:
1318
+
1319
+ If [:project][:use_deep_dependencies] is set and code is structured in
1320
+ a certain way, the gcc preprocessor may need symbol definitions to
1321
+ properly preprocess files for incremental release builds due to deep
1322
+ dependencies.
1323
+
1324
+ **Default**: `[]` (empty)
1325
+
1326
+ * `use_test_definition`:
1327
+
1328
+ When this option is used the `-D<test_name>` flag is added to the build option.
1329
+
1330
+ **Default**: FALSE
1331
+
1332
+ Example [:defines] YAML blurb
1333
+
1334
+ ```yaml
1335
+ :defines:
1336
+ :test:
1337
+ - UNIT_TESTING #for select cases in source to allow testing with a changed behavior or interface
1338
+ - OFF=0
1339
+ - ON=1
1340
+ - FEATURE_X=ON
1341
+ :source:
1342
+ - FEATURE_X=ON
1343
+ ```
1344
+
1345
+
1346
+ **libraries**: command line defines used in test and release compilation by configured tools
1347
+
1348
+ Ceedling allows you to pull in specific libraries for the purpose of release and test builds.
1349
+ It has a few levels of support for this. Start by adding a :libraries main section in your
1350
+ configuration. In this section, you can optionally have the following subsections:
1351
+
1352
+ * `test`:
1353
+
1354
+ Library files that should be injected into your tests when linking occurs.
1355
+ These can be specified as either relative or absolute paths. These files MUST
1356
+ exist when the test attempts to build.
1357
+
1358
+ * `release`:
1359
+
1360
+ Library files that should be injected into your release when linking occurs. These
1361
+ can be specified as either relative or absolute paths. These files MUST exist when
1362
+ the release attempts to build UNLESS you are using the subprojects plugin. In that
1363
+ case, it will attempt to build that library for you as a dynamic dependency.
1364
+
1365
+ * `system`:
1366
+
1367
+ These libraries are assumed to be in the tool path somewhere and shouldn't need to be
1368
+ specified. The libraries added here will be injected into releases and tests. For example
1369
+ if you specify `-lm` you can include the math library. The `-l` portion is only necessary
1370
+ if the `:flag` prefix below doesn't specify it already for you other libraries.
1371
+
1372
+ * `flag`:
1373
+
1374
+ This is the method of adding an argument for each library. For example, gcc really likes
1375
+ it when you specify “-l${1}”
1376
+
1377
+ * `path_flag`:
1378
+
1379
+ This is the method of adding an path argument for each library path. For example, gcc really
1380
+ likes it when you specify “-L \"${1}\"”
1381
+
1382
+ Notes:
1383
+
1384
+ * If you've specified your own link step, you are going to want to add ${4} to your argument
1385
+ list in the place where library files should be added to the command call. For gcc, this is
1386
+ often the very end. Other tools may vary.
1387
+
1388
+
1389
+ **flags**: configure per-file compilation and linking flags
1390
+
1391
+ Ceedling tools (see later [:tools] section) are used to configure
1392
+ compilation and linking of test and source files. These tool
1393
+ configurations are a one-size-fits-all approach. Should individual files
1394
+ require special compilation or linking flags, the settings in the
1395
+ [:flags] section work in conjunction with tool definitions by way of
1396
+ argument substitution to achieve this.
1397
+
1398
+ * `release`:
1399
+
1400
+ [:compile] or [:link] flags for release build
1401
+
1402
+ * `test`:
1403
+
1404
+ [:compile] or [:link] flags for test build
1405
+
1406
+ Notes:
1407
+
1408
+ * Ceedling works with the [:release] and [:test] build contexts
1409
+ as-is; plugins can add additional contexts
1410
+
1411
+ * Only [:compile] and [:link] are recognized operations beneath
1412
+ a context
1413
+
1414
+ * File specifiers do not include a path or file extension
1415
+
1416
+ * File specifiers are case sensitive (must match original file
1417
+ name)
1418
+
1419
+ * File specifiers do support regular expressions if encased in quotes
1420
+
1421
+ * '`*`' is a special (optional) file specifier to provide flags
1422
+ to all files not otherwise specified
1423
+
1424
+
1425
+ Example [:flags] YAML blurb
1426
+
1427
+ ```yaml
1428
+ :flags:
1429
+ :release:
1430
+ :compile:
1431
+ :main: # add '-Wall' to compilation of main.c
1432
+ - -Wall
1433
+ :fan: # add '--O2' to compilation of fan.c
1434
+ - --O2
1435
+ :'test_.+': # add '-pedantic' to all test-files
1436
+ - -pedantic
1437
+ :*: # add '-foo' to compilation of all files not main.c or fan.c
1438
+ - -foo
1439
+ :test:
1440
+ :compile:
1441
+ :main: # add '--O1' to compilation of main.c as part of test builds including main.c
1442
+ - --O1
1443
+ :link:
1444
+ :test_main: # add '--bar --baz' to linking of test_main.exe
1445
+ - --bar
1446
+ - --baz
1447
+ ```
1448
+
1449
+ **import**: Load additional config files
1450
+
1451
+ In some cases it is nice to have config files (project.yml, options files) which can
1452
+ load other config files, for commonly re-used definitions (target processor,
1453
+ common code modules, etc).
1454
+
1455
+ These can be recursively nested, the included files can include other files.
1456
+
1457
+ To import config files, either provide an array of files to import, or use hashes to set imports. The former is useful if you do not anticipate needing to replace a given file for different configurations (project: or options:). If you need to replace/remove imports based on different configuration files, use the hashed version. The two methods cannot be mixed in the same .yml.
1458
+
1459
+ Example [:import] YAML blurb using array
1460
+
1461
+ ```yaml
1462
+ :import:
1463
+ - path/to/config.yml
1464
+ - path/to/another/config.yml
1465
+ ```
1466
+ Example [:import] YAML blurb using hashes
1467
+
1468
+ ```yaml
1469
+ :import:
1470
+ :configA: path/to/config.yml
1471
+ :configB: path/to/another/config.yml
1472
+ ```
1473
+
1474
+
1475
+ Ceedling sets values for a subset of CMock settings. All CMock
1476
+ options are available to be set, but only those options set by
1477
+ Ceedling in an automated fashion are documented below. See CMock
1478
+ documentation.
1479
+
1480
+ **cmock**: configure CMock's code generation options and set symbols used to modify CMock's compiled features
1481
+ Ceedling sets values for a subset of CMock settings. All CMock options are available to be set, but only those options set by Ceedling in an automated fashion are documented below. See CMock documentation.
1482
+
1483
+ * `enforce_strict_ordering`:
1484
+
1485
+ Tests fail if expected call order is not same as source order
1486
+
1487
+ **Default**: TRUE
1488
+
1489
+ * `mock_path`:
1490
+
1491
+ Path for generated mocks
1492
+
1493
+ **Default**: <build path>/tests/mocks
1494
+
1495
+ * `defines`:
1496
+
1497
+ List of conditional compilation symbols used to configure CMock's
1498
+ compiled features. See CMock documentation to understand available
1499
+ options. No symbols must be set unless defaults are inappropriate for
1500
+ your specific environment. All symbols are used only by Ceedling to
1501
+ compile CMock C code; contents of [:defines] are ignored by CMock's
1502
+ Ruby code when instantiated.
1503
+
1504
+ **Default**: `[]` (empty)
1505
+
1506
+ * `verbosity`:
1507
+
1508
+ If not set, defaults to Ceedling's verbosity level
1509
+
1510
+ * `plugins`:
1511
+
1512
+ If [:project][:use_exceptions] is enabled, the internal plugins list is pre-populated with 'cexception'.
1513
+
1514
+ Whether or not you have included [:cmock][:plugins] in your
1515
+ configuration file, Ceedling automatically adds 'cexception' to the
1516
+ plugin list if exceptions are enabled. To add to the list Ceedling
1517
+ provides CMock, simply add [:cmock][:plugins] to your configuration
1518
+ and specify your desired additional plugins.
1519
+
1520
+ Each of the plugins have their own additional documentation.
1521
+
1522
+
1523
+ * `includes`:
1524
+
1525
+ If [:cmock][:unity_helper] set, pre-populated with unity_helper file
1526
+ name (no path).
1527
+
1528
+ The [:cmock][:includes] list works identically to the plugins list
1529
+ above with regard to adding additional files to be inserted within
1530
+ mocks as #include statements.
1531
+
1532
+
1533
+ The last four settings above are directly tied to other Ceedling
1534
+ settings; hence, why they are listed and explained here. The
1535
+ first setting above, [:enforce_strict_ordering], defaults
1536
+ to FALSE within CMock. It is set to TRUE by default in Ceedling
1537
+ as our way of encouraging you to use strict ordering. It's a teeny
1538
+ bit more expensive in terms of code generated, test execution
1539
+ time, and complication in deciphering test failures. However,
1540
+ it's good practice. And, of course, you can always disable it
1541
+ by overriding the value in the Ceedling YAML configuration file.
1542
+
1543
+
1544
+ **cexception**: configure symbols used to modify CException's compiled features
1545
+
1546
+ * `defines`:
1547
+
1548
+ List of conditional compilation symbols used to configure CException's
1549
+ features in its source and header files. See CException documentation
1550
+ to understand available options. No symbols must be set unless the
1551
+ defaults are inappropriate for your specific environment.
1552
+
1553
+ **Default**: `[]` (empty)
1554
+
1555
+
1556
+ **unity**: configure symbols used to modify Unity's compiled features
1557
+
1558
+ * `defines`:
1559
+
1560
+ List of conditional compilation symbols used to configure Unity's
1561
+ features in its source and header files. See Unity documentation to
1562
+ understand available options. No symbols must be set unless the
1563
+ defaults are inappropriate for your specific environment. Most Unity
1564
+ defines can be easily configured through the YAML file.
1565
+
1566
+ **Default**: `[]` (empty)
1567
+
1568
+ Example [:unity] YAML blurbs
1569
+ ```yaml
1570
+ :unity: #itty bitty processor & toolchain with limited test execution options
1571
+ :defines:
1572
+ - UNITY_INT_WIDTH=16 #16 bit processor without support for 32 bit instructions
1573
+ - UNITY_EXCLUDE_FLOAT #no floating point unit
1574
+
1575
+ :unity: #great big gorilla processor that grunts and scratches
1576
+ :defines:
1577
+ - UNITY_SUPPORT_64 #big memory, big counters, big registers
1578
+ - UNITY_LINE_TYPE=\"unsigned int\" #apparently we're using really long test files,
1579
+ - UNITY_COUNTER_TYPE=\"unsigned int\" #and we've got a ton of test cases in those test files
1580
+ - UNITY_FLOAT_TYPE=\"double\" #you betcha
1581
+ ```
1582
+
1583
+
1584
+ Notes on Unity configuration:
1585
+
1586
+ * **Verification** - Ceedling does no verification of your configuration
1587
+ values. In a properly configured setup, your Unity configuration
1588
+ values are processed, collected together with any test define symbols
1589
+ you specify elsewhere, and then passed to your toolchain during test
1590
+ compilation. Unity's conditional compilation statements, your
1591
+ toolchain's preprocessor, and/or your toolchain's compiler will
1592
+ complain appropriately if your specified configuration values are
1593
+ incorrect, incomplete, or incompatible.
1594
+
1595
+ * **Routing $stdout** - Unity defaults to using `putchar()` in C's
1596
+ standard library to display test results. For more exotic environments
1597
+ than a desktop with a terminal (e.g. running tests directly on a
1598
+ non-PC target), you have options. For example, you could create a
1599
+ routine that transmits a character via RS232 or USB. Once you have
1600
+ that routine, you can replace `putchar()` calls in Unity by overriding
1601
+ the function-like macro `UNITY_OUTPUT_CHAR`. Consult your toolchain
1602
+ and shell documentation. Eventhough this can also be defined in the YAML file
1603
+ most shell environments do not handle parentheses as command line arguments
1604
+ very well. To still be able to add this functionality all necessary
1605
+ options can be defined in the `unity_config.h`. Unity needs to be told to look for
1606
+ the `unity_config.h` in the YAML file, though.
1607
+
1608
+ Example [:unity] YAML blurbs
1609
+ ```yaml
1610
+ :unity:
1611
+ :defines:
1612
+ - UNITY_INCLUDE_CONFIG_H
1613
+ ```
1614
+
1615
+ Example unity_config.h
1616
+ ```
1617
+ #ifndef UNITY_CONFIG_H
1618
+ #define UNITY_CONFIG_H
1619
+
1620
+ #include "uart_output.h" //Helper library for your custom environment
1621
+
1622
+ #define UNITY_INT_WIDTH 16
1623
+ #define UNITY_OUTPUT_START() uart_init(F_CPU, BAUD) //Helperfunction to init UART
1624
+ #define UNITY_OUTPUT_CHAR(a) uart_putchar(a) //Helperfunction to forward char via UART
1625
+ #define UNITY_OUTPUT_COMPLETE() uart_complete() //Helperfunction to inform that test has ended
1626
+
1627
+ #endif
1628
+ ```
1629
+
1630
+
1631
+ **tools**: a means for representing command line tools for use under
1632
+ Ceedling's automation framework
1633
+
1634
+ Ceedling requires a variety of tools to work its magic. By default,
1635
+ the GNU toolchain (`gcc`, `cpp`, `as`) are configured and ready for
1636
+ use with no additions to the project configuration YAML file.
1637
+ However, as most work will require a project-specific toolchain,
1638
+ Ceedling provides a generic means for specifying / overriding
1639
+ tools.
1640
+
1641
+ * `test_compiler`:
1642
+
1643
+ Compiler for test & source-under-test code
1644
+
1645
+ - `${1}`: input source
1646
+ - `${2}`: output object
1647
+ - `${3}`: optional output list
1648
+ - `${4}`: optional output dependencies file
1649
+
1650
+ **Default**: `gcc`
1651
+
1652
+ * `test_linker`:
1653
+
1654
+ Linker to generate test fixture executables
1655
+
1656
+ - `${1}`: input objects
1657
+ - `${2}`: output binary
1658
+ - `${3}`: optional output map
1659
+ - `${4}`: optional library list
1660
+ - `${5}`: optional library path list
1661
+
1662
+ **Default**: `gcc`
1663
+
1664
+ * `test_fixture`:
1665
+
1666
+ Executable test fixture
1667
+
1668
+ - `${1}`: simulator as executable with`${1}` as input binary file argument or native test executable
1669
+
1670
+ **Default**: `${1}`
1671
+
1672
+ * `test_includes_preprocessor`:
1673
+
1674
+ Extractor of #include statements
1675
+
1676
+ - `${1}`: input source file
1677
+
1678
+ **Default**: `cpp`
1679
+
1680
+ * `test_file_preprocessor`:
1681
+
1682
+ Preprocessor of test files (macros, conditional compilation statements)
1683
+
1684
+ - `${1}`: input source file
1685
+ - `${2}`: preprocessed output source file
1686
+
1687
+ **Default**: `gcc`
1688
+
1689
+ * `test_dependencies_generator`:
1690
+
1691
+ Discovers deep dependencies of source & test (for incremental builds)
1692
+
1693
+ - `${1}`: input source file
1694
+ - `${2}`: compiled object filepath
1695
+ - `${3}`: output dependencies file
1696
+
1697
+ **Default**: `gcc`
1698
+
1699
+ * `release_compiler`:
1700
+
1701
+ Compiler for release source code
1702
+
1703
+ - `${1}`: input source
1704
+ - `${2}`: output object
1705
+ - `${3}`: optional output list
1706
+ - `${4}`: optional output dependencies file
1707
+
1708
+ **Default**: `gcc`
1709
+
1710
+ * `release_assembler`:
1711
+
1712
+ Assembler for release assembly code
1713
+
1714
+ - `${1}`: input assembly source file
1715
+ - `${2}`: output object file
1716
+
1717
+ **Default**: `as`
1718
+
1719
+ * `release_linker`:
1720
+
1721
+ Linker for release source code
1722
+
1723
+ - `${1}`: input objects
1724
+ - `${2}`: output binary
1725
+ - `${3}`: optional output map
1726
+ - `${4}`: optional library list
1727
+ - `${5}`: optional library path list
1728
+
1729
+ **Default**: `gcc`
1730
+
1731
+ * `release_dependencies_generator`:
1732
+
1733
+ Discovers deep dependencies of source files (for incremental builds)
1734
+
1735
+ - `${1}`: input source file
1736
+ - `${2}`: compiled object filepath
1737
+ - `${3}`: output dependencies file
1738
+
1739
+ **Default**: `gcc`
1740
+
1741
+
1742
+ A Ceedling tool has a handful of configurable elements:
1743
+
1744
+ 1. [:executable] - Command line executable (required)
1745
+
1746
+ 2. [:arguments] - List of command line arguments
1747
+ and substitutions (required)
1748
+
1749
+ 3. [:name] - Simple name (e.g. "nickname") of tool beyond its
1750
+ executable name (if not explicitly set then Ceedling will
1751
+ form a name from the tool's YAML entry name)
1752
+
1753
+ 4. [:stderr_redirect] - Control of capturing $stderr messages
1754
+ {:none, :auto, :win, :unix, :tcsh}.
1755
+ Defaults to :none if unspecified; create a custom entry by
1756
+ specifying a simple string instead of any of the available
1757
+ symbols.
1758
+
1759
+ 5. [:background_exec] - Control execution as background process
1760
+ {:none, :auto, :win, :unix}.
1761
+ Defaults to :none if unspecified.
1762
+
1763
+ 6. [:optional] - By default a tool is required for operation, which
1764
+ means tests will be aborted if the tool is not present. However,
1765
+ you can set this to `TRUE` if it's not needed for testing.
1766
+
1767
+
1768
+ Tool Element Runtime Substitution
1769
+ ---------------------------------
1770
+
1771
+ To accomplish useful work on multiple files, a configured tool will most
1772
+ often require that some number of its arguments or even the executable
1773
+ itself change for each run. Consequently, every tool's argument list and
1774
+ executable field possess two means for substitution at runtime. Ceedling
1775
+ provides two kinds of inline Ruby execution and a notation for
1776
+ populating elements with dynamically gathered values within the build
1777
+ environment.
1778
+
1779
+ Tool Element Runtime Substitution: Inline Ruby Execution
1780
+ --------------------------------------------------------
1781
+
1782
+ In-line Ruby execution works similarly to that demonstrated for the
1783
+ [:environment] section except that substitution occurs as the tool is
1784
+ executed and not at the time the configuration file is first scanned.
1785
+
1786
+ * `#{...}`:
1787
+
1788
+ Ruby string substitution pattern wherein the containing string is
1789
+ expanded to include the string generated by Ruby code between the
1790
+ braces. Multiple instances of this expansion can occur within a single
1791
+ tool element entry string. Note that if this string substitution
1792
+ pattern occurs at the very beginning of a string in the YAML
1793
+ configuration the entire string should be enclosed in quotes (see the
1794
+ [:environment] section for further explanation on this point).
1795
+
1796
+ * `{...} `:
1797
+
1798
+ If an entire tool element string is enclosed with braces, it signifies
1799
+ that Ceedling should execute the Ruby code contained within those
1800
+ braces. Say you have a collection of paths on disk and some of those
1801
+ paths include spaces. Further suppose that a single tool that must use
1802
+ those paths requires those spaces to be escaped, but all other uses of
1803
+ those paths requires the paths to remain unchanged. You could use this
1804
+ Ceedling feature to insert Ruby code that iterates those paths and
1805
+ escapes those spaces in the array as used by the tool of this example.
1806
+
1807
+ Tool Element Runtime Substitution: Notational Substitution
1808
+ ----------------------------------------------------------
1809
+
1810
+ A Ceedling tool's other form of dynamic substitution relies on a '$'
1811
+ notation. These '$' operators can exist anywhere in a string and can be
1812
+ decorated in any way needed. To use a literal '$', escape it as '\\$'.
1813
+
1814
+ * `$`:
1815
+
1816
+ Simple substitution for value(s) globally available within the runtime
1817
+ (most often a string or an array).
1818
+
1819
+ * `${#}`:
1820
+
1821
+ When a Ceedling tool's command line is expanded from its configured
1822
+ representation and used within Ceedling Ruby code, certain calls to
1823
+ that tool will be made with a parameter list of substitution values.
1824
+ Each numbered substitution corresponds to a position in a parameter
1825
+ list. Ceedling Ruby code expects that configured compiler and linker
1826
+ tools will contain ${1} and ${2} replacement arguments. In the case of
1827
+ a compiler ${1} will be a C code file path, and ${2} will be the file
1828
+ path of the resulting object file. For a linker ${1} will be an array
1829
+ of object files to link, and ${2} will be the resulting binary
1830
+ executable. For an executable test fixture ${1} is either the binary
1831
+ executable itself (when using a local toolchain such as gcc) or a
1832
+ binary input file given to a simulator in its arguments.
1833
+
1834
+
1835
+ Example [:tools] YAML blurbs
1836
+
1837
+ ```yaml
1838
+ :tools:
1839
+ :test_compiler:
1840
+ :executable: compiler #exists in system search path
1841
+ :name: 'acme test compiler'
1842
+ :arguments:
1843
+ - -I"$": COLLECTION_PATHS_TEST_TOOLCHAIN_INCLUDE #expands to -I search paths
1844
+ - -I"$": COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR #expands to -I search paths
1845
+ - -D$: COLLECTION_DEFINES_TEST_AND_VENDOR #expands to all -D defined symbols
1846
+ - --network-license #simple command line argument
1847
+ - -optimize-level 4 #simple command line argument
1848
+ - "#{`args.exe -m acme.prj`}" #in-line ruby sub to shell out & build string of arguments
1849
+ - -c ${1} #source code input file (Ruby method call param list sub)
1850
+ - -o ${2} #object file output (Ruby method call param list sub)
1851
+ :test_linker:
1852
+ :executable: /programs/acme/bin/linker.exe #absolute file path
1853
+ :name: 'acme test linker'
1854
+ :arguments:
1855
+ - ${1} #list of object files to link (Ruby method call param list sub)
1856
+ - -l$-lib: #inline yaml array substitution to link in foo-lib and bar-lib
1857
+ - foo
1858
+ - bar
1859
+ - -o ${2} #executable file output (Ruby method call param list sub)
1860
+ :test_fixture:
1861
+ :executable: tools/bin/acme_simulator.exe #relative file path to command line simulator
1862
+ :name: 'acme test fixture'
1863
+ :stderr_redirect: :win #inform Ceedling what model of $stderr capture to use
1864
+ :arguments:
1865
+ - -mem large #simple command line argument
1866
+ - -f "${1}" #binary executable input file to simulator (Ruby method call param list sub)
1867
+ ```
1868
+
1869
+ Resulting command line constructions from preceding example [:tools] YAML blurbs
1870
+
1871
+ > compiler -I"/usr/include” -I”project/tests”
1872
+ -I"project/tests/support” -I”project/source” -I”project/include”
1873
+ -DTEST -DLONG_NAMES -network-license -optimize-level 4 arg-foo
1874
+ arg-bar arg-baz -c project/source/source.c -o
1875
+ build/tests/out/source.o
1876
+
1877
+ [notes: (1.) "arg-foo arg-bar arg-baz" is a fabricated example
1878
+ string collected from $stdout as a result of shell execution
1879
+ of args.exe
1880
+ (2.) the -c and -o arguments are
1881
+ fabricated examples simulating a single compilation step for
1882
+ a test; ${1} & ${2} are single files]
1883
+
1884
+ > \programs\acme\bin\linker.exe thing.o unity.o
1885
+ test_thing_runner.o test_thing.o mock_foo.o mock_bar.o -lfoo-lib
1886
+ -lbar-lib -o build\tests\out\test_thing.exe
1887
+
1888
+ [note: in this scenario ${1} is an array of all the object files
1889
+ needed to link a test fixture executable]
1890
+
1891
+ > tools\bin\acme_simulator.exe -mem large -f "build\tests\out\test_thing.bin 2>&1”
1892
+
1893
+ [note: (1.) :executable could have simply been ${1} - if we were compiling
1894
+ and running native executables instead of cross compiling (2.) we're using
1895
+ $stderr redirection to allow us to capture simulator error messages to
1896
+ $stdout for display at the run's conclusion]
1897
+
1898
+
1899
+ Notes:
1900
+
1901
+ * The upper case names are Ruby global constants that Ceedling
1902
+ builds
1903
+
1904
+ * "COLLECTION_" indicates that Ceedling did some work to assemble
1905
+ the list. For instance, expanding path globs, combining multiple
1906
+ path globs into a convenient summation, etc.
1907
+
1908
+ * At present, $stderr redirection is primarily used to capture
1909
+ errors from test fixtures so that they can be displayed at the
1910
+ conclusion of a test run. For instance, if a simulator detects
1911
+ a memory access violation or a divide by zero error, this notice
1912
+ might go unseen in all the output scrolling past in a terminal.
1913
+
1914
+ * The preprocessing tools can each be overridden with non-gcc
1915
+ equivalents. However, this is an advanced feature not yet
1916
+ documented and requires that the replacement toolchain conform
1917
+ to the same conventions used by gcc.
1918
+
1919
+ **Ceedling Collection Used in Compilation**:
1920
+
1921
+ * `COLLECTION_PATHS_TEST`:
1922
+
1923
+ All test paths
1924
+
1925
+ * `COLLECTION_PATHS_SOURCE`:
1926
+
1927
+ All source paths
1928
+
1929
+ * `COLLECTION_PATHS_INCLUDE`:
1930
+
1931
+ All include paths
1932
+
1933
+ * `COLLECTION_PATHS_SUPPORT`:
1934
+
1935
+ All test support paths
1936
+
1937
+ * `COLLECTION_PATHS_SOURCE_AND_INCLUDE`:
1938
+
1939
+ All source and include paths
1940
+
1941
+ * `COLLECTION_PATHS_SOURCE_INCLUDE_VENDOR`:
1942
+
1943
+ All source and include paths + applicable vendor paths (e.g.
1944
+ CException's source path if exceptions enabled)
1945
+
1946
+ * `COLLECTION_PATHS_TEST_TOOLCHAIN_INCLUDE`:
1947
+
1948
+ All test toolchain include paths
1949
+
1950
+ * `COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE`:
1951
+
1952
+ All test, source, and include paths
1953
+
1954
+ * `COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR`:
1955
+
1956
+ All test, source, include, and applicable vendor paths (e.g. Unity's
1957
+ source path plus CMock and CException's source paths if mocks and
1958
+ exceptions are enabled)
1959
+
1960
+ * `COLLECTION_PATHS_RELEASE_TOOLCHAIN_INCLUDE`:
1961
+
1962
+ All release toolchain include paths
1963
+
1964
+ * `COLLECTION_DEFINES_TEST_AND_VENDOR`:
1965
+
1966
+ All symbols specified in [:defines][:test] + symbols defined for
1967
+ enabled vendor tools - e.g. [:unity][:defines], [:cmock][:defines],
1968
+ and [:cexception][:defines]
1969
+
1970
+ * `COLLECTION_DEFINES_RELEASE_AND_VENDOR`:
1971
+
1972
+ All symbols specified in [:defines][:release] plus symbols defined by
1973
+ [:cexception][:defines] if exceptions are enabled
1974
+
1975
+
1976
+ Notes:
1977
+
1978
+ * Other collections exist within Ceedling. However, they are
1979
+ only useful for advanced features not yet documented.
1980
+
1981
+ * Wherever multiple path lists are combined for use Ceedling prioritizes
1982
+ path groups as follows: test paths, support paths, source paths, include
1983
+ paths.
1984
+ This can be useful, for instance, in certain testing scenarios
1985
+ where we desire Ceedling or the compiler to find a stand-in header file
1986
+ before the actual source header file of the same name.
1987
+
1988
+
1989
+ **plugins**: Ceedling extensions
1990
+
1991
+ * `load_paths`:
1992
+
1993
+ Base paths to search for plugin subdirectories or extra ruby functionalit
1994
+
1995
+ **Default**: `[]` (empty)
1996
+
1997
+ * `enabled`:
1998
+
1999
+ List of plugins to be used - a plugin's name is identical to the
2000
+ subdirectory that contains it (and the name of certain files within
2001
+ that subdirectory)
2002
+
2003
+ **Default**: `[]` (empty)
2004
+
2005
+
2006
+ Plugins can provide a variety of added functionality to Ceedling. In
2007
+ general use, it's assumed that at least one reporting plugin will be
2008
+ used to format test results. However, if no reporting plugins are
2009
+ specified, Ceedling will print to `$stdout` the (quite readable) raw
2010
+ test results from all test fixtures executed.
2011
+
2012
+ Example [:plugins] YAML blurb
2013
+
2014
+ ```yaml
2015
+ :plugins:
2016
+ :load_paths:
2017
+ - project/tools/ceedling/plugins #home to your collection of plugin directories
2018
+ - project/support #maybe home to some ruby code your custom plugins share
2019
+ :enabled:
2020
+ - stdout_pretty_tests_report #nice test results at your command line
2021
+ - our_custom_code_metrics_report #maybe you needed line count and complexity metrics, so you
2022
+ #created a plugin to scan all your code and collect that info
2023
+ ```
2024
+
2025
+ * `stdout_pretty_tests_report`:
2026
+
2027
+ Prints to $stdout a well-formatted list of ignored and failed tests,
2028
+ final test counts, and any extraneous output (e.g. printf statements
2029
+ or simulator memory errors) collected from executing the test
2030
+ fixtures. Meant to be used with runs at the command line.
2031
+
2032
+ * `stdout_ide_tests_report`:
2033
+
2034
+ Prints to $stdout simple test results formatted such that an IDE
2035
+ executing test-related Rake tasks can recognize file paths and line
2036
+ numbers in test failures, etc. Thus, you can click a test result in
2037
+ your IDE's execution window and jump to the failure (or ignored test)
2038
+ in your test file (obviously meant to be used with an [IDE like
2039
+ Eclipse][ide], etc).
2040
+
2041
+ [ide]: http://throwtheswitch.org/white-papers/using-with-ides.html
2042
+
2043
+ * `xml_tests_report`:
2044
+
2045
+ Creates an XML file of test results in the xUnit format (handy for
2046
+ Continuous Integration build servers or as input to other reporting
2047
+ tools). Produces a file report.xml in <build root>/artifacts/tests.
2048
+
2049
+ * `bullseye`:
2050
+
2051
+ Adds additional Rake tasks to execute tests with the commercial code
2052
+ coverage tool provided by [Bullseye][]. See readme.txt inside the bullseye
2053
+ plugin directory for configuration and use instructions. Note:
2054
+ Bullseye only works with certain compilers and linkers (healthy list
2055
+ of supported toolchains though).
2056
+
2057
+ [bullseye]: http://www.bullseye.com
2058
+
2059
+ * `gcov`:
2060
+
2061
+ Adds additional Rake tasks to execute tests with the GNU code coverage
2062
+ tool [gcov][]. See readme.txt inside the gcov directory for configuration
2063
+ and use instructions. Only works with GNU compiler and linker.
2064
+
2065
+ [gcov]: http://gcc.gnu.org/onlinedocs/gcc/Gcov.html
2066
+
2067
+ * `warnings_report`:
2068
+
2069
+ Scans compiler and linker `$stdout / $stderr` output for the word
2070
+ 'warning' (case insensitive). All code warnings (or tool warnings) are
2071
+ logged to a file warnings.log in the appropriate `<build
2072
+ root>/artifacts` directory (e.g. test/ for test tasks, `release/` for a
2073
+ release build, or even `bullseye/` for bullseye runs).
2074
+
2075
+ Module Generator
2076
+ ========================
2077
+ Ceedling includes a plugin called module_generator that will create a source, header and test file for you.
2078
+ There are several possibilities to configure this plugin through your project.yml to suit your project's needs.
2079
+
2080
+ Directory Structure
2081
+ -------------------------------------------
2082
+
2083
+ The default configuration for directory/project structure is:
2084
+ ```yaml
2085
+ :module_generator:
2086
+ :project_root: ./
2087
+ :source_root: src/
2088
+ :test_root: test/
2089
+ ```
2090
+ You can change these variables in your project.yml file to comply with your project's directory structure.
2091
+
2092
+ If you call `ceedling module:create`, it will create three files:
2093
+ 1. A source file in the source_root
2094
+ 2. A header file in the source_root
2095
+ 3. A test file in the test_root
2096
+
2097
+ If you want your header file to be in another location,
2098
+ you can specify the ':inc_root:" in your project.yml file:
2099
+ ```yaml
2100
+ :module_generator:
2101
+ :inc_root: inc/
2102
+ ```
2103
+ The module_generator will then create the header file in your defined ':inc_root:'.
2104
+ By default, ':inc_root:' is not defined so the module_generator will use the source_root.
2105
+
2106
+ Sometimes, your project can't be divided into a single src, inc, and test folder. You have several directories
2107
+ with sources/..., something like this for example:
2108
+ <project_root>
2109
+ - myDriver
2110
+ - src
2111
+ - inc
2112
+ - test
2113
+ - myOtherDriver
2114
+ - src
2115
+ - inc
2116
+ - test
2117
+ - ...
2118
+
2119
+ Don't worry, you don't have to manually create the source/header/test files.
2120
+ The module_generator can accept a path to create a source_root/inc_root/test_root folder with your files:
2121
+ `ceedling module:create[<module_root_path>:<module_name>]`
2122
+
2123
+ F.e., applied to the above project structure:
2124
+ `ceedling module:create[myOtherDriver:driver]`
2125
+ This will make the module_generator run in the subdirectory 'myOtherDriver' and generate the module files
2126
+ for you in that directory. So, this command will generate the following files:
2127
+ 1. A source file 'driver.c' in <project_root>/myOtherDriver/<source_root>
2128
+ 2. A header file 'driver.h' in <project_root>/myOtherDriver/<source_root> (or <inc_root> if specified)
2129
+ 3. A test file 'test_driver.c' in <project_root>/myOtherDriver/<test_root>
2130
+
2131
+ Naming
2132
+ -------------------------------------------
2133
+ By default, the module_generator will generate your files in lowercase.
2134
+ `ceedling module:create[mydriver]` and `ceedling module:create[myDriver]`(note the uppercase) will generate the same files:
2135
+ 1. mydriver.c
2136
+ 2. mydriver.h
2137
+ 3. test_mydriver.c
2138
+
2139
+ You can configure the module_generator to use a differect naming mechanism through the project.yml:
2140
+ ```yaml
2141
+ :module_generator:
2142
+ :naming: "camel"
2143
+ ```
2144
+ There are other possibilities as well (bumpy, camel, snake, caps).
2145
+ Refer to the unity module generator for more info (the unity module generator is used under the hood by module_generator).
2146
+
2147
+
2148
+ Boilerplate header
2149
+ -------------------------------------------
2150
+ There are two ways of adding a boilerplate header comment to your generated files:
2151
+ * With a defined string in the project.yml file:
2152
+
2153
+ ```yaml
2154
+ :module_generator:
2155
+ :boilerplates:
2156
+ :src: '/* This is Boilerplate code. */'
2157
+ ```
2158
+
2159
+ Using the command **ceedling module:create[foo]** it creates the source module as follows:
2160
+
2161
+ ```c
2162
+ /* This is Boilerplate code. */
2163
+ #include "foo.h"
2164
+ ```
2165
+
2166
+ It would be the same for **:tst:** and **:inc:** adding its respective options.
2167
+
2168
+ * Defining an external file with boileplate code:
2169
+
2170
+ ```yml
2171
+ :module_generator:
2172
+ :boilerplate_files:
2173
+ :src: '<template_folder>\src_boilerplate.txt'
2174
+ :inc: '<template_folder>\inc_boilerplate.txt'
2175
+ :tst: '<template_folder>\tst_boilerplate.txt'
2176
+ ```
2177
+
2178
+ For whatever file names in whichever folder you desire.
2179
+
2180
+
2181
+ Advanced Topics (Coming)
2182
+ ========================
2183
+
2184
+ Modifying Your Configuration without Modifying Your Project File: Option Files & User Files
2185
+ -------------------------------------------------------------------------------------------
2186
+
2187
+ Modifying your project file without modifying your project file
2188
+
2189
+ Debugging and/or printf()
2190
+ -------------------------
2191
+
2192
+ When you gotta get your hands dirty...
2193
+
2194
+ Ceedling Plays Nice with Others - Using Ceedling for Tests Alongside Another Release Build Setup
2195
+ ------------------------------------------------------------------------------------------------
2196
+
2197
+ You've got options.
2198
+
2199
+ Adding Handy Rake Tasks for Your Project (without Fancy Pants Custom Plugins)
2200
+ -----------------------------------------------------------------------------
2201
+
2202
+ Simple as snot.
2203
+
2204
+ Working with Non-Desktop Testing Environments
2205
+ ---------------------------------------------
2206
+
2207
+ For those crazy platforms lacking command line simulators and for which
2208
+ cross-compiling on the desktop just ain't gonna get it done.
2209
+
2210
+ Creating Custom Plugins
2211
+ -----------------------
2212
+
2213
+ Oh boy. This is going to take some explaining.