ceedling 0.25.0 → 0.27.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (434) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/assets/project_as_gem.yml +13 -0
  4. data/assets/project_with_guts.yml +13 -0
  5. data/bin/ceedling +91 -67
  6. data/docs/CeedlingPacket.md +61 -23
  7. data/docs/CeedlingPacket.odt +0 -0
  8. data/docs/CeedlingPacket.pdf +0 -0
  9. data/docs/ThrowTheSwitchCodingStandard.md +207 -0
  10. data/examples/temp_sensor/test/TestTemperatureCalculator.c +4 -1
  11. data/lib/ceedling/configurator.rb +14 -1
  12. data/lib/ceedling/configurator_builder.rb +2 -1
  13. data/lib/ceedling/configurator_validator.rb +12 -3
  14. data/lib/ceedling/constants.rb +3 -1
  15. data/lib/ceedling/defaults.rb +12 -1
  16. data/lib/ceedling/file_finder.rb +3 -0
  17. data/lib/ceedling/file_path_utils.rb +1 -1
  18. data/lib/ceedling/file_wrapper.rb +4 -4
  19. data/lib/ceedling/generator.rb +12 -3
  20. data/lib/ceedling/preprocessinator_helper.rb +5 -5
  21. data/lib/ceedling/preprocessinator_includes_handler.rb +10 -1
  22. data/lib/ceedling/project_config_manager.rb +1 -2
  23. data/lib/ceedling/project_file_loader.rb +27 -9
  24. data/lib/ceedling/rakefile.rb +6 -6
  25. data/lib/ceedling/release_invoker.rb +21 -6
  26. data/lib/ceedling/rules_release.rake +9 -5
  27. data/lib/ceedling/rules_tests.rake +6 -1
  28. data/lib/ceedling/setupinator.rb +1 -0
  29. data/lib/ceedling/tasks_base.rake +3 -0
  30. data/lib/ceedling/tasks_filesystem.rake +10 -7
  31. data/lib/ceedling/tasks_release.rake +3 -1
  32. data/lib/ceedling/test_includes_extractor.rb +16 -12
  33. data/lib/ceedling/test_invoker.rb +40 -0
  34. data/lib/ceedling/version.rb +3 -3
  35. data/lib/ceedling/version.rb.erb +1 -1
  36. data/plugins/command_hooks/lib/command_hooks.rb +1 -1
  37. data/plugins/fake_function_framework/examples/fff_example/src/bar.h +1 -0
  38. data/plugins/fake_function_framework/examples/fff_example/src/event_processor.c +1 -0
  39. data/plugins/fake_function_framework/lib/fff_mock_generator.rb +4 -0
  40. data/plugins/fake_function_framework/spec/{fff_mock_generator_spec.rb → fff_mock_header_generator_spec.rb} +34 -194
  41. data/plugins/fake_function_framework/spec/fff_mock_source_generator_spec.rb +149 -0
  42. data/plugins/fake_function_framework/spec/header_generator.rb +51 -0
  43. data/plugins/junit_tests_report/lib/junit_tests_report.rb +115 -0
  44. data/plugins/subprojects/README.md +63 -0
  45. data/plugins/subprojects/config/defaults.yml +33 -0
  46. data/plugins/subprojects/lib/subprojects.rb +92 -0
  47. data/plugins/subprojects/subprojects.rake +78 -0
  48. data/spec/preprocessinator_includes_handler_spec.rb +15 -5
  49. data/spec/spec_helper.rb +2 -2
  50. data/spec/spec_system_helper.rb +49 -1
  51. data/spec/system/deployment_spec.rb +29 -0
  52. data/vendor/c_exception/README.md +8 -2
  53. data/vendor/c_exception/docs/{readme.txt → CException.md} +133 -102
  54. data/vendor/c_exception/docs/ThrowTheSwitchCodingStandard.md +207 -0
  55. data/vendor/c_exception/vendor/unity/README.md +19 -10
  56. data/vendor/c_exception/vendor/unity/auto/colour_prompt.rb +67 -64
  57. data/vendor/c_exception/vendor/unity/auto/colour_reporter.rb +20 -20
  58. data/vendor/c_exception/vendor/unity/auto/generate_module.rb +149 -142
  59. data/vendor/c_exception/vendor/unity/auto/generate_test_runner.rb +234 -232
  60. data/vendor/c_exception/vendor/unity/auto/parse_output.rb +220 -0
  61. data/vendor/c_exception/vendor/unity/auto/stylize_as_junit.rb +108 -120
  62. data/vendor/c_exception/vendor/unity/auto/test_file_filter.rb +11 -9
  63. data/vendor/c_exception/vendor/unity/auto/type_sanitizer.rb +1 -3
  64. data/vendor/c_exception/vendor/unity/auto/unity_test_summary.py +6 -2
  65. data/vendor/c_exception/vendor/unity/auto/unity_test_summary.rb +45 -57
  66. data/vendor/c_exception/vendor/unity/docs/ThrowTheSwitchCodingStandard.md +207 -0
  67. data/vendor/c_exception/vendor/unity/docs/UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf +0 -0
  68. data/vendor/c_exception/vendor/unity/docs/UnityAssertionsReference.md +716 -0
  69. data/vendor/c_exception/vendor/unity/docs/UnityConfigurationGuide.md +398 -0
  70. data/vendor/c_exception/vendor/unity/docs/UnityGettingStartedGuide.md +191 -0
  71. data/vendor/c_exception/vendor/unity/docs/UnityHelperScriptsGuide.md +242 -0
  72. data/vendor/c_exception/vendor/unity/examples/example_1/makefile +22 -17
  73. data/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +1 -1
  74. data/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +1 -1
  75. data/vendor/c_exception/vendor/unity/examples/example_2/makefile +16 -17
  76. data/vendor/c_exception/vendor/unity/examples/example_3/rakefile.rb +15 -15
  77. data/vendor/c_exception/vendor/unity/examples/example_3/rakefile_helper.rb +93 -100
  78. data/vendor/c_exception/vendor/unity/examples/example_3/readme.txt +4 -10
  79. data/vendor/c_exception/vendor/unity/examples/unity_config.h +14 -26
  80. data/vendor/c_exception/vendor/unity/extras/fixture/rakefile.rb +12 -12
  81. data/vendor/c_exception/vendor/unity/extras/fixture/rakefile_helper.rb +87 -88
  82. data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.c +15 -8
  83. data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.h +6 -1
  84. data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_internals.h +3 -0
  85. data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_malloc_overrides.h +1 -0
  86. data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_Test.c +1 -1
  87. data/vendor/c_exception/vendor/unity/src/unity.c +396 -330
  88. data/vendor/c_exception/vendor/unity/src/unity.h +50 -4
  89. data/vendor/c_exception/vendor/unity/src/unity_internals.h +119 -84
  90. data/vendor/c_exception/vendor/unity/test/Makefile +17 -17
  91. data/vendor/c_exception/vendor/unity/test/rakefile +63 -3
  92. data/vendor/c_exception/vendor/unity/test/rakefile_helper.rb +108 -105
  93. data/vendor/c_exception/vendor/unity/test/spec/generate_module_existing_file_spec.rb +158 -0
  94. data/vendor/c_exception/vendor/unity/test/targets/clang_file.yml +0 -6
  95. data/vendor/c_exception/vendor/unity/test/targets/clang_strict.yml +1 -9
  96. data/vendor/c_exception/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +2 -0
  97. data/vendor/c_exception/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +2 -2
  98. data/vendor/c_exception/vendor/unity/test/tests/test_generate_test_runner.rb +5 -5
  99. data/vendor/c_exception/vendor/unity/test/tests/testunity.c +1338 -151
  100. data/vendor/cmock/README.md +10 -1
  101. data/vendor/cmock/config/test_environment.rb +7 -7
  102. data/vendor/cmock/docs/CMock_Summary.md +325 -128
  103. data/vendor/cmock/docs/ThrowTheSwitchCodingStandard.md +207 -0
  104. data/vendor/cmock/examples/make_example/Makefile +2 -2
  105. data/vendor/cmock/examples/temp_sensor/gcc.yml +5 -4
  106. data/vendor/cmock/examples/temp_sensor/iar_v4.yml +5 -4
  107. data/vendor/cmock/examples/temp_sensor/iar_v5.yml +5 -4
  108. data/vendor/cmock/examples/temp_sensor/rakefile.rb +11 -1
  109. data/vendor/cmock/examples/temp_sensor/rakefile_helper.rb +12 -10
  110. data/vendor/cmock/lib/cmock.rb +0 -3
  111. data/vendor/cmock/lib/cmock_generator_plugin_callback.rb +6 -2
  112. data/vendor/cmock/lib/cmock_generator_plugin_return_thru_ptr.rb +2 -1
  113. data/vendor/cmock/lib/cmock_header_parser.rb +5 -6
  114. data/vendor/cmock/release/version.info +1 -1
  115. data/vendor/cmock/scripts/create_makefile.rb +4 -2
  116. data/vendor/cmock/scripts/test_summary.rb +17 -9
  117. data/vendor/cmock/src/cmock.c +1 -0
  118. data/vendor/cmock/src/cmock.h +1 -1
  119. data/vendor/cmock/src/cmock_internals.h +14 -1
  120. data/vendor/cmock/test/c/TestCMockC.yml +4 -4
  121. data/vendor/cmock/test/c/TestCMockCDynamic.yml +4 -4
  122. data/vendor/cmock/{iar → test/iar}/iar_v4/Resource/SAM7_FLASH.mac +0 -0
  123. data/vendor/cmock/{iar → test/iar}/iar_v4/Resource/SAM7_RAM.mac +0 -0
  124. data/vendor/cmock/{iar → test/iar}/iar_v4/Resource/SAM7_SIM.mac +0 -0
  125. data/vendor/cmock/{iar → test/iar}/iar_v4/Resource/at91SAM7X256_FLASH.xcl +0 -0
  126. data/vendor/cmock/{iar → test/iar}/iar_v4/Resource/at91SAM7X256_RAM.xcl +0 -0
  127. data/vendor/cmock/{iar → test/iar}/iar_v4/Resource/ioat91sam7x256.ddf +0 -0
  128. data/vendor/cmock/{iar → test/iar}/iar_v4/cmock_demo.dep +0 -0
  129. data/vendor/cmock/{iar → test/iar}/iar_v4/cmock_demo.ewd +0 -0
  130. data/vendor/cmock/{iar → test/iar}/iar_v4/cmock_demo.ewp +0 -0
  131. data/vendor/cmock/{iar → test/iar}/iar_v4/cmock_demo.eww +0 -0
  132. data/vendor/cmock/{iar → test/iar}/iar_v4/incIAR/AT91SAM7X-EK.h +0 -0
  133. data/vendor/cmock/{iar → test/iar}/iar_v4/incIAR/AT91SAM7X256.inc +0 -0
  134. data/vendor/cmock/{iar → test/iar}/iar_v4/incIAR/AT91SAM7X256.rdf +0 -0
  135. data/vendor/cmock/{iar → test/iar}/iar_v4/incIAR/AT91SAM7X256.tcl +0 -0
  136. data/vendor/cmock/{iar → test/iar}/iar_v4/incIAR/AT91SAM7X256_inc.h +0 -0
  137. data/vendor/cmock/{iar → test/iar}/iar_v4/incIAR/ioat91sam7x256.h +0 -0
  138. data/vendor/cmock/{iar → test/iar}/iar_v4/incIAR/lib_AT91SAM7X256.h +0 -0
  139. data/vendor/cmock/{iar → test/iar}/iar_v4/settings/cmock_demo.cspy.bat +0 -0
  140. data/vendor/cmock/{iar → test/iar}/iar_v4/settings/cmock_demo.dbgdt +0 -0
  141. data/vendor/cmock/{iar → test/iar}/iar_v4/settings/cmock_demo.dni +0 -0
  142. data/vendor/cmock/{iar → test/iar}/iar_v4/settings/cmock_demo.wsdt +0 -0
  143. data/vendor/cmock/{iar → test/iar}/iar_v4/srcIAR/Cstartup.s79 +0 -0
  144. data/vendor/cmock/{iar → test/iar}/iar_v4/srcIAR/Cstartup_SAM7.c +0 -0
  145. data/vendor/cmock/{iar → test/iar}/iar_v5/Resource/SAM7_FLASH.mac +0 -0
  146. data/vendor/cmock/{iar → test/iar}/iar_v5/Resource/SAM7_RAM.mac +0 -0
  147. data/vendor/cmock/{iar → test/iar}/iar_v5/Resource/SAM7_SIM.mac +0 -0
  148. data/vendor/cmock/{iar → test/iar}/iar_v5/Resource/at91SAM7X256_FLASH.icf +0 -0
  149. data/vendor/cmock/{iar → test/iar}/iar_v5/Resource/at91SAM7X256_RAM.icf +0 -0
  150. data/vendor/cmock/{iar → test/iar}/iar_v5/cmock_demo.dep +0 -0
  151. data/vendor/cmock/{iar → test/iar}/iar_v5/cmock_demo.ewd +0 -0
  152. data/vendor/cmock/{iar → test/iar}/iar_v5/cmock_demo.ewp +0 -0
  153. data/vendor/cmock/{iar → test/iar}/iar_v5/cmock_demo.eww +0 -0
  154. data/vendor/cmock/{iar → test/iar}/iar_v5/incIAR/AT91SAM7X-EK.h +0 -0
  155. data/vendor/cmock/{iar → test/iar}/iar_v5/incIAR/AT91SAM7X256_inc.h +0 -0
  156. data/vendor/cmock/{iar → test/iar}/iar_v5/incIAR/lib_AT91SAM7X256.h +0 -0
  157. data/vendor/cmock/{iar → test/iar}/iar_v5/incIAR/project.h +0 -0
  158. data/vendor/cmock/{iar → test/iar}/iar_v5/settings/BasicInterrupt_SAM7X.cspy.bat +0 -0
  159. data/vendor/cmock/{iar → test/iar}/iar_v5/settings/BasicInterrupt_SAM7X.dbgdt +0 -0
  160. data/vendor/cmock/{iar → test/iar}/iar_v5/settings/BasicInterrupt_SAM7X.dni +0 -0
  161. data/vendor/cmock/{iar → test/iar}/iar_v5/settings/BasicInterrupt_SAM7X.wsdt +0 -0
  162. data/vendor/cmock/{iar → test/iar}/iar_v5/settings/BasicInterrupt_SAM7X_FLASH_Debug.jlink +0 -0
  163. data/vendor/cmock/{iar → test/iar}/iar_v5/settings/cmock_demo.cspy.bat +0 -0
  164. data/vendor/cmock/{iar → test/iar}/iar_v5/settings/cmock_demo.dbgdt +0 -0
  165. data/vendor/cmock/{iar → test/iar}/iar_v5/settings/cmock_demo.dni +0 -0
  166. data/vendor/cmock/{iar → test/iar}/iar_v5/settings/cmock_demo.wsdt +0 -0
  167. data/vendor/cmock/{iar → test/iar}/iar_v5/settings/cmock_demo_Binary.jlink +0 -0
  168. data/vendor/cmock/{iar → test/iar}/iar_v5/settings/cmock_demo_FLASH_Debug.jlink +0 -0
  169. data/vendor/cmock/{iar → test/iar}/iar_v5/settings/cmock_demo_RAM_Debug.jlink +0 -0
  170. data/vendor/cmock/{iar → test/iar}/iar_v5/srcIAR/Cstartup.s +0 -0
  171. data/vendor/cmock/{iar → test/iar}/iar_v5/srcIAR/Cstartup_SAM7.c +0 -0
  172. data/vendor/cmock/{Rakefile → test/rakefile} +9 -9
  173. data/vendor/cmock/{rakefile_helper.rb → test/rakefile_helper.rb} +13 -13
  174. data/vendor/cmock/test/system/test_compilation/config.yml +4 -4
  175. data/vendor/cmock/test/system/test_interactions/parsing_challenges.yml +2 -0
  176. data/vendor/cmock/{targets → test/targets}/clang_strict.yml +11 -11
  177. data/vendor/cmock/{targets → test/targets}/gcc.yml +9 -9
  178. data/vendor/cmock/{targets → test/targets}/gcc_64.yml +9 -9
  179. data/vendor/cmock/{targets → test/targets}/gcc_tiny.yml +9 -9
  180. data/vendor/cmock/{targets → test/targets}/iar_arm_v4.yml +9 -9
  181. data/vendor/cmock/{targets → test/targets}/iar_arm_v5.yml +10 -10
  182. data/vendor/cmock/test/test_helper.rb +4 -8
  183. data/vendor/cmock/test/unit/cmock_config_test.rb +1 -1
  184. data/vendor/cmock/test/unit/cmock_file_writer_test.rb +1 -1
  185. data/vendor/cmock/test/unit/cmock_generator_main_test.rb +1 -1
  186. data/vendor/cmock/test/unit/cmock_generator_plugin_array_test.rb +1 -1
  187. data/vendor/cmock/test/unit/cmock_generator_plugin_callback_test.rb +3 -1
  188. data/vendor/cmock/test/unit/cmock_generator_plugin_cexception_test.rb +1 -1
  189. data/vendor/cmock/test/unit/cmock_generator_plugin_expect_a_test.rb +1 -1
  190. data/vendor/cmock/test/unit/cmock_generator_plugin_expect_any_args_test.rb +1 -1
  191. data/vendor/cmock/test/unit/cmock_generator_plugin_expect_b_test.rb +1 -1
  192. data/vendor/cmock/test/unit/cmock_generator_plugin_ignore_arg_test.rb +1 -1
  193. data/vendor/cmock/test/unit/cmock_generator_plugin_ignore_test.rb +1 -1
  194. data/vendor/cmock/test/unit/cmock_generator_plugin_return_thru_ptr_test.rb +1 -1
  195. data/vendor/cmock/test/unit/cmock_generator_utils_test.rb +1 -1
  196. data/vendor/cmock/test/unit/cmock_header_parser_test.rb +15 -2
  197. data/vendor/cmock/test/unit/cmock_plugin_manager_test.rb +6 -10
  198. data/vendor/cmock/test/unit/cmock_unityhelper_parser_test.rb +1 -1
  199. data/vendor/cmock/vendor/c_exception/README.md +8 -2
  200. data/vendor/cmock/vendor/c_exception/docs/{readme.txt → CException.md} +133 -102
  201. data/vendor/cmock/vendor/c_exception/docs/ThrowTheSwitchCodingStandard.md +207 -0
  202. data/vendor/cmock/vendor/c_exception/vendor/unity/README.md +19 -10
  203. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/colour_prompt.rb +67 -64
  204. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/colour_reporter.rb +20 -20
  205. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/generate_module.rb +149 -142
  206. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/generate_test_runner.rb +234 -232
  207. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/parse_output.rb +220 -0
  208. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/stylize_as_junit.rb +108 -120
  209. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/test_file_filter.rb +11 -9
  210. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/type_sanitizer.rb +1 -3
  211. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/unity_test_summary.py +6 -2
  212. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/unity_test_summary.rb +45 -57
  213. data/vendor/cmock/vendor/c_exception/vendor/unity/docs/ThrowTheSwitchCodingStandard.md +207 -0
  214. data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf +0 -0
  215. data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityAssertionsReference.md +716 -0
  216. data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityConfigurationGuide.md +398 -0
  217. data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityGettingStartedGuide.md +191 -0
  218. data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityHelperScriptsGuide.md +242 -0
  219. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/makefile +22 -17
  220. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +1 -1
  221. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +1 -1
  222. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_2/makefile +16 -17
  223. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/rakefile.rb +15 -15
  224. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/rakefile_helper.rb +93 -100
  225. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/readme.txt +4 -10
  226. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/unity_config.h +14 -26
  227. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/rakefile.rb +12 -12
  228. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/rakefile_helper.rb +87 -88
  229. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.c +15 -8
  230. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.h +6 -1
  231. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_internals.h +3 -0
  232. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_malloc_overrides.h +1 -0
  233. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_Test.c +1 -1
  234. data/vendor/cmock/vendor/c_exception/vendor/unity/src/unity.c +396 -330
  235. data/vendor/cmock/vendor/c_exception/vendor/unity/src/unity.h +50 -4
  236. data/vendor/cmock/vendor/c_exception/vendor/unity/src/unity_internals.h +119 -84
  237. data/vendor/cmock/vendor/c_exception/vendor/unity/test/Makefile +17 -17
  238. data/vendor/cmock/vendor/c_exception/vendor/unity/test/rakefile +63 -3
  239. data/vendor/cmock/vendor/c_exception/vendor/unity/test/rakefile_helper.rb +108 -105
  240. data/vendor/cmock/vendor/c_exception/vendor/unity/test/spec/generate_module_existing_file_spec.rb +158 -0
  241. data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/clang_file.yml +0 -6
  242. data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/clang_strict.yml +1 -9
  243. data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +2 -0
  244. data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +2 -2
  245. data/vendor/cmock/vendor/c_exception/vendor/unity/test/tests/test_generate_test_runner.rb +5 -5
  246. data/vendor/cmock/vendor/c_exception/vendor/unity/test/tests/testunity.c +1338 -151
  247. data/vendor/cmock/vendor/unity/README.md +19 -10
  248. data/vendor/cmock/vendor/unity/auto/colour_prompt.rb +67 -64
  249. data/vendor/cmock/vendor/unity/auto/colour_reporter.rb +20 -20
  250. data/vendor/cmock/vendor/unity/auto/generate_module.rb +149 -142
  251. data/vendor/cmock/vendor/unity/auto/generate_test_runner.rb +234 -232
  252. data/vendor/cmock/vendor/unity/auto/parse_output.rb +220 -0
  253. data/vendor/cmock/vendor/unity/auto/stylize_as_junit.rb +108 -120
  254. data/vendor/cmock/vendor/unity/auto/test_file_filter.rb +11 -9
  255. data/vendor/cmock/vendor/unity/auto/type_sanitizer.rb +1 -3
  256. data/vendor/cmock/vendor/unity/auto/unity_test_summary.py +6 -2
  257. data/vendor/cmock/vendor/unity/auto/unity_test_summary.rb +45 -57
  258. data/vendor/cmock/vendor/unity/docs/ThrowTheSwitchCodingStandard.md +207 -0
  259. data/vendor/cmock/vendor/unity/docs/UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf +0 -0
  260. data/vendor/cmock/vendor/unity/docs/UnityAssertionsReference.md +716 -0
  261. data/vendor/cmock/vendor/unity/docs/UnityConfigurationGuide.md +398 -0
  262. data/vendor/cmock/vendor/unity/docs/UnityGettingStartedGuide.md +191 -0
  263. data/vendor/cmock/vendor/unity/docs/UnityHelperScriptsGuide.md +242 -0
  264. data/vendor/cmock/vendor/unity/examples/example_1/makefile +22 -17
  265. data/vendor/cmock/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +1 -1
  266. data/vendor/cmock/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +1 -1
  267. data/vendor/cmock/vendor/unity/examples/example_2/makefile +16 -17
  268. data/vendor/cmock/vendor/unity/examples/example_3/rakefile.rb +15 -15
  269. data/vendor/cmock/vendor/unity/examples/example_3/rakefile_helper.rb +93 -100
  270. data/vendor/cmock/vendor/unity/examples/example_3/readme.txt +4 -10
  271. data/vendor/cmock/vendor/unity/examples/unity_config.h +14 -26
  272. data/vendor/cmock/vendor/unity/extras/fixture/rakefile.rb +12 -12
  273. data/vendor/cmock/vendor/unity/extras/fixture/rakefile_helper.rb +87 -88
  274. data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture.c +15 -8
  275. data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture.h +6 -1
  276. data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture_internals.h +3 -0
  277. data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture_malloc_overrides.h +1 -0
  278. data/vendor/cmock/vendor/unity/extras/fixture/test/unity_fixture_Test.c +1 -1
  279. data/vendor/cmock/vendor/unity/release/version.info +1 -1
  280. data/vendor/cmock/vendor/unity/src/unity.c +396 -330
  281. data/vendor/cmock/vendor/unity/src/unity.h +50 -4
  282. data/vendor/cmock/vendor/unity/src/unity_internals.h +119 -84
  283. data/vendor/cmock/vendor/unity/test/Makefile +17 -17
  284. data/vendor/cmock/vendor/unity/test/rakefile +63 -3
  285. data/vendor/cmock/vendor/unity/test/rakefile_helper.rb +108 -105
  286. data/vendor/cmock/vendor/unity/test/spec/generate_module_existing_file_spec.rb +158 -0
  287. data/vendor/cmock/vendor/unity/test/targets/clang_file.yml +0 -6
  288. data/vendor/cmock/vendor/unity/test/targets/clang_strict.yml +1 -9
  289. data/vendor/cmock/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +2 -0
  290. data/vendor/cmock/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +2 -2
  291. data/vendor/cmock/vendor/unity/test/tests/test_generate_test_runner.rb +5 -5
  292. data/vendor/cmock/vendor/unity/test/tests/testunity.c +1338 -151
  293. data/vendor/deep_merge/Rakefile +1 -1
  294. data/vendor/unity/README.md +19 -10
  295. data/vendor/unity/auto/colour_prompt.rb +67 -64
  296. data/vendor/unity/auto/colour_reporter.rb +20 -20
  297. data/vendor/unity/auto/generate_module.rb +149 -142
  298. data/vendor/unity/auto/generate_test_runner.rb +234 -232
  299. data/vendor/unity/auto/parse_output.rb +220 -0
  300. data/vendor/unity/auto/stylize_as_junit.rb +108 -120
  301. data/vendor/unity/auto/test_file_filter.rb +11 -9
  302. data/vendor/unity/auto/type_sanitizer.rb +1 -3
  303. data/vendor/unity/auto/unity_test_summary.py +6 -2
  304. data/vendor/unity/auto/unity_test_summary.rb +45 -57
  305. data/vendor/unity/docs/ThrowTheSwitchCodingStandard.md +207 -0
  306. data/vendor/unity/docs/UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf +0 -0
  307. data/vendor/unity/docs/UnityAssertionsReference.md +716 -0
  308. data/vendor/unity/docs/UnityConfigurationGuide.md +398 -0
  309. data/vendor/unity/docs/UnityGettingStartedGuide.md +191 -0
  310. data/vendor/unity/docs/UnityHelperScriptsGuide.md +242 -0
  311. data/vendor/unity/examples/example_1/makefile +22 -17
  312. data/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +1 -1
  313. data/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +1 -1
  314. data/vendor/unity/examples/example_2/makefile +16 -17
  315. data/vendor/unity/examples/example_3/rakefile.rb +15 -15
  316. data/vendor/unity/examples/example_3/rakefile_helper.rb +93 -100
  317. data/vendor/unity/examples/example_3/readme.txt +4 -10
  318. data/vendor/unity/examples/unity_config.h +14 -26
  319. data/vendor/unity/extras/fixture/rakefile.rb +12 -12
  320. data/vendor/unity/extras/fixture/rakefile_helper.rb +87 -88
  321. data/vendor/unity/extras/fixture/src/unity_fixture.c +15 -8
  322. data/vendor/unity/extras/fixture/src/unity_fixture.h +6 -1
  323. data/vendor/unity/extras/fixture/src/unity_fixture_internals.h +3 -0
  324. data/vendor/unity/extras/fixture/src/unity_fixture_malloc_overrides.h +1 -0
  325. data/vendor/unity/extras/fixture/test/unity_fixture_Test.c +1 -1
  326. data/vendor/unity/release/version.info +1 -1
  327. data/vendor/unity/src/unity.c +396 -330
  328. data/vendor/unity/src/unity.h +50 -4
  329. data/vendor/unity/src/unity_internals.h +119 -84
  330. data/vendor/unity/test/Makefile +17 -17
  331. data/vendor/unity/test/rakefile +63 -3
  332. data/vendor/unity/test/rakefile_helper.rb +108 -105
  333. data/vendor/unity/test/spec/generate_module_existing_file_spec.rb +158 -0
  334. data/vendor/unity/test/targets/clang_file.yml +0 -6
  335. data/vendor/unity/test/targets/clang_strict.yml +1 -9
  336. data/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +2 -0
  337. data/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +2 -2
  338. data/vendor/unity/test/tests/test_generate_test_runner.rb +5 -5
  339. data/vendor/unity/test/tests/testunity.c +1338 -151
  340. metadata +102 -157
  341. data/test_graveyard/integration/paths.yml +0 -17
  342. data/test_graveyard/integration/paths_test.rb +0 -80
  343. data/test_graveyard/integration/rake_rules_aux_dependencies_test.rb +0 -75
  344. data/test_graveyard/integration/rake_rules_cmock_test.rb +0 -74
  345. data/test_graveyard/integration/rake_rules_preprocess_test.rb +0 -178
  346. data/test_graveyard/integration/rake_rules_test.rb +0 -268
  347. data/test_graveyard/integration/rake_tasks_test.rb +0 -103
  348. data/test_graveyard/integration_test_helper.rb +0 -34
  349. data/test_graveyard/rakefile_rules.rb +0 -10
  350. data/test_graveyard/rakefile_rules_aux_dependencies.rb +0 -10
  351. data/test_graveyard/rakefile_rules_cmock.rb +0 -10
  352. data/test_graveyard/rakefile_rules_preprocess.rb +0 -10
  353. data/test_graveyard/rakefile_tasks.rb +0 -10
  354. data/test_graveyard/system/file_system_dependencies.yml +0 -20
  355. data/test_graveyard/system/file_system_kitchen_sink.yml +0 -20
  356. data/test_graveyard/system/file_system_mocks.yml +0 -20
  357. data/test_graveyard/system/file_system_preprocess.yml +0 -20
  358. data/test_graveyard/system/file_system_simple.yml +0 -20
  359. data/test_graveyard/system/file_system_test.rb +0 -78
  360. data/test_graveyard/system/mocks/include/a_file.h +0 -2
  361. data/test_graveyard/system/mocks/include/other_stuff.h +0 -2
  362. data/test_graveyard/system/mocks/include/stuff.h +0 -3
  363. data/test_graveyard/system/mocks/source/a_file.c +0 -9
  364. data/test_graveyard/system/mocks/test/test_a_file.c +0 -41
  365. data/test_graveyard/system/mocks/test/test_no_file.c +0 -14
  366. data/test_graveyard/system/project_mocks.yml +0 -43
  367. data/test_graveyard/system/project_mocks_test.rb +0 -38
  368. data/test_graveyard/system/project_simple.yml +0 -36
  369. data/test_graveyard/system/project_simple_test.rb +0 -39
  370. data/test_graveyard/system/rule_mocks_test.rb +0 -44
  371. data/test_graveyard/system/rule_runners_test.rb +0 -44
  372. data/test_graveyard/system/simple/include/other_stuff.h +0 -2
  373. data/test_graveyard/system/simple/include/stuff.h +0 -3
  374. data/test_graveyard/system/simple/source/other_stuff.c +0 -6
  375. data/test_graveyard/system/simple/source/stuff.c +0 -7
  376. data/test_graveyard/system/simple/test/test_other_stuff.c +0 -30
  377. data/test_graveyard/system/simple/test/test_stuff.c +0 -51
  378. data/test_graveyard/system_test_helper.rb +0 -73
  379. data/test_graveyard/test_helper.rb +0 -93
  380. data/test_graveyard/unit/busted/configurator_builder_test.rb +0 -569
  381. data/test_graveyard/unit/busted/configurator_helper_test.rb +0 -234
  382. data/test_graveyard/unit/busted/configurator_test.rb +0 -232
  383. data/test_graveyard/unit/busted/configurator_validator_test.rb +0 -169
  384. data/test_graveyard/unit/busted/deep_merge_fix_test.rb +0 -55
  385. data/test_graveyard/unit/busted/dependinator_test.rb +0 -129
  386. data/test_graveyard/unit/busted/file_finder_helper_test.rb +0 -45
  387. data/test_graveyard/unit/busted/file_finder_test.rb +0 -114
  388. data/test_graveyard/unit/busted/file_path_utils_test.rb +0 -97
  389. data/test_graveyard/unit/busted/file_system_utils_test.rb +0 -21
  390. data/test_graveyard/unit/busted/generator_test.rb +0 -187
  391. data/test_graveyard/unit/busted/generator_test_results_test.rb +0 -129
  392. data/test_graveyard/unit/busted/generator_test_runner_test.rb +0 -475
  393. data/test_graveyard/unit/busted/preprocessinator_file_handler_test.rb +0 -39
  394. data/test_graveyard/unit/busted/preprocessinator_helper_test.rb +0 -156
  395. data/test_graveyard/unit/busted/preprocessinator_includes_handler_test.rb +0 -93
  396. data/test_graveyard/unit/busted/preprocessinator_test.rb +0 -57
  397. data/test_graveyard/unit/busted/project_file_loader_test.rb +0 -142
  398. data/test_graveyard/unit/busted/setupinator_test.rb +0 -45
  399. data/test_graveyard/unit/busted/streaminator_test.rb +0 -49
  400. data/test_graveyard/unit/busted/task_invoker_test.rb +0 -69
  401. data/test_graveyard/unit/busted/test_includes_extractor_test.rb +0 -111
  402. data/test_graveyard/unit/busted/test_invoker_helper_test.rb +0 -62
  403. data/test_graveyard/unit/busted/test_invoker_test.rb +0 -47
  404. data/test_graveyard/unit/busted/tool_executor_helper_test.rb +0 -100
  405. data/test_graveyard/unit/busted/tool_executor_test.rb +0 -351
  406. data/test_graveyard/unit/busted/verbosinator_test.rb +0 -65
  407. data/test_graveyard/unit/preprocessinator_extractor_test.rb +0 -731
  408. data/test_graveyard/unit_test_helper.rb +0 -16
  409. data/vendor/c_exception/docs/CExceptionSummary.odt +0 -0
  410. data/vendor/c_exception/docs/CExceptionSummary.pdf +0 -0
  411. data/vendor/c_exception/vendor/unity/auto/parseOutput.rb +0 -191
  412. data/vendor/c_exception/vendor/unity/docs/UnityAssertionsReference.pdf +0 -0
  413. data/vendor/c_exception/vendor/unity/docs/UnityConfigurationGuide.pdf +0 -0
  414. data/vendor/c_exception/vendor/unity/docs/UnityGettingStartedGuide.pdf +0 -0
  415. data/vendor/c_exception/vendor/unity/docs/UnityHelperScriptsGuide.pdf +0 -0
  416. data/vendor/cmock/docs/CMock Summary.odt +0 -0
  417. data/vendor/cmock/docs/CMock Summary.pdf +0 -0
  418. data/vendor/cmock/vendor/c_exception/docs/CExceptionSummary.odt +0 -0
  419. data/vendor/cmock/vendor/c_exception/docs/CExceptionSummary.pdf +0 -0
  420. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/parseOutput.rb +0 -191
  421. data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityAssertionsReference.pdf +0 -0
  422. data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityConfigurationGuide.pdf +0 -0
  423. data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityGettingStartedGuide.pdf +0 -0
  424. data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityHelperScriptsGuide.pdf +0 -0
  425. data/vendor/cmock/vendor/unity/auto/parseOutput.rb +0 -191
  426. data/vendor/cmock/vendor/unity/docs/UnityAssertionsReference.pdf +0 -0
  427. data/vendor/cmock/vendor/unity/docs/UnityConfigurationGuide.pdf +0 -0
  428. data/vendor/cmock/vendor/unity/docs/UnityGettingStartedGuide.pdf +0 -0
  429. data/vendor/cmock/vendor/unity/docs/UnityHelperScriptsGuide.pdf +0 -0
  430. data/vendor/unity/auto/parseOutput.rb +0 -191
  431. data/vendor/unity/docs/UnityAssertionsReference.pdf +0 -0
  432. data/vendor/unity/docs/UnityConfigurationGuide.pdf +0 -0
  433. data/vendor/unity/docs/UnityGettingStartedGuide.pdf +0 -0
  434. data/vendor/unity/docs/UnityHelperScriptsGuide.pdf +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 373d6a4981555897351460b57dc82e3d90a96d6d
4
- data.tar.gz: ff091c1e3c1934718eb19fcab984c3bc169f5b92
3
+ metadata.gz: 93c488605f82954ab5f2cccb06ecbfc489133c3b
4
+ data.tar.gz: 5c97c451a98f9fb5c62522f46814f45aba20e4a6
5
5
  SHA512:
6
- metadata.gz: 0feea9fe999980ad018ea2ec89fb0af54537d3ed1b9b029fa24148f4d7c25fabdf4392a896723046a7b0af46533b8187fa2be902cf3a7a3d6fa633863294122e
7
- data.tar.gz: 790254af22bb0d7d28efd37ed3df4d5de2aba82589c0c52abf585ad7732ea43dbff283e861286f34d865acb21870f9aeb25456d6897253a1085a3271d9d718a6
6
+ metadata.gz: 8cf0b9dbce04687b13d374cfbf214641a72e147093b1c394c67e7e7775c73896c2bc290db3d108174cf8706f0bd378136eefe7540523c7115af2841b89a5695a
7
+ data.tar.gz: f7575f0950a80118723f6a58fffd361fef164eddb2065ff622641ec1bdb5cbb6aa232149f6821ac495daa7f5086b835fc5c0a1ccd41af14e05271df16ce71fa6
data/README.md CHANGED
@@ -23,7 +23,7 @@ First make sure Ruby is installed on your system (if it's not already). Then, fr
23
23
  > git clone --recursive https://github.com/throwtheswitch/ceedling.git
24
24
  > cd ceedling
25
25
  > bundle install # Ensures you have all RubyGems needed
26
- > bundle execute rake # Run all CMock library tests
26
+ > bundle exec rake # Run all CMock library tests
27
27
 
28
28
  If bundler isn't installed on your system or you run into problems, you might have to install it:
29
29
 
@@ -62,6 +62,19 @@
62
62
  # As [:tools] is blank, gcc will be used (so long as it's in your system path)
63
63
  # See documentation to configure a given toolchain for use
64
64
 
65
+ # LIBRARIES
66
+ # These libraries are automatically injected into the build process. Those specified as
67
+ # common will be used in all types of builds. Otherwise, libraries can be injected in just
68
+ # tests or releases. These options are MERGED with the options in supplemental yaml files.
69
+ :libraries:
70
+ :placement: :end
71
+ :flag: "${1}" # or "-L ${1}" for example
72
+ :common: &common_libraries []
73
+ :test:
74
+ - *common_libraries
75
+ :release:
76
+ - *common_libraries
77
+
65
78
  :plugins:
66
79
  :load_paths:
67
80
  - "#{Ceedling.load_path}"
@@ -62,6 +62,19 @@
62
62
  # As [:tools] is blank, gcc will be used (so long as it's in your system path)
63
63
  # See documentation to configure a given toolchain for use
64
64
 
65
+ # LIBRARIES
66
+ # These libraries are automatically injected into the build process. Those specified as
67
+ # common will be used in all types of builds. Otherwise, libraries can be injected in just
68
+ # tests or releases. These options are MERGED with the options in supplemental yaml files.
69
+ :libraries:
70
+ :placement: :end
71
+ :flag: "${1}" # or "-L ${1}" for example
72
+ :common: &common_libraries []
73
+ :test:
74
+ - *common_libraries
75
+ :release:
76
+ - *common_libraries
77
+
65
78
  :plugins:
66
79
  :load_paths:
67
80
  - vendor/ceedling/plugins
@@ -4,7 +4,16 @@
4
4
  require 'rubygems'
5
5
  require 'fileutils'
6
6
 
7
- unless (File.exists?("project.yml"))
7
+ # Check for the main project file (either the one defined in the ENV or the default)
8
+ main_filepath = ENV['CEEDLING_MAIN_PROJECT_FILE']
9
+ project_found = (!main_filepath.nil? && File.exists?(main_filepath))
10
+ if (!project_found)
11
+ main_filepath = "project.yml"
12
+ project_found = File.exists?(main_filepath)
13
+ end
14
+ rakefile_found = (File.exists? "rakefile.rb")
15
+
16
+ unless (project_found && rakefile_found)
8
17
  #===================================== We Do Not Have A Project ================================================
9
18
 
10
19
  puts "Welcome to Ceedling!"
@@ -21,83 +30,96 @@ unless (File.exists?("project.yml"))
21
30
  method_option :nodocs, :type => :boolean, :default => false, :desc => "No docs in vendor directory"
22
31
  method_option :as_gem, :type => :boolean, :default => false, :desc => "Create the scaffold using Ceedling as a gem instead of filling in the vendor directory. Implies --no-docs."
23
32
  def new(name, silent = false)
24
- ceedling_path = File.join(name, 'vendor', 'ceedling')
25
- source_path = File.join(name, 'src')
26
- test_path = File.join(name, 'test')
27
- test_support_path = File.join(name, 'test/support')
28
- build_path = File.join(name, 'build')
29
-
30
- [source_path, test_path, test_support_path, build_path].each do |d|
31
- FileUtils.mkdir_p d
32
- end
33
+ copy_assets_and_create_structure(name, silent, false, options[:nodocs], options[:as_gem])
34
+ end
33
35
 
34
- unless options[:as_gem]
35
- FileUtils.mkdir_p ceedling_path
36
+ desc "upgrade PROJECT_NAME", "upgrade ceedling for a project (not req'd if gem used)"
37
+ method_option :nodocs, :type => :boolean, :default => false, :desc => "No docs in vendor directory"
38
+ def upgrade(name, silent = false)
39
+ copy_assets_and_create_structure(name, silent, true, options[:nodocs])
40
+ end
36
41
 
37
- unless options[:nodocs]
38
- doc_path = File.join(ceedling_path, 'docs')
39
- FileUtils.mkdir_p doc_path
42
+ no_commands do
43
+ def copy_assets_and_create_structure(name, silent=false, force=false, no_docs=false, as_gem=false)
44
+ ceedling_path = File.join(name, 'vendor', 'ceedling')
45
+ source_path = File.join(name, 'src')
46
+ test_path = File.join(name, 'test')
47
+ test_support_path = File.join(name, 'test/support')
48
+ build_path = File.join(name, 'build')
49
+
50
+ [source_path, test_path, test_support_path, build_path].each do |d|
51
+ FileUtils.mkdir_p d
52
+ end
40
53
 
41
- in_doc_path = lambda {|f| File.join(doc_path, f)}
54
+ unless as_gem
55
+ FileUtils.mkdir_p ceedling_path
56
+
57
+ unless no_docs
58
+ doc_path = File.join(ceedling_path, 'docs')
59
+ FileUtils.mkdir_p doc_path
60
+
61
+ in_doc_path = lambda {|f| File.join(doc_path, f)}
62
+
63
+ doc_files = [
64
+ 'docs/CeedlingPacket.md',
65
+ 'vendor/c_exception/docs/CException.md',
66
+ 'vendor/cmock/docs/CMock_Summary.md',
67
+ 'vendor/unity/docs/UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf',
68
+ 'vendor/unity/docs/UnityAssertionsReference.md',
69
+ 'vendor/unity/docs/UnityConfigurationGuide.md',
70
+ 'vendor/unity/docs/UnityGettingStartedGuide.md',
71
+ 'vendor/unity/docs/UnityHelperScriptsGuide.md',
72
+ 'vendor/unity/docs/ThrowTheSwitchCodingStandard.md',
73
+ ]
74
+
75
+ doc_files.each do |f|
76
+ copy_file(f, in_doc_path.call(File.basename(f)), :force => force)
77
+ end
78
+ end
42
79
 
43
- doc_files = [
44
- 'docs/CeedlingPacket.pdf',
45
- 'vendor/c_exception/docs/CExceptionSummary.pdf',
46
- 'vendor/cmock/docs/CMock Summary.pdf',
47
- 'vendor/unity/docs/UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf',
48
- 'vendor/unity/docs/UnityAssertionsReference.pdf',
49
- 'vendor/unity/docs/UnityConfigurationGuide.pdf',
50
- 'vendor/unity/docs/UnityGettingStartedGuide.pdf',
51
- 'vendor/unity/docs/UnityHelperScriptsGuide.pdf',
52
- ]
80
+ folders = %w{plugins lib}
81
+ folders.map do |f|
82
+ {:src => f, :dst => File.join(ceedling_path, f)}
83
+ end.each do |f|
84
+ directory(f[:src], f[:dst], :force => force)
85
+ end
53
86
 
54
- doc_files.each do |f|
55
- copy_file f, in_doc_path.call(File.basename(f))
87
+ sub_components = [
88
+ {:src => 'vendor/c_exception/lib/', :dst => 'vendor/c_exception/lib'},
89
+ {:src => 'vendor/c_exception/release/', :dst => 'vendor/c_exception/release'},
90
+ {:src => 'vendor/cmock/config/', :dst => 'vendor/cmock/config'},
91
+ {:src => 'vendor/cmock/lib/', :dst => 'vendor/cmock/lib'},
92
+ {:src => 'vendor/cmock/release/', :dst => 'vendor/cmock/release'},
93
+ {:src => 'vendor/cmock/src/', :dst => 'vendor/cmock/src'},
94
+ {:src => 'vendor/constructor/lib/', :dst => 'vendor/constructor/lib'},
95
+ {:src => 'vendor/deep_merge/lib/', :dst => 'vendor/deep_merge/lib'},
96
+ {:src => 'vendor/diy/lib', :dst => 'vendor/diy/lib'},
97
+ {:src => 'vendor/unity/auto/', :dst => 'vendor/unity/auto'},
98
+ {:src => 'vendor/unity/release/', :dst => 'vendor/unity/release'},
99
+ {:src => 'vendor/unity/src/', :dst => 'vendor/unity/src'},
100
+ ]
101
+
102
+ sub_components.each do |c|
103
+ directory(c[:src], File.join(ceedling_path, c[:dst]), :force => force)
56
104
  end
57
105
  end
58
106
 
59
- folders = %w{plugins lib}
60
- folders.map do |f|
61
- {:src => f, :dst => File.join(ceedling_path, f)}
62
- end.each do |f|
63
- directory f[:src], f[:dst]
107
+ if as_gem
108
+ copy_file(File.join('assets', 'project_as_gem.yml'), File.join(name, 'project.yml'), :force => force)
109
+ copy_file(File.join('assets', 'rakefile_as_gem.rb'), File.join(name, 'rakefile.rb'), :force => force)
110
+ else
111
+ copy_file(File.join('assets', 'project_with_guts.yml'), File.join(name, 'project.yml'), :force => force)
112
+ copy_file(File.join('assets', 'rakefile_with_guts.rb'), File.join(name, 'rakefile.rb'), :force => force)
64
113
  end
65
114
 
66
- sub_components = [
67
- {:src => 'vendor/c_exception/lib/', :dst => 'vendor/c_exception/lib'},
68
- {:src => 'vendor/c_exception/release/', :dst => 'vendor/c_exception/release'},
69
- {:src => 'vendor/cmock/config/', :dst => 'vendor/cmock/config'},
70
- {:src => 'vendor/cmock/lib/', :dst => 'vendor/cmock/lib'},
71
- {:src => 'vendor/cmock/release/', :dst => 'vendor/cmock/release'},
72
- {:src => 'vendor/cmock/src/', :dst => 'vendor/cmock/src'},
73
- {:src => 'vendor/constructor/lib/', :dst => 'vendor/constructor/lib'},
74
- {:src => 'vendor/deep_merge/lib/', :dst => 'vendor/deep_merge/lib'},
75
- {:src => 'vendor/diy/lib', :dst => 'vendor/diy/lib'},
76
- {:src => 'vendor/unity/auto/', :dst => 'vendor/unity/auto'},
77
- {:src => 'vendor/unity/release/', :dst => 'vendor/unity/release'},
78
- {:src => 'vendor/unity/src/', :dst => 'vendor/unity/src'},
79
- ]
80
-
81
- sub_components.each do |c|
82
- directory c[:src], File.join(ceedling_path, c[:dst])
115
+ unless silent
116
+ puts "\n"
117
+ puts "Project '#{name}' #{force ? "upgraded" : "created"}!"
118
+ puts " - Tool documentation is located in vendor/ceedling/docs" if (not no_docs) and (not as_gem)
119
+ puts " - Execute 'ceedling help' to view available test & build tasks"
120
+ puts ''
83
121
  end
84
122
  end
85
-
86
- if options[:as_gem]
87
- copy_file File.join('assets', 'project_as_gem.yml'), File.join(name, 'project.yml')
88
- copy_file File.join('assets', 'rakefile_as_gem.rb'), File.join(name, 'rakefile.rb')
89
- else
90
- copy_file File.join('assets', 'project_with_guts.yml'), File.join(name, 'project.yml')
91
- copy_file File.join('assets', 'rakefile_with_guts.rb'), File.join(name, 'rakefile.rb')
92
- end
93
-
94
- unless silent
95
- puts "\n"
96
- puts "Project '#{name}' created!"
97
- puts " - Tool documentation is located in vendor/ceedling/docs" if (not options[:nodocs]) and (not options[:as_gem])
98
- puts " - Execute 'rake -T' to view available test & build tasks"
99
- puts ''
100
- end
101
123
  end
102
124
 
103
125
  desc "examples", "list available example projects"
@@ -248,7 +270,7 @@ else
248
270
  end
249
271
 
250
272
  #merge in project settings if they can be found here
251
- yaml_options = YAML.load_file('project.yml')
273
+ yaml_options = YAML.load_file(main_filepath)
252
274
  options[:pretend_we_are_gtest] = (yaml_options[:plugins][:enabled].include? :stdout_gtestlike_tests_report) if (yaml_options[:plugins] && yaml_options[:plugins][:enabled])
253
275
  if (yaml_options[:paths])
254
276
  options[:add_path] = yaml_options[:paths][:tools] || []
@@ -272,6 +294,8 @@ else
272
294
  options[:outfile] = "debug.txt"
273
295
  when /^help$/
274
296
  options[:args] += "-T "
297
+ when /^project:(\w+)/
298
+ ENV['CEEDLING_USER_PROJECT_FILE'] = "#{$1}.yml"
275
299
  else
276
300
  options[:args] += v + " "
277
301
  end
@@ -165,8 +165,8 @@ As a [Ruby gem](http://docs.rubygems.org/read/chapter/1):
165
165
  1. [Download and install Ruby](http://www.ruby-lang.org/en/downloads/)
166
166
 
167
167
  2. Use Ruby's command line gem package manager to install Ceedling:
168
- `gem install ceedling` {text:line-break} (Unity, CMock,
169
- and CException come along with Ceedling for free)
168
+ `gem install ceedling`
169
+ (Unity, CMock, and CException come along with Ceedling for free)
170
170
 
171
171
  3. Execute Ceedling at command line to create example project
172
172
  or an empty Ceedling project in your filesystem (executing
@@ -375,7 +375,7 @@ That is, they must each be specified at the command line each time
375
375
  they are needed. For instance, Ceedling's verbosity command
376
376
  only affects output at the time it's run.
377
377
 
378
- {text:soft-page-break} Individual test and release file tasks
378
+ Individual test and release file tasks
379
379
  are not listed in `-T` output. Because so many files may be present
380
380
  it's unwieldy to list them all.
381
381
 
@@ -972,11 +972,12 @@ Notes on path grammar within the [:paths] section:
972
972
  entry in the [:tools] section
973
973
 
974
974
  * Wherever multiple path lists are combined for use Ceedling prioritizes
975
- path groups as follows: {text:line-break} test paths, support paths,
976
- source paths, include paths. This can be useful, for instance, in
977
- certain testing scenarios where we desire Ceedling or the compiler to
978
- find a stand-in header file before the actual source header file of
979
- the same name.
975
+ path groups as follows:
976
+ test paths, support paths, source paths, include paths.
977
+
978
+ This can be useful, for instance, in certain testing scenarios where
979
+ we desire Ceedling or the compiler to find a stand-in header file before
980
+ the actual source header file of the same name.
980
981
 
981
982
  * Paths:
982
983
 
@@ -1270,6 +1271,43 @@ Example [:defines] YAML blurb
1270
1271
  - FEATURE_X=ON
1271
1272
  ```
1272
1273
 
1274
+
1275
+ **libraries**: command line defines used in test and release compilation by configured tools
1276
+
1277
+ Ceedling allows you to pull in specific libraries for the purpose of release and test builds.
1278
+ It has a few levels of support for this. Start by adding a :libraries main section in your
1279
+ configuration. In this section, you can optionally have the following subsections:
1280
+
1281
+ * `test`:
1282
+
1283
+ Library files that should be injected into your tests when linking occurs.
1284
+ These can be specified as either relative or absolute paths. These files MUST
1285
+ exist when the test attempts to build.
1286
+
1287
+ * `source`:
1288
+
1289
+ Library files that should be injected into your release when linking occurs. These
1290
+ can be specified as either relative or absolute paths. These files MUST exist when
1291
+ the release attempts to build UNLESS you are using the subprojects plugin. In that
1292
+ case, it will attempt to build that library for you as a dynamic dependency.
1293
+
1294
+ * `system`:
1295
+
1296
+ These libraries are assumed to be in the tool path somewhere and shouldn't need to be
1297
+ specified. The libraries added here will be injected into releases and tests.
1298
+
1299
+ * `flag`:
1300
+
1301
+ This is the method of adding an argument for each library. For example, gcc really likes
1302
+ it when you specify “-l${1}”
1303
+
1304
+ Notes:
1305
+
1306
+ * If you've specified your own link step, you are going to want to add ${4} to your argument
1307
+ list in the place where library files should be added to the command call. For gcc, this is
1308
+ often the very end. Other tools may vary.
1309
+
1310
+
1273
1311
  **flags**: configure per-file compilation and linking flags
1274
1312
 
1275
1313
  Ceedling tools (see later [:tools] section) are used to configure
@@ -1552,14 +1590,14 @@ A Ceedling tool has a handful of configurable elements:
1552
1590
  form a name from the tool's YAML entry name)
1553
1591
 
1554
1592
  4. [:stderr_redirect] - Control of capturing $stderr messages
1555
- {:none, :auto, :win, :unix, :tcsh}. {text:line-break}
1593
+ {:none, :auto, :win, :unix, :tcsh}.
1556
1594
  Defaults to :none if unspecified; create a custom entry by
1557
1595
  specifying a simple string instead of any of the available
1558
1596
  symbols.
1559
1597
 
1560
1598
  5. [:background_exec] - Control execution as background process
1561
- {:none, :auto, :win, :unix}. {text:line-break} Defaults
1562
- to :none if unspecified.
1599
+ {:none, :auto, :win, :unix}.
1600
+ Defaults to :none if unspecified.
1563
1601
 
1564
1602
 
1565
1603
  Tool Element Runtime Substitution
@@ -1637,9 +1675,9 @@ Example [:tools] YAML blurbs
1637
1675
  :executable: compiler #exists in system search path
1638
1676
  :name: 'acme test compiler'
1639
1677
  :arguments:
1640
- - -I"$”: COLLECTION_PATHS_TEST_TOOLCHAIN_INCLUDE #expands to -I search paths
1641
- - -I"$”: COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR #expands to -I search paths
1642
- - -D$: COLLECTION_TEST_DEFINES #expands to all -D defined symbols
1678
+ - -I"$": COLLECTION_PATHS_TEST_TOOLCHAIN_INCLUDE #expands to -I search paths
1679
+ - -I"$": COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR #expands to -I search paths
1680
+ - -D$: COLLECTION_DEFINES_TEST_AND_VENDOR #expands to all -D defined symbols
1643
1681
  - --network-license #simple command line argument
1644
1682
  - -optimize-level 4 #simple command line argument
1645
1683
  - "#{`args.exe -m acme.prj`}" #in-line ruby sub to shell out & build string of arguments
@@ -1673,7 +1711,8 @@ Resulting command line constructions from preceding example [:tools] YAML blurbs
1673
1711
 
1674
1712
  [notes: (1.) "arg-foo arg-bar arg-baz" is a fabricated example
1675
1713
  string collected from $stdout as a result of shell execution
1676
- of args.exe {text:line-break} (2.) the -c and -o arguments are
1714
+ of args.exe
1715
+ (2.) the -c and -o arguments are
1677
1716
  fabricated examples simulating a single compilation step for
1678
1717
  a test; ${1} & ${2} are single files]
1679
1718
 
@@ -1698,9 +1737,8 @@ Notes:
1698
1737
  builds
1699
1738
 
1700
1739
  * "COLLECTION_" indicates that Ceedling did some work to assemble
1701
- the list. For instance, expanding path globs, {text:soft-page-break}
1702
- combining multiple path globs into a convenient summation,
1703
- etc.
1740
+ the list. For instance, expanding path globs, combining multiple
1741
+ path globs into a convenient summation, etc.
1704
1742
 
1705
1743
  * At present, $stderr redirection is primarily used to capture
1706
1744
  errors from test fixtures so that they can be displayed at the
@@ -1776,11 +1814,11 @@ Notes:
1776
1814
  only useful for advanced features not yet documented.
1777
1815
 
1778
1816
  * Wherever multiple path lists are combined for use Ceedling prioritizes
1779
- path groups as follows: {text:line-break} test paths, support paths,
1780
- source paths, include paths. This can be useful, for instance, in
1781
- certain testing scenarios where we desire Ceedling or the compiler to
1782
- find a stand-in header file before the actual source header file of
1783
- the same name.
1817
+ path groups as follows: test paths, support paths, source paths, include
1818
+ paths.
1819
+ This can be useful, for instance, in certain testing scenarios
1820
+ where we desire Ceedling or the compiler to find a stand-in header file
1821
+ before the actual source header file of the same name.
1784
1822
 
1785
1823
 
1786
1824
  **plugins**: Ceedling extensions
Binary file
Binary file
@@ -0,0 +1,207 @@
1
+ # ThrowTheSwitch.org Coding Standard
2
+
3
+ Hi. Welcome to the coding standard for ThrowTheSwitch.org. For the most part,
4
+ we try to follow these standards to unify our contributors' code into a cohesive
5
+ unit (puns intended). You might find places where these standards aren't
6
+ followed. We're not perfect. Please be polite where you notice these discrepancies
7
+ and we'll try to be polite when we notice yours.
8
+
9
+ ;)
10
+
11
+
12
+ ## Why Have A Coding Standard?
13
+
14
+ Being consistent makes code easier to understand. We've made an attempt to keep
15
+ our standard simple because we also believe that we can only expect someone to
16
+ follow something that is understandable. Please do your best.
17
+
18
+
19
+ ## Our Philosophy
20
+
21
+ Before we get into details on syntax, let's take a moment to talk about our
22
+ vision for these tools. We're C developers and embedded software developers.
23
+ These tools are great to test any C code, but catering to embedded software has
24
+ made us more tolerant of compiler quirks. There are a LOT of quirky compilers
25
+ out there. By quirky I mean "doesn't follow standards because they feel like
26
+ they have a license to do as they wish."
27
+
28
+ Our philosophy is "support every compiler we can". Most often, this means that
29
+ we aim for writing C code that is standards compliant (often C89... that seems
30
+ to be a sweet spot that is almost always compatible). But it also means these
31
+ tools are tolerant of things that aren't common. Some that aren't even
32
+ compliant. There are configuration options to override the size of standard
33
+ types. There are configuration options to force Unity to not use certain
34
+ standard library functions. A lot of Unity is configurable and we have worked
35
+ hard to make it not TOO ugly in the process.
36
+
37
+ Similarly, our tools that parse C do their best. They aren't full C parsers
38
+ (yet) and, even if they were, they would still have to accept non-standard
39
+ additions like gcc extensions or specifying `@0x1000` to force a variable to
40
+ compile to a particular location. It's just what we do, because we like
41
+ everything to Just Work™.
42
+
43
+ Speaking of having things Just Work™, that's our second philosophy. By that, we
44
+ mean that we do our best to have EVERY configuration option have a logical
45
+ default. We believe that if you're working with a simple compiler and target,
46
+ you shouldn't need to configure very much... we try to make the tools guess as
47
+ much as they can, but give the user the power to override it when it's wrong.
48
+
49
+
50
+ ## Naming Things
51
+
52
+ Let's talk about naming things. Programming is all about naming things. We name
53
+ files, functions, variables, and so much more. While we're not always going to
54
+ find the best name for something, we actually put quite a bit of effort into
55
+ finding *What Something WANTS to be Called*™.
56
+
57
+ When naming things, we more or less follow this hierarchy, the first being the
58
+ most important to us (but we do all four whenever possible):
59
+ 1. Readable
60
+ 2. Descriptive
61
+ 3. Consistent
62
+ 4. Memorable
63
+
64
+
65
+ #### Readable
66
+
67
+ We want to read our code. This means we like names and flow that are more
68
+ naturally read. We try to avoid double negatives. We try to avoid cryptic
69
+ abbreviations (sticking to ones we feel are common).
70
+
71
+
72
+ #### Descriptive
73
+
74
+ We like descriptive names for things, especially functions and variables.
75
+ Finding the right name for something is an important endeavor. You might notice
76
+ from poking around our code that this often results in names that are a little
77
+ longer than the average. Guilty. We're okay with a tiny bit more typing if it
78
+ means our code is easier to understand.
79
+
80
+ There are two exceptions to this rule that we also stick to as religiously as
81
+ possible:
82
+
83
+ First, while we realize hungarian notation (and similar systems for encoding
84
+ type information into variable names) is providing a more descriptive name, we
85
+ feel that (for the average developer) it takes away from readability and
86
+ therefore is to be avoided.
87
+
88
+ Second, loop counters and other local throw-away variables often have a purpose
89
+ which is obvious. There's no need, therefore, to get carried away with complex
90
+ naming. We find i, j, and k are better loop counters than loopCounterVar or
91
+ whatnot. We only break this rule when we see that more description could improve
92
+ understanding of an algorithm.
93
+
94
+
95
+ #### Consistent
96
+
97
+ We like consistency, but we're not really obsessed with it. We try to name our
98
+ configuration macros in a consistent fashion... you'll notice a repeated use of
99
+ UNITY_EXCLUDE_BLAH or UNITY_USES_BLAH macros. This helps users avoid having to
100
+ remember each macro's details.
101
+
102
+
103
+ #### Memorable
104
+
105
+ Where ever it doesn't violate the above principles, we try to apply memorable
106
+ names. Sometimes this means using something that is simply descriptive, but
107
+ often we strive for descriptive AND unique... we like quirky names that stand
108
+ out in our memory and are easier to search for. Take a look through the file
109
+ names in Ceedling and you'll get a good idea of what we are talking about here.
110
+ Why use preprocess when you can use preprocessinator? Or what better describes a
111
+ module in charge of invoking tasks during releases than release_invoker? Don't
112
+ get carried away. The names are still descriptive and fulfill the above
113
+ requirements, but they don't feel stale.
114
+
115
+
116
+ ## C and C++ Details
117
+
118
+ We don't really want to add to the style battles out there. Tabs or spaces?
119
+ How many spaces? Where do the braces go? These are age-old questions that will
120
+ never be answered... or at least not answered in a way that will make everyone
121
+ happy.
122
+
123
+ We've decided on our own style preferences. If you'd like to contribute to these
124
+ projects (and we hope that you do), then we ask if you do your best to follow
125
+ the same. It will only hurt a little. We promise.
126
+
127
+
128
+ #### Whitespace
129
+
130
+ Our C-style is to use spaces and to use 4 of them per indent level. It's a nice
131
+ power-of-2 number that looks decent on a wide screen. We have no more reason
132
+ than that. We break that rule when we have lines that wrap (macros or function
133
+ arguments or whatnot). When that happens, we like to indent further to line
134
+ things up in nice tidy columns.
135
+
136
+ ```C
137
+ if (stuff_happened)
138
+ {
139
+ do_something();
140
+ }
141
+ ```
142
+
143
+
144
+ #### Case
145
+
146
+ - Files - all lower case with underscores.
147
+ - Variables - all lower case with underscores
148
+ - Macros - all caps with underscores.
149
+ - Typedefs - all caps with underscores. (also ends with _T).
150
+ - Functions - camel cased. Usually named ModuleName_FuncName
151
+ - Constants and Globals - camel cased.
152
+
153
+
154
+ #### Braces
155
+
156
+ The left brace is on the next line after the declaration. The right brace is
157
+ directly below that. Everything in between in indented one level. If you're
158
+ catching an error and you have a one-line, go ahead and to it on the same line.
159
+
160
+ ```C
161
+ while (blah)
162
+ {
163
+ //Like so. Even if only one line, we use braces.
164
+ }
165
+ ```
166
+
167
+
168
+ #### Comments
169
+
170
+ Do you know what we hate? Old-school C block comments. BUT, we're using them
171
+ anyway. As we mentioned, our goal is to support every compiler we can,
172
+ especially embedded compilers. There are STILL C compilers out there that only
173
+ support old-school block comments. So that is what we're using. We apologize. We
174
+ think they are ugly too.
175
+
176
+
177
+ ## Ruby Details
178
+
179
+ Is there really such thing as a Ruby coding standard? Ruby is such a free form
180
+ language, it seems almost sacrilegious to suggest that people should comply to
181
+ one method! We'll keep it really brief!
182
+
183
+
184
+ #### Whitespace
185
+
186
+ Our Ruby style is to use spaces and to use 2 of them per indent level. It's a
187
+ nice power-of-2 number that really grooves with Ruby's compact style. We have no
188
+ more reason than that. We break that rule when we have lines that wrap. When
189
+ that happens, we like to indent further to line things up in nice tidy columns.
190
+
191
+
192
+ #### Case
193
+
194
+ - Files - all lower case with underscores.
195
+ - Variables - all lower case with underscores
196
+ - Classes, Modules, etc - Camel cased.
197
+ - Functions - all lower case with underscores
198
+ - Constants - all upper case with underscores
199
+
200
+
201
+ ## Documentation
202
+
203
+ Egad. Really? We use markdown and we like pdf files because they can be made to
204
+ look nice while still being portable. Good enough?
205
+
206
+
207
+ *Find The Latest of This And More at [ThrowTheSwitch.org](https://throwtheswitch.org)*