ceedling 1.2.1 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (276) hide show
  1. checksums.yaml +4 -4
  2. data/GIT_COMMIT_SHA +1 -1
  3. data/README.md +11 -9
  4. data/Rakefile +2 -1
  5. data/assets/features/ceedling +1 -1
  6. data/assets/fixtures/test_source_file_duplicate_basenames/test_calc_typo.c +14 -0
  7. data/assets/fixtures/tests_with_duplicate_test_names/test_foo.c +21 -0
  8. data/bin/actionator.rb +6 -12
  9. data/bin/app_cfg.rb +14 -1
  10. data/bin/ceedling +13 -3
  11. data/bin/cli.rb +25 -6
  12. data/bin/cli_handler.rb +113 -73
  13. data/bin/cli_helper.rb +51 -78
  14. data/bin/installation_selector.rb +81 -0
  15. data/bin/launchinator.rb +69 -0
  16. data/bin/mixin_resolvinator.rb +26 -36
  17. data/bin/objects.yml +13 -0
  18. data/bin/path_validator.rb +25 -29
  19. data/bin/versionator.rb +47 -48
  20. data/ceedling.gemspec +19 -15
  21. data/docs/BreakingChanges.md +70 -1
  22. data/docs/Changelog.md +74 -3
  23. data/docs/KnownIssues.md +90 -4
  24. data/docs/ReleaseNotes.md +13 -0
  25. data/lib/ceedling/build_log_writer.rb +33 -0
  26. data/lib/ceedling/config/build_root_policy.rb +70 -0
  27. data/lib/ceedling/config/configurator.rb +14 -16
  28. data/lib/ceedling/config/configurator_builder.rb +58 -28
  29. data/lib/ceedling/config/configurator_paths_validator.rb +179 -0
  30. data/lib/ceedling/config/configurator_plugins.rb +1 -1
  31. data/lib/ceedling/config/configurator_setup.rb +15 -28
  32. data/lib/ceedling/config/configurator_validator.rb +1 -110
  33. data/lib/ceedling/defaults.rb +4 -4
  34. data/lib/ceedling/dependencies/README.md +18 -16
  35. data/lib/ceedling/dependencies/dependency_cache_store.rb +20 -3
  36. data/lib/ceedling/dependencies/dependency_hasher.rb +35 -1
  37. data/lib/ceedling/filename_extension.rb +7 -1
  38. data/lib/ceedling/filesystem/FILE_TREE.md +253 -0
  39. data/lib/ceedling/filesystem/PATH_HANDLING.md +304 -0
  40. data/lib/ceedling/filesystem/README.md +41 -0
  41. data/lib/ceedling/filesystem/build_subpath.rb +102 -0
  42. data/lib/ceedling/filesystem/destination_collision.rb +25 -0
  43. data/lib/ceedling/{file_finder.rb → filesystem/file_finder.rb} +159 -104
  44. data/lib/ceedling/{file_finder_helper.rb → filesystem/file_finder_helper.rb} +36 -31
  45. data/lib/ceedling/filesystem/file_path_collection_utils.rb +183 -0
  46. data/lib/ceedling/{file_path_utils.rb → filesystem/file_path_utils.rb} +108 -97
  47. data/lib/ceedling/{file_system_wrapper.rb → filesystem/file_system_wrapper.rb} +6 -5
  48. data/lib/ceedling/filesystem/file_tree.rb +241 -0
  49. data/lib/ceedling/{file_wrapper.rb → filesystem/file_wrapper.rb} +45 -38
  50. data/lib/ceedling/filesystem/path_exclusions.rb +30 -0
  51. data/lib/ceedling/{path_matcher.rb → filesystem/path_matcher.rb} +27 -23
  52. data/lib/ceedling/{path_mirror.rb → filesystem/path_mirror.rb} +19 -18
  53. data/lib/ceedling/filesystem/path_spellings.rb +55 -0
  54. data/lib/ceedling/filesystem/project_paths.rb +184 -0
  55. data/lib/ceedling/filesystem/working_dir.rb +40 -0
  56. data/lib/ceedling/generators/generator.rb +5 -6
  57. data/lib/ceedling/generators/generator_partials.rb +1 -1
  58. data/lib/ceedling/generators/generator_test_results_backtrace.rb +7 -7
  59. data/lib/ceedling/handoff.rb +121 -0
  60. data/lib/ceedling/includes/include_factory.rb +3 -3
  61. data/lib/ceedling/includes/include_pathinator.rb +67 -10
  62. data/lib/ceedling/includes/includes.rb +1 -1
  63. data/lib/ceedling/installation.rb +92 -0
  64. data/lib/ceedling/library_resolver.rb +99 -0
  65. data/lib/ceedling/objects.yml +23 -2
  66. data/lib/ceedling/partials/partializer.rb +4 -4
  67. data/lib/ceedling/partials/partializer_config.rb +3 -1
  68. data/lib/ceedling/plugins/report_log_writer_plugin.rb +3 -5
  69. data/lib/ceedling/preprocess/preprocessinator_file_assembler.rb +1 -1
  70. data/lib/ceedling/preprocess/preprocessinator_includes_handler.rb +1 -1
  71. data/lib/ceedling/preprocess/preprocessinator_line_marker_includes_extractor.rb +1 -1
  72. data/lib/ceedling/rake_app/rakefile_component_resolver.rb +10 -17
  73. data/lib/ceedling/rakefile.rb +15 -1
  74. data/lib/ceedling/rakefiles/base/tasks_base.rake +1 -1
  75. data/lib/ceedling/rakefiles/release/rules_release.rake +4 -7
  76. data/lib/ceedling/release_invoker/release_build_executor.rb +33 -44
  77. data/lib/ceedling/release_invoker/release_build_planner.rb +14 -6
  78. data/lib/ceedling/reportinator.rb +3 -4
  79. data/lib/ceedling/setupinator.rb +94 -90
  80. data/lib/ceedling/test_context_extractor.rb +5 -1
  81. data/lib/ceedling/test_invoker/PIPELINE.md +9 -7
  82. data/lib/ceedling/test_invoker/mock_locator.rb +60 -2
  83. data/lib/ceedling/test_invoker/partials_manager.rb +12 -0
  84. data/lib/ceedling/test_invoker/standin_headerinator.rb +22 -13
  85. data/lib/ceedling/test_invoker/test_build_executor.rb +24 -40
  86. data/lib/ceedling/test_invoker/test_build_planner.rb +37 -18
  87. data/lib/ceedling/test_invoker/test_build_setup.rb +17 -12
  88. data/lib/ceedling/test_invoker/test_build_validations.rb +16 -31
  89. data/lib/ceedling/test_invoker/test_file_preprocessinator.rb +1 -1
  90. data/lib/ceedling/test_invoker/test_invoker.rb +6 -1
  91. data/lib/ceedling/test_invoker/test_pipeline_helpers.rb +1 -1
  92. data/lib/ceedling/test_invoker/test_source_file_directive_resolver.rb +40 -20
  93. data/lib/ceedling/tool_executor.rb +9 -3
  94. data/lib/ceedling/yaml_wrapper.rb +3 -2
  95. data/lib/version.rb +1 -1
  96. data/plugins/bullseye/config/defaults_bullseye.rb +1 -1
  97. data/plugins/bullseye/lib/bullseye.rb +9 -7
  98. data/plugins/cppcheck/config/defaults_cppcheck.rb +1 -1
  99. data/plugins/dependencies/config/defaults.yml +6 -6
  100. data/plugins/dependencies/dependencies.rake +4 -1
  101. data/plugins/dependencies/lib/dependencies.rb +18 -8
  102. data/plugins/dependencies/lib/dependency_spec.rb +17 -5
  103. data/plugins/fff/lib/fff.rb +45 -39
  104. data/plugins/fff/spec/fff_cmock_wrapper_spec.rb +128 -0
  105. data/plugins/gcov/config/defaults_gcov.rb +1 -1
  106. data/plugins/gcov/lib/console_reportinator.rb +4 -18
  107. data/plugins/gcov/lib/gcov.rb +9 -2
  108. data/plugins/gcov/lib/gcovr_reportinator.rb +8 -40
  109. data/plugins/gcov/lib/gcovr_thresholds.rb +74 -0
  110. data/plugins/gcov/lib/reportgenerator_reportinator.rb +1 -1
  111. data/plugins/module_generator/lib/module_generator.rb +3 -3
  112. data/plugins/report_tests_teamcity_stdout/lib/report_tests_teamcity_stdout.rb +53 -80
  113. data/plugins/sanitize/lib/sanitize_records.rb +3 -6
  114. data/plugins/valgrind/lib/valgrind.rb +14 -7
  115. data/site-local/configuration/reference/cmock.html +2 -1
  116. data/site-local/configuration/reference/files.html +9 -3
  117. data/site-local/configuration/reference/libraries.html +21 -3
  118. data/site-local/configuration/reference/paths.html +29 -6
  119. data/site-local/configuration/reference/project.html +17 -7
  120. data/site-local/configuration/reference/release-build.html +2 -0
  121. data/site-local/configuration/reference/tools.html +9 -0
  122. data/site-local/configuration/which-ceedling.html +377 -17
  123. data/site-local/development/releases.html +5 -1
  124. data/site-local/development/workflow.html +48 -43
  125. data/site-local/getting-started/builds.html +2 -0
  126. data/site-local/getting-started/command-line.html +56 -4
  127. data/site-local/plugins/dependencies.html +6 -3
  128. data/site-local/plugins/fff.html +42 -11
  129. data/site-local/plugins/gcov/gcovr.html +15 -12
  130. data/site-local/plugins/gcov/setup.html +2 -1
  131. data/site-local/plugins/report-tests-raw-output-log.html +3 -1
  132. data/site-local/plugins/report-tests-teamcity-stdout.html +6 -3
  133. data/site-local/plugins/sanitize.html +7 -6
  134. data/site-local/plugins/valgrind.html +8 -7
  135. data/site-local/project/upgrade.html +3 -0
  136. data/site-local/reference/command-line.html +9 -2
  137. data/site-local/sitemap.xml.gz +0 -0
  138. data/site-local/snapshot/plugins/bullseye/config/defaults_bullseye.rb +1 -1
  139. data/site-local/snapshot/plugins/gcov/config/defaults_gcov.rb +1 -1
  140. data/site-local/testing-guide/conventions.html +53 -0
  141. data/spec/integration/actionator_file_operations_spec.rb +91 -1
  142. data/spec/integration/compile_commands_json_db_spec.rb +1 -1
  143. data/spec/integration/configurator_validation_spec.rb +1 -1
  144. data/spec/integration/dependencies/dependency_tracker_cache_hardening_spec.rb +26 -0
  145. data/spec/integration/dependencies/dependency_tracker_core_spec.rb +22 -0
  146. data/spec/integration/launcher_handoff_spec.rb +297 -0
  147. data/spec/integration/mixin_loading_spec.rb +1 -1
  148. data/spec/integration/module_generator_spec.rb +3 -3
  149. data/spec/integration/nested_test_artifacts_spec.rb +99 -0
  150. data/spec/integration/partials_module_resolution_spec.rb +7 -4
  151. data/spec/integration/path_intake_scenarios_spec.rb +101 -0
  152. data/spec/integration/path_scenarios_spec.rb +322 -0
  153. data/spec/integration/quote_include_isolator_spec.rb +1 -1
  154. data/spec/integration/report_build_warnings_log_spec.rb +1 -1
  155. data/spec/integration/report_tests_log_factory_spec.rb +1 -1
  156. data/spec/integration/test_executable_manifest_spec.rb +1 -1
  157. data/spec/integration/test_includes_extractinator_spec.rb +2 -1
  158. data/spec/integration/test_naming_spec.rb +198 -0
  159. data/spec/integration/test_source_file_checks_spec.rb +166 -0
  160. data/spec/integration/tool_validator_spec.rb +1 -1
  161. data/spec/integration/upgrade_docs_spec.rb +84 -0
  162. data/spec/integration/vendor_copy_transient_io_retry_spec.rb +74 -5
  163. data/spec/support/file_tree_helper.rb +88 -0
  164. data/spec/support/integration/configurator_integration_helper.rb +6 -6
  165. data/spec/support/integration/dependency_tracker_integration_helper.rb +1 -1
  166. data/spec/support/integration/partials_generation_integration_helper.rb +2 -2
  167. data/spec/support/integration/path_scenario_harness.rb +173 -0
  168. data/spec/support/integration/spec_integration_helper.rb +1 -1
  169. data/spec/support/integration/test_includes_harness.rb +13 -2
  170. data/spec/support/spec_helper.rb +2 -0
  171. data/spec/support/system/spec_system_helper.rb +7 -6
  172. data/spec/support/system/system_context.rb +21 -3
  173. data/spec/support/working_dir_tracking.rb +49 -0
  174. data/spec/system/build_output_mirroring_spec.rb +2 -2
  175. data/spec/system/conditional_mock_includes_spec.rb +1 -1
  176. data/spec/system/delta_builds_spec.rb +137 -11
  177. data/spec/system/gcov_deployment_spec.rb +1 -0
  178. data/spec/system/header_include_path_validation_spec.rb +4 -4
  179. data/spec/system/launcher_handoff_spec.rb +82 -0
  180. data/spec/system/mock_include_folders_spec.rb +91 -0
  181. data/spec/system/parent_directory_reference_spec.rb +5 -3
  182. data/spec/system/path_handling_probes_spec.rb +192 -0
  183. data/spec/system/preprocessing_parameterized_tests_spec.rb +1 -1
  184. data/spec/system/rake_release_task_path_disambiguation_spec.rb +6 -6
  185. data/spec/system/rake_test_task_path_disambiguation_spec.rb +85 -0
  186. data/spec/system/special_path_characters_spec.rb +86 -0
  187. data/spec/system/support/common_test_cases.rb +23 -21
  188. data/spec/system/support/gcov_common_test_cases.rb +37 -9
  189. data/spec/system/support/sanitize_common_test_cases.rb +2 -2
  190. data/spec/system/support/valgrind_common_test_cases.rb +12 -12
  191. data/spec/system/test_pipeline_stop_points_spec.rb +4 -4
  192. data/spec/system/test_runner_system_include_spec.rb +1 -1
  193. data/spec/system/test_source_file_directive_spec.rb +34 -5
  194. data/spec/units/bin/actionator_spec.rb +14 -17
  195. data/spec/units/bin/app_cfg_spec.rb +37 -0
  196. data/spec/units/bin/cli_handler_spec.rb +282 -6
  197. data/spec/units/bin/cli_helper_spec.rb +116 -45
  198. data/spec/units/bin/installation_selector_spec.rb +114 -0
  199. data/spec/units/bin/launchinator_spec.rb +171 -0
  200. data/spec/units/bin/path_validator_spec.rb +10 -0
  201. data/spec/units/bin/versionator_spec.rb +38 -6
  202. data/spec/units/build_log_writer_spec.rb +57 -0
  203. data/spec/units/config/build_root_policy_spec.rb +61 -0
  204. data/spec/units/config/configurator_builder_spec.rb +37 -6
  205. data/spec/units/config/configurator_paths_validator_spec.rb +292 -0
  206. data/spec/units/config/configurator_setup_spec.rb +9 -65
  207. data/spec/units/config/configurator_spec.rb +27 -5
  208. data/spec/units/config/configurator_validator_spec.rb +1 -172
  209. data/spec/units/default_tools_quoting_spec.rb +83 -0
  210. data/spec/units/dependencies/dependency_cache_store_spec.rb +33 -2
  211. data/spec/units/dependencies/dependency_debug_tree_spec.rb +1 -1
  212. data/spec/units/dependencies/dependency_hasher_spec.rb +42 -1
  213. data/spec/units/dependencies/dependency_path_normalizer_spec.rb +1 -1
  214. data/spec/units/dependencies/dependency_tracker_spec.rb +3 -1
  215. data/spec/units/filename_extension_spec.rb +11 -0
  216. data/spec/units/filesystem/build_subpath_spec.rb +122 -0
  217. data/spec/units/filesystem/destination_collision_spec.rb +30 -0
  218. data/spec/units/{file_finder_helper_spec.rb → filesystem/file_finder_helper_spec.rb} +46 -1
  219. data/spec/units/{file_finder_spec.rb → filesystem/file_finder_spec.rb} +188 -22
  220. data/spec/units/{file_path_collection_utils_spec.rb → filesystem/file_path_collection_utils_spec.rb} +181 -1
  221. data/spec/units/{file_path_utils_spec.rb → filesystem/file_path_utils_spec.rb} +204 -87
  222. data/spec/units/filesystem/file_system_wrapper_spec.rb +33 -0
  223. data/spec/units/filesystem/file_tree_spec.rb +511 -0
  224. data/spec/units/filesystem/file_tree_windows_spec.rb +78 -0
  225. data/spec/units/{file_wrapper_spec.rb → filesystem/file_wrapper_spec.rb} +95 -12
  226. data/spec/units/{path_matcher_spec.rb → filesystem/path_matcher_spec.rb} +12 -1
  227. data/spec/units/{path_mirror_spec.rb → filesystem/path_mirror_spec.rb} +32 -4
  228. data/spec/units/filesystem/project_paths_spec.rb +147 -0
  229. data/spec/units/filesystem/working_dir_spec.rb +71 -0
  230. data/spec/units/generators/generator_spec.rb +12 -6
  231. data/spec/units/generators/generator_test_results_backtrace_spec.rb +50 -46
  232. data/spec/units/generators/generator_test_results_spec.rb +1 -1
  233. data/spec/units/handoff_spec.rb +205 -0
  234. data/spec/units/includes/include_factory_spec.rb +3 -3
  235. data/spec/units/includes/include_pathinator_spec.rb +46 -0
  236. data/spec/units/installation_spec.rb +228 -0
  237. data/spec/units/library_resolver_spec.rb +157 -0
  238. data/spec/units/mock_locator_spec.rb +76 -1
  239. data/spec/units/partials/partializer_config_spec.rb +7 -0
  240. data/spec/units/partials/partializer_spec.rb +1 -0
  241. data/spec/units/partials_manager_spec.rb +17 -0
  242. data/spec/units/plugins/bullseye_spec.rb +15 -2
  243. data/spec/units/plugins/console_reportinator_spec.rb +18 -20
  244. data/spec/units/plugins/dependencies_spec.rb +33 -7
  245. data/spec/units/plugins/dependency_spec_spec.rb +17 -0
  246. data/spec/units/plugins/gcov_spec.rb +28 -3
  247. data/spec/units/plugins/gcovr_reportinator_spec.rb +19 -47
  248. data/spec/units/plugins/gcovr_thresholds_spec.rb +95 -0
  249. data/spec/units/plugins/module_generator_spec.rb +5 -5
  250. data/spec/units/plugins/report_build_warnings_log_spec.rb +3 -3
  251. data/spec/units/plugins/report_log_writer_plugin_spec.rb +10 -1
  252. data/spec/units/plugins/report_tests_raw_output_log_spec.rb +13 -2
  253. data/spec/units/plugins/report_tests_teamcity_stdout_spec.rb +77 -3
  254. data/spec/units/plugins/reportgenerator_reportinator_spec.rb +1 -1
  255. data/spec/units/plugins/sanitize_records_spec.rb +3 -1
  256. data/spec/units/plugins/sanitize_spec.rb +1 -1
  257. data/spec/units/plugins/valgrind_spec.rb +23 -8
  258. data/spec/units/preprocess/preprocessinator_comment_stripper_spec.rb +1 -1
  259. data/spec/units/rake_app/rakefile_component_resolver_spec.rb +21 -0
  260. data/spec/units/release_build_executor_spec.rb +53 -14
  261. data/spec/units/release_build_planner_spec.rb +15 -3
  262. data/spec/units/reportinator_spec.rb +5 -5
  263. data/spec/units/standin_headerinator_spec.rb +31 -1
  264. data/spec/units/test_build_executor_spec.rb +65 -3
  265. data/spec/units/test_build_planner_spec.rb +104 -2
  266. data/spec/units/test_build_setup_spec.rb +96 -12
  267. data/spec/units/test_context_extractor_spec.rb +25 -0
  268. data/spec/units/test_file_preprocessinator_spec.rb +17 -1
  269. data/spec/units/test_includes_extractinator_spec.rb +5 -1
  270. data/spec/units/test_invoker/objects_wiring_spec.rb +6 -3
  271. data/spec/units/test_invoker_spec.rb +14 -1
  272. data/spec/units/test_source_file_directive_resolver_spec.rb +38 -7
  273. data/spec/units/tool_executor_spec.rb +26 -0
  274. data/spec/units/yaml_wrapper_spec.rb +11 -0
  275. metadata +109 -25
  276. data/lib/ceedling/file_path_collection_utils.rb +0 -164
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1eb94c2d7bae641fd66962f23ab8ee145a73c635f0fd7a5ae5fb2d9602f2713a
4
- data.tar.gz: 2a20e6e6da82880a3ba78464a872c92ccb1be79174385a806477133e116d2682
3
+ metadata.gz: ea37cd2499cbbf39a49993a77cd3e1fbe6a5e1777b70b8ba4ed1fff23823a446
4
+ data.tar.gz: 7dabe29c6ccc55ee156da20783cae2a52496e4efcee00ded8c5259b24128c57c
5
5
  SHA512:
6
- metadata.gz: 0a5e8b807216ea64535a94e5b7b1a4b005f84ece39c5c4dad3bebf5cb0febe7236a8c8db30716baa2ffc3db7b48df8dfb2b3e7e3cced0bd851c88528f5b6773b
7
- data.tar.gz: 1e46b99eba0c0fa4a8e365719688d0d643a8338ce7d01e30c5a77c918e5f0ca151c37da0959006ff13d2b8ae904da95f9be19ffb9d1ebb17c6ccbafe55760e11
6
+ metadata.gz: 7990a5a91fbd7eb56b476f7c71236cc1774eb914d41a24e8774ba534ef56cf29155b8edd8e3968152899c1fdbe266258fe8c7e738502b79deb78b6c405b14c2a
7
+ data.tar.gz: 66de8b40c53aadb9ea483dd8d2c9a2deecbc6034ca4075720ac996b77220ea542c16845f019533b825fc243a95624dd7a314b9163939c1f8b4dd0dd37a9cfce1
data/GIT_COMMIT_SHA CHANGED
@@ -1 +1 @@
1
- 47d2c5e
1
+ 3b30ae3
data/README.md CHANGED
@@ -38,7 +38,7 @@ Ceedling’s features support all types of C development from low-level embedded
38
38
  to enterprise systems. No tool is perfect, but Ceedling can do a whole lot to
39
39
  help you and your team produce quality software.
40
40
 
41
- ## Ceedling 1.2.1 is the latest and greatest
41
+ ## Ceedling 1.2.2 is the latest and greatest
42
42
 
43
43
  See [_Changelog_](docs/Changelog.md), [_Release Notes_][release-notes], [_Breaking Changes_][breaking-changes], and [_Known Issues_][known-issues].
44
44
 
@@ -671,11 +671,9 @@ of your choosing.
671
671
  #### Attaching a Ceedling version to your project
672
672
 
673
673
  Ceedling can be installed as a globally available Ruby gem. Ceedling can
674
- also deploy all its guts into your project instead. This allows it to
675
- be used without worrying about external dependencies. More importantly,
676
- you don’t have to worry about Ceedling changing outside of your project
677
- just because you updated your gems. No need to worry about changes in
678
- Unity or CMock breaking your build in the future.
674
+ also deploy all its guts into your project instead. Your project then keeps
675
+ its own copy of Ceedling, Unity, and CMock, which updating your gems leaves
676
+ alone. Ceedling itself still needs Ruby and the gems Ceedling depends on.
679
677
 
680
678
  To use Ceedling this way, tell it you want a local copy when you create
681
679
  your project:
@@ -689,6 +687,10 @@ into a new folder `vendor/` inside your project `YourNewProjectName/`.
689
687
  It will create the same simple empty directory structure for you with
690
688
  `src/` and `test/` folders as the standard `new` command.
691
689
 
690
+ Run your project with `./ceedling` from its root (`.\ceedling.cmd` on
691
+ Windows), or with the gem’s `ceedling` command. Either way, your project’s copy
692
+ runs every command. The gem’s `ceedling` command hands off to it.
693
+
692
694
  ### Running build & plugin tasks
693
695
 
694
696
  You can view all the build and plugin tasks available to you thanks to your
@@ -728,11 +730,11 @@ If you want to force a vendored version of Ceedling inside your project to
728
730
  upgrade to match your latest gem, no problem. Just do the following…
729
731
 
730
732
  ```shell
731
- > ceedling upgrade --local YourNewProjectName
733
+ > ceedling upgrade YourProjectName
732
734
  ```
733
735
 
734
- Just like with the `new` command, an `upgrade` should be executed from
735
- within the root directory of your project.
736
+ `upgrade` takes the path to your project and copies the Ceedling you run
737
+ into it, along with Unity and CMock.
736
738
 
737
739
  ### Git integration
738
740
 
data/Rakefile CHANGED
@@ -523,7 +523,8 @@ task 'ci:summary' do
523
523
  jobs_path: ENV['CI_SUMMARY_JOBS'],
524
524
  baseline_path: ENV['CI_SUMMARY_BASELINE'],
525
525
  diff_path: ENV['CI_SUMMARY_DIFF'],
526
- merge_base: ENV['CI_SUMMARY_MERGE_BASE']
526
+ merge_base: ENV['CI_SUMMARY_MERGE_BASE'],
527
+ todo_path: ENV['CI_SUMMARY_RUBOCOP_TODO']
527
528
  )
528
529
 
529
530
  sha = ENV.fetch( 'CI_SUMMARY_SHA' )
@@ -6,4 +6,4 @@
6
6
  # SPDX-License-Identifier: MIT
7
7
  # =========================================================================
8
8
 
9
- ruby vendor/ceedling/bin/ceedling $*
9
+ ruby vendor/ceedling/bin/ceedling "$@"
@@ -0,0 +1,14 @@
1
+ #include "unity.h"
2
+
3
+ // Misspells alpha/calc.c on purpose, so no source file matches this entry.
4
+ TEST_SOURCE_FILE("alpha/clac.c")
5
+
6
+ extern int calc_value(void);
7
+
8
+ void setUp(void) {}
9
+ void tearDown(void) {}
10
+
11
+ void test_calc_value_from_a_misspelled_source(void)
12
+ {
13
+ TEST_ASSERT_EQUAL(111, calc_value());
14
+ }
@@ -0,0 +1,21 @@
1
+ /* =========================================================================
2
+ Ceedling - Test-Centered Build System for C
3
+ ThrowTheSwitch.org
4
+ Copyright (c) 2010-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
5
+ SPDX-License-Identifier: MIT
6
+ ========================================================================= */
7
+
8
+ #include "unity.h"
9
+
10
+ void setUp(void)
11
+ {
12
+ }
13
+
14
+ void tearDown(void)
15
+ {
16
+ }
17
+
18
+ void test_this_is_the_root_directory_test_foo(void)
19
+ {
20
+ TEST_ASSERT_EQUAL(1, 1);
21
+ }
data/bin/actionator.rb CHANGED
@@ -36,6 +36,9 @@ class Actionator
36
36
 
37
37
  JUNK_FILE_EXCLUDE_REGEX = /(\.DS_Store)|(thumbs\.db)/
38
38
 
39
+ # A file or directory named with a leading dot stays out of a copy, and is never entered
40
+ HIDDEN = ->( name ) { name.start_with?( '.' ) }
41
+
39
42
  BOLD = "\e[1m"
40
43
  CLEAR = "\e[0m"
41
44
 
@@ -93,19 +96,15 @@ class Actionator
93
96
  def copy_directory(source, destination, force: false, verbose: true,
94
97
  exclude_pattern: JUNK_FILE_EXCLUDE_REGEX)
95
98
  # Trailing separators arrive from the vendored component paths in cli_helper.
96
- # They would otherwise survive into the glob and into the rebasing below.
99
+ # They would otherwise survive into the rebasing below.
97
100
  src = resolve_source( source ).sub( /\/+\z/, '' )
98
101
  dest = resolve_destination( destination )
99
102
 
100
103
  # Thor reported the destination directory itself ahead of its contents.
101
104
  make_directory( dest, verbose: verbose )
102
105
 
103
- # FileWrapper#directory_listing does not escape glob metacharacters, and a
104
- # Ceedling install path can contain them. See issue #104.
105
- listing = @file_wrapper.directory_listing( File.join( escape_globs( src ), '**', '*' ) )
106
-
107
- listing.each do |entry|
108
- next if @file_wrapper.directory?( entry )
106
+ # The listing holds regular files only, in sorted path order
107
+ @file_wrapper.tree_files( src, skip: HIDDEN ).each do |entry|
109
108
  next if entry.match( exclude_pattern )
110
109
 
111
110
  copy_file( entry, rebase( entry, src, dest ), force: force, verbose: verbose )
@@ -198,11 +197,6 @@ class Actionator
198
197
  end
199
198
 
200
199
 
201
- def escape_globs(path)
202
- return path.gsub( /[*?{}\[\]]/ ) { |char| '\\' + char }
203
- end
204
-
205
-
206
200
  def status(verb, path, verbose)
207
201
  return unless verbose
208
202
 
data/bin/app_cfg.rb CHANGED
@@ -12,12 +12,21 @@ require "io/console"
12
12
 
13
13
  class CeedlingAppConfig
14
14
 
15
- def initialize()
15
+ def initialize(argv: [])
16
16
  # Default installation location determined from the location of this file
17
17
  ceedling_root_path = File.join( File.dirname( __FILE__ ), '..' )
18
18
 
19
19
  # Create internal hash of needed values
20
20
  @app_cfg = {
21
+ # The command line as given, before Thor consumes it, for handing off to another installation
22
+ :argv => argv.dup().freeze(),
23
+
24
+ # Markers from a launcher that handed off to this process, or nil
25
+ :handoff => nil,
26
+
27
+ # Base path of the installation running this launcher, unchanged by #set_paths
28
+ :launcher_root_path => File.expand_path( ceedling_root_path ),
29
+
21
30
  # Base path of any Ceedling installation
22
31
  :ceedling_root_path => '',
23
32
 
@@ -83,6 +92,10 @@ class CeedlingAppConfig
83
92
  end
84
93
  end
85
94
 
95
+ def set_handoff(markers)
96
+ @app_cfg[:handoff] = markers
97
+ end
98
+
86
99
  def set_project_config(config)
87
100
  @app_cfg[:project_config] = config
88
101
  end
data/bin/ceedling CHANGED
@@ -16,11 +16,17 @@ $LOAD_PATH.unshift( ceedling_bin_path )
16
16
 
17
17
  # Pull in our startup configuration code in bin/
18
18
  require 'app_cfg'
19
- CEEDLING_APPCFG = CeedlingAppConfig.new()
19
+ # The command line as given, before Thor consumes it
20
+ CEEDLING_APPCFG = CeedlingAppConfig.new( argv: ARGV )
20
21
 
21
22
  # Add load paths for `require 'ceedling/*'` statements in bin/ code
22
23
  $LOAD_PATH.unshift( CEEDLING_APPCFG[:ceedling_lib_base_path] )
23
24
 
25
+ # A launcher that handed off to this process left markers. Taking them here keeps any
26
+ # subprocess of this build from inheriting them.
27
+ require 'ceedling/handoff'
28
+ CEEDLING_APPCFG.set_handoff( Handoff.take_markers( ENV ) )
29
+
24
30
  # Assumed installed via Ceedling gem dependencies
25
31
  require 'constructor'
26
32
  # Commonly needed modules
@@ -60,12 +66,16 @@ begin
60
66
  # 5. Remove all paths added to $LOAD_PATH
61
67
  # (Main application will restore certain paths -- possibly updated by :which_ceedling)
62
68
  $LOAD_PATH.unshift(
63
- # lib/ceedling for base of any require statements
64
- CEEDLING_APPCFG[:ceedling_lib_path],
65
69
  # Add lib/ceedling/config to load configuration handling utils
66
70
  File.join( CEEDLING_APPCFG[:ceedling_lib_path], 'config' ),
71
+ # Add lib/ceedling/filesystem to load file and path handling code
72
+ File.join( CEEDLING_APPCFG[:ceedling_lib_path], 'filesystem' ),
67
73
  # Add lib/ceedling/rake_app to load Rake application handling code
68
74
  File.join( CEEDLING_APPCFG[:ceedling_lib_path], 'rake_app' ),
75
+ # lib/ceedling for base of any require statements. It follows its subdirectories, so a
76
+ # file an older Ceedling left directly in lib/ceedling/ never stands in for one that has
77
+ # moved below it.
78
+ CEEDLING_APPCFG[:ceedling_lib_path],
69
79
  # DIY vendored path
70
80
  diy_vendor_path
71
81
  )
data/bin/cli.rb CHANGED
@@ -603,13 +603,16 @@ module CeedlingTasks
603
603
  ) )
604
604
  def docs(dest=nil)
605
605
  _dest = dest.dup() if !dest.nil?
606
- @handler.docs( @app_cfg, _dest )
606
+ @handler.docs( ENV, @app_cfg, _dest )
607
607
  end
608
608
  # simplecov:enable line
609
609
 
610
610
 
611
611
  # simplecov:disable line
612
612
  desc "version", "Display version details of Ceedling components"
613
+ method_option :project, :type => :string, :default => nil, :lazy_default => CLI_MISSING_PARAMETER_DEFAULT, :aliases => ['-p'], :desc => DOC_PROJECT_FLAG
614
+ method_option :mixin, :type => :string, :default => [], :repeatable => true, :aliases => ['-m'], :desc => DOC_MIXIN_FLAG
615
+ method_option :debug, :type => :boolean, :default => false, :hide => true
613
616
  long_desc( CEEDLING_HANDOFF_OBJECTS[:loginator].sanitize(
614
617
  <<-LONGDESC
615
618
  `ceedling version` displays the version details of Ceedling and its supporting
@@ -620,9 +623,9 @@ module CeedlingTasks
620
623
  command line. The application runs your build and plugin tasks. The
621
624
  launcher hands off to the application. The two components are not
622
625
  necessarily from the same installation or of the same version. Local
623
- vendoring options, the WHICH_CEEDLING environment variable, and more can
624
- cause the Ceedling launcher to load a Ceedling application that is run
625
- from a different path than the launcher.
626
+ vendoring options, the WHICH_CEEDLING environment variable, your project
627
+ configuration's :project ↳ :which_ceedling, and more can select a Ceedling
628
+ application at a different path than the launcher.
626
629
 
627
630
  If the launcher and application are from different locations, the version
628
631
  output lists details for both. If they are from the same location, only a
@@ -630,14 +633,30 @@ module CeedlingTasks
630
633
 
631
634
  NOTES:
632
635
 
633
- • `version` does not load your project file.
636
+ • `version` reads your project file, when one is available, to find the
637
+ Ceedling application it selects. A project file that cannot be loaded is
638
+ skipped unless you name it with --project.
639
+
640
+ • #{LONGDOC_MIXIN_FLAG}
634
641
 
635
642
  • The build frameworks Unity, CMock, and CException are always sourced from
636
643
  the Ceedling application.
637
644
  LONGDESC
638
645
  ) )
639
646
  def version()
640
- @handler.version( ENV, @app_cfg )
647
+ @handler.validate_string_param(
648
+ options[:project],
649
+ CLI_MISSING_PARAMETER_DEFAULT,
650
+ "--project is missing a required filepath parameter"
651
+ )
652
+
653
+ # Get an unfrozen copy so we can add / modify
654
+ _options = options.dup()
655
+
656
+ _options[:verbosity] = Verbosity::ERRORS
657
+ CliOptionsTransform.apply_debug_flag( _options )
658
+
659
+ @handler.version( ENV, @app_cfg, _options )
641
660
  end
642
661
  # simplecov:enable line
643
662